Home

Panel Designer USER`S MANUAL

image

Contents

1. or boots a Pressing F5 Panel b Current directory of the Program List To be specified Pressing F5 Panel Select this parameter b TP panel screen specified by Start Panel to display the TP Path panel screen predetermined without changing the current directory To be specified a Booting the controller or Pressing F5 Panel b TP panel screen specified by Start Panel Path The Current directory of the Program List refers to the following he z oid Ja a Program List A of programa Diri tent The current directory is displayed z here Pee pros pime pawns Lal pal bnew La pp A a iS Back Neat Search UpFolder Displey Config Cancel Close this window ioe 21 Step 1 Press F6 Set F7 Options F9 Panel to display the following screen Parameters relating to the start mode of TP panel screen software FRE Chenge the election Oi Exit with mavi aj tee es dTe Step 2 Set the 0 Panel Start Setting parameter to any of O to 3 defined on the previous page Step 35 Ifthe 0 Panel Start Setting parameter is any of 1 to 3 specify the directory where the desired TP panel screen is located to the 1 Start Panel Path parameter Example TEST As shown above delimit the path with backslash This example calls up the TP panel screen located in the TEST folder If the 1 Start Panel Path parameter is not specified the root directory fo
2. DEFSNG Statement Function Declare a single precision real type variable The range of single precision real variables is from 3 402823E 38 to 3 402823E 38 Format DEFSNG lt Variablename gt lt Constant gt lt Variablename gt lt Constant gt Explanation This statement declares a variable designated by lt Variablename gt as a single precision real type variable By writing a constant after lt Variablename gt initialization can be done simultaneously with the declaration Multiple variable names can be declared at a time by separating them with a comma Related Terms DEFDBL DEFINT DEFSTR Example DEFSNG lfx lfy lfz Declare lfx lfy and lfz as single precision real type variables DEFSNG 1fx 1 0 Declare lfx as a single precision real type variables and set the initial value to 1 0 109 DEFDBL Statement Function Declare a double precision variable of type real The range of double precision real type variables is from 1 79769313486231D 308 to 1 79769313486231D 308 Format DEFDBL lt Variablename gt lt Constant gt lt Variablename gt lt Constant gt Explanation This statement declares the variable designated by lt Variablename gt as a double precision real type variable By writing a constant after lt Variablename gt initialization can be performed simultaneously with the declaration Multiple variable names can be declared at a time by separating each variable name by a comm
3. 107 Classified by functions Commands Functions 4 axis 6 axis Functions STR Convert a value to a character string CHR Convert an ASCII code to a character SPRINTF Convert an expression to a designated format and returns it as a character string System Information Operation Mode CUROPTMODE Get the current operation mode SYSSTATE Get the system status of the robot controller STATUS Obtain the program status Preprocessor Symbol Constants define Replace a designated constant or macro name in Macro Definitions the program with a designated character string File Fetch include Fetch the preprocessor program 108 5 2 Declaration Statements DEFINT Statement Function Declare an integer variable within the range from 2147483648 to 2147483647 Format DEFINT lt Variablename gt lt Constant gt lt Variablename gt lt Constant gt Explanation This statement declares the variable designated by lt Variablename gt as the integer type variable By writing a constant after lt Variablename gt initialization can be carried out simultaneously with the declaration Multiple variable names can be declared at a time by delineating the names using Related Terms DEFDBL DEFSNG DEFSTR Example DEP INT LX lilyyy LLZ Declare lix liy and liz as integer type variables DEFINT lix 1 Declare lix as an integer type variable and set the initial value to 1
4. 4 9 Functions The following string functions are available String Functions STR Convert a value to a character string CHR Specify a character using a numeric code 4 10 System Information The following commands return system information System Information Commands STATUS Obtain the program status CUROPTMODE Get the current operation mode SYSSTATE Get the system status of the robot controller 4 11 Preprocessor A preprocessor statement controls string substitution or file fetch in compiling programs that is translating them into executable form Preprocessor Commands Define macro symbolic name for constant or string Insert the specified file at this point 106 Chapter 5 Command Reference 5 1 List of TP Panel Control Commands Classified by functions Commands Functions 4 axis 6 axis Declaration Statements Local Variable DEFINT Declare an integer type variable The range of the O O Integer integer is from 2147483648 to 2147483647 Floating point DEFSNG Declare a single precision real type variable The O O range of single precision real variables is from 3 402823E 38 to 3 402823E 38 Double precision DEFDBL Declare a double precision real type variable The O O range of double precision real type variables is from 1 79769313486231D 308 to 1 79769313486231D 308 String DEFSTR Declare a character string type variable You can enter 247 characters or less as a character str
5. IN Li2 10 240 Assign the port 240 data to Li2 OUT sampl Lil Output the Lil data from the port declared in sampl OUT I0 240 Li2 rOutput the L12 data from port 240 115 SET Statement This statement sets the designated port in lt l O variable gt to ON If lt Output time gt is designated a pulse is output The output time unit is ms If lt Output time gt is designated the system does not proceed to the next instruction until this time elapses The specified output time value is the minimum output time while the BIT DORE ZAU seo JON port specified by I O variable SOL1 to ON BIT ports 104 to 110 to ON BLT pore 240 tO OEE port specified by I O variable SOL1 to OFF BIF ports L04 to ALO to OEF Function Set an I O port to ON Format SET lt l O variable gt lt Output time gt Explanation actual output time will change according to task priority Related Terms RESET DEFIO Example SET 10 240 Set SET IO PSOn1 Set SET 10 104 TO 110 Set IF 10 242 THEN RESET 10 240 Set RESET IO SOL1 Set RESET IO 104 TO 110 Set ENDIF RESET Statement Function Set an I O port to OFF Format RESET lt l O variable gt Explanation This statement sets the Related Terms SET DEFIO Example SET IO 240 Set SET 10 241 40 Set SET IO SOL1 Set SET TOT TL04 TO 1107 Set IF 1O 242 THEN RESET 10 240 Set RESET LOL SOL Set RESET TO TO04 TO 1710 Set ENDIF port specifi
6. Say 5 fm Et eel ie joman SA a A SE e AP A edt O DO O Jr O JO O A tery l r i p 4 g A p jee k Pas Y E Nal et E i Hi Sp la fi a le m l e j fan A i H T mr fa PE P ae at Wih A Hoima ami F pe aaa Eras Bedian reli il TT I iT 1 i 7 y j Ls l Fe P t as eee d Sard 76 Step 2 In the Source Code Edit window select the lamp s REFRESH event and add the following action source code for updating the lamp based on the mode data read from the controller at regularly scheduled intervals to the skeleton automatically created This example uses the default name LightButton1 DEFINT STAT AUTOSTAT STAT SYSSTATE AUTOSTAT H0010 AND STAT IF AUTOSTAT 0 THEN LIGHTBUTTON1 state O ELSE LIGHTBUTTON1 STATE 1 END IF 20007 DEF Lightivuttoni_REFRESH A DEFIANT STAT AUVTOSTAT aa Ti ETA YI TATE ALTOSTAT 4010010 AND STAT IF AUTOSTAT 8 THEW Liqgnthut tot Tate pl LSE Lightluttent state 1 Hb IF 17 2 4 Switching TP Panels The PAGE _ CHANGE command switches the teach pendant screen to a different TP panel in the same folder or even one in a different folder It has the following syntax Same folder PAGE CHANGE panel_name Different folder PAGE CHANGE path_name panel_name Root folder PAGE CHANGE panel_name 2 4 1 Example Switching in Same Folder The following example ha
7. E Eis WHS Y x Compiling o 4 PAHELCOMPILER 1 0 0 i C 1My Documents Panels1 pnl Compiler a RA Complete Errors 0 Warnings 6 Section 1 2 6 Panel Designer Screen Layout 1 2 1 Tool Bars The editor provides the following handy tool bars for creating TP panel data 1 Main tool bar This provides the following buttons caia Pame apa a New Create a new TP panel file Open an existing TP panel file Save Save the current file to disk overwriting any older version there de Cut Move the contents of the selected range to the system clipboard 2 Zoom grid tool bar These buttons change the Layout window magnification toggle the grid display on and off etc PO mame en Change the magnification ratio for the selected region eN Cancel Zoom Cancel zooming and return the Layout window to the standard 100 magnification Pan Shift the display screen in the specified direction HE Grid Toggle the grid display on and off CE Snap Toggle automatic grid positioning on and off 3 Layout tool bar These buttons assign uniform positioning spacing or size to the selected parts T Ule S sS Mie na y it ou ll E3 4 Parts tool bar Most of these buttons select a part to add to the panel layout in the Layout window ig 4 a aler og OO a oe Name SC een Numerical Add part numerical input box value input A push button ge Translate
8. wi il Ma wv p T ue i kL tu ia EF A vu 5 Mil 1 fl a Jg ai a Whe r eS ee MES EIA 51 Step 2 Set the property group for all radio buttons to the group number for the group to ensure mutually exclusive operation of the radio buttons within the group This example uses group number 0 emeliine Picci DAT TINT lajad To A i pn 5 HEr tT Ama i oh j ih a pof En ho aire AAP id 5 ei beat Agg AT po ha a t 7 mae om he is al a ES F iH ME i Na Ue rin rana Core L E E 1 Step 3 Adding action source code This part has CLICKED and RELEASED events similar to those for buttons 52 Step 4 Changing radio button properties Radio buttons have properties similar to those for buttons and labels This example shows how pressing a button Button1 on the same screen can update both the corresponding output lO 24 to 1O 26 and a numerical input box from the corresponding global float variable F 10 to F 12 based on the current states of the radio buttons RadioButton1 to RadioButton3 Add the button and numerical input box to the panel layout r Ola ma jam a a Ami unl Manda Lanei Par oc ar tr a ld cade gt us re E la a pl E E Gr ce ms es z mot OT AA A TEE ik tiaa ee 99 Step 5 Open the Source Code Edit window select Button1 and CLI
9. 20 n hs a ic E aT i E ai Ss AEL UE i o Em H ES WF aiea ra ee l Sauce Panel 4 Compile Compile the action source code just written to check for syntax typing or other errors Progress and other messages from the compiler appear in a pane near the bottom of the main editor window 5 Send data to the controller Send the newly created TP panel file to the controller using WINCAPSIII Note that using the teach pendant as an operating panel requires reconfiguring the teach pendant 1 2 Editor Screen Functional Description The following figure gives the editor screen layout The following pages describe the individual components Tool bars Section 1 2 1 Ox a alale ea 7 me e El APENAS as Ja AAA E Layout window T Section 1 2 4 A eae y II WOT ee m PanelDesiones Panels1 pnl File Edi View Tools Window Help 19 Group 13 RadioButton E RadioButton Ei LighiButtom ES LightButton2 tn Condition G LightButton3 ik 14 Button E Option 1 Button ES Button3 5 Source Panell EI ol o RadioButton1 A mHllciickeni UE 2502 DEF Button3_ goora set 10 1 00004 END 00005 00000 DEF Button3_RELEASED 60007 Opti nme Source code edit window Section 1 2 5 00008 END 20000 00010 DEF RadioButton1_CLICKED 00011 60012 END Properties pane Edm ip Section 1 2 3 pj amp
10. SUSPENDALL Example KILLALL Terminate all tasks and enter the program reset state 120 CONTINUERUN Statement Function Continue run tasks Format CONTINUERUN Explanation Restarts all continue stopped tasks from the subsequent steps Related Terms KILL SUSPENDALL Example CONTINUERUN Restart all tasks DEADMANSTATE Statement Function Obtain the current deadman switch state 0 OFF 1 ON taka Format DEADMANSTATE Explanation This statement gets the current state of the deadman switch Enable switch Example IO DEADMANSTATE Assign the current deadman state to 10 121 5 6 Constants OFF Built in constant Function Set an OFF 0 value Format OFF Explanation This statement sets an OFF 0 value in an expression Related Terms ON Example IF I1 TRUE THEN set the Boolean value to true 1 11 ON Set ON 1 to the integer variable ELSEIF 11 FALSE THEN Set the Boolean value to true 1 11 OFF Set OFF 0 to the integer variable ELSE DI PT Assign m to the real variable ENDIF ON Built in constant Function Set an ON 1 value Format ON Explanation This statement sets an ON 1 value in an expression Related Terms OFF Example 1F 11 TRUE THEN Set the Boolean value to true 1 Il ON Set ON 1 to the integer variable ELSEIF 11 FALSE THEN Set the Boolean value to true 1 11 OFF Set OFF 0 to the integer variable ELSE BL P Assign m to t
11. and other items so that the program can use them There are three major types 1 Type declarations These specify types for variables and constants Type Declaration Directives They can also simultaneously initialize the variables Examples DEFINT AA 1 declare AA as an integer and initialize to 1 DEFSNG BB 10 declare BB as a float array with 10 elements 2 Array declarations Array declarations use type declaration directives specifying the number of elements All types except I O variables support arrays Note however that type declaration directives cannot initialize arrays Array subscripts start at 0 An array can have up to three dimensions An array can have up to 32767 elements in total Example DEFINT CC 3 3 3 declare CC as 3 dimensional integer array 3 VO variable declarations These assign variable names to specific I O ports I O Variable Declarations I O variable DEFIO DEFIO PORT BYTE 104 103 4 5 Assignment Statements An assignment statement assigns copies a value to a variable of some type There are two types Numerical This assigns the result of a numerical expression to a numerical variable Example D 2 3 14 set D 2 to 3 14 String This assigns the result of a string expression to a string variable Example S 2 DENSO set S 2 to DENSO 4 6 Flow Control Statements Flow control statements change statement execution order There are three main
12. multiplying it by 20 and writing the result back reading global double variable 10 into a local double variable multiplying it by 10 and writing the result back reading global string variable 10 into a local string variable adding end and writing the result back DEFINT ITEST DEFSNG FTEST DEFDBL DTEST DEFSTR STEST ITEST I 10 FTEST F 10 DTEST D 10 STEST S 10 ITEST ITEST 10 FTEST FTEST 20 DTEST DTEST 10 STEST STEST END 10 ITEST F 10 FTEST D 10 DTEST S 10 STEST de ae peara A ana tias ana asas A 10 reas if E ces gt DEF fultont OLTEKERE aca DEFINI ITEST DEFSHG FTEST DEFOHL DIEST BEFSH STEST ITEST 1 18 FIEST F 18 DICST D 10 STEET lt 18 TEST TTEST 910 FIEST lt F TEST 20 DTEST DTEST 10 STEST lt STERT Erm 1 18 1131 F 10 DTES1 D 10 01EX1 5 1 51051 HO o FEST PEA Compile the panel layout download it to the controller and test 86 Chapter 3 TP Panel Control Language s Structural Elements 3 1 Language Elements The TP panel control language has the following structural elements identifier Name distinguishing a structural element variable Temporary storage for data constant Data with a fixed value operator Symbol indicating an operation on one or two values expression Combination of structural elements yielding a value command Built in PAC language instruction 3 2 Names This sect
13. 2 continued U 92002 DEF Buttont CLICKED 00001 PARE CHANGE FPANELI n EHD Ones y 2209 DEF Button CLICHEDE D0007 PAGE CHANGE FOLDER PANCLA 00008 EMD wia COA a n gt Fi e bo06 DEF Button CLICKED 0000 PAGE CHANEE PAHEL 1 ouia EMD Compile the panel layouts download them to the controller and test 81 2 5 Flow Control The TP panel control language has three types of flow control statements conditional branches IF END IF and IF THEN ELSE SELECT CASE and iteration FOR NEXT The following sections give examples 2 5 1 Conditional Branching Example Using IF END IF The following IF statement example reads a global variable into a numerical input box if an I O condition is met Step 1 Load the editor and place a numerical input box and a button to trigger the test on the panel layout Step 2 Open the Source Code Edit window and add action source code updating the numerical input box from global integer variable 10 only if I O variable 24 is 1 when this button is pressed um Fa dada PIT z a de gt is mH Ted wy r Bah Es pe cl TT SSO DEF Buttomi_CLICHED IF 10 24 THEM HOMERIC value 1 10 EMD IF is EMO DUO te eek tes Ja a Compile the panel layout download it to the controller and test 82 Example Using SELECT CASE The following SELECT CASE example runs a differe
14. 2 4 2 Example Switching Between Folders oocccocccocnccocnccocnoconnoconcnnonnonnnononnonannonannonnnnonnninaninos 80 Zs TION CONU A A O Sa 82 ZA CONGIION GIES TANCOING it Ta e a alas 82 ZO MCVAUOM as 84 220 Local WANA IOS stuck ARCO PA e e a suze sceanueaeantanesees 85 Chapter 3 TP Panel Control Language s Structural Elements ooncconnccnnnicnnniconiccnnoncnroncnncnnonenaronaronanons 87 31 Language Elements is O eee stedee 87 O ne ne eg rae ete ee eee ae ge eee a ee ee 87 3 9 AGCMUMENS AMG VANADICS ro in 88 HI MAMAS dd Gulp ened 88 3 9 2 Gpl V MADO Seta o sone a S 88 SN A N 89 So UDC PrOpernles src ici la 89 9300 Folder Van ADIOS 2 a a doin 96 a cu deees a ovens tice be bennett RN 97 Oro Data TYPES ade dedo 97 20 A o 98 SA ICON SAM A O o o e 98 3 09 EXPressions and Operators ii 99 Chapter 4 TP Panel Control Language Syntax oonccocccoocccoccconccnonononcnconnnncnnonenancnnnronnnrrnnnnrnnrrnnnrrnnarenarenanes 102 A T Statements ANG eS vealed joie ce eater el ei eens aie id aie cual aati ol ole ei oes 102 42 Characier Selaia eg cela rh dl e ld hans 102 MeO SIRO SOIVCCE WY ONG S55 os cance cent eaten a ees a cee tea ee ieee Gene a ete ee es 102 44A Declaration DISC IV 103 AD ASsionment Statements ii ii 104 46 Elow Control otaltements ai a 104 A VO Control Statement escisiones illa 105 48 Task Control Statements ika 105 A O A mee totem ential 106 A NOESY SIEM MONA ON ian Sonne a laa a i oa ciate 106 Al
15. 2 4 2 Example Switching Between Folders The following example has three panel layouts all in different folders in a 3 level hierarchy with two buttons on each for freely moving between them Step 1 Create the 3 level hierarchy with WINCAPSIII Load the editor create three panel layouts one at each level with two buttons on each and label the buttons for the two other panel layouts 5 FAA IRC Il Abs Ge pi yea ops Coren eb de i adi beb AA A SAA O AAA IIA A Ue i B Montos Commricstion fine ie lA MTM CN ii i a TLF System input Data arma bit Syabeen reut Cute sas bet Saian reut Dats aes be Syste inot Conard are Step 2 Open Source Code Edit windows for the panel layouts and add the appropriated line from the following action source code to each button s CLICKED event PAGE CHANGE FOLDER1 PANEL1 switch screen to PANEL1 in FOLDER relative to the current folder PAGE CHANGE FOLDER2 PANEL1 switch screen to PANEL1 in FOLDER2 relative to the current folder PAGE CHANGE FOLDER1 FOLDER2 PANEL1 switch screen to PANEL1 in FOLDER1 FOLDERZ2 relative to the current folder PAGE CHANGE PANEL3 switch screen to PANEL 1 in the root folder using absolute folder reference File Edit View Tools Window Help 00002 DEF Button1_CLICKED 00003 PAGE_CHANE FOLDER1 PANELA 00004 END 00005 00006 DEF Button2_CLICKED 00007 PAGE CHANGE FOLDERA FOLDER2 PANELA 00008 END ex cry 33 e Z 80 Step
16. Cancel commenting out for the selected lines Toggle bookmark on the current source code line Next bookmark Move the cursor to the next bookmark 4 Previous bookmark Move the cursor to the previous bookmark Clear bookmarks Cancel all bookmark definitions Find and replace Find the specified string and optionally replace it Note Setting a bookmark on a code line displays a square marker O to its left 10 2 Part list box Select the part for which to assign action source code 3 Event list box This lists the events available for the selected part Selecting one automatically generates the corresponding skeleton action source code block on the editor screen Example Skeleton action source code block for pressing Button1 DEF Button1_CLICKED END 4 Action source code block Flesh out the skeleton with action source code Example Action source code block for pressing Button1 DEF Button1_CLICKED Set 1O 128 turn I O variable 128 ON Run PRO100 run PRO100 END 1 2 6 Compiler Messages Pane This displays progress and other messages from the compiler as it compiles the TP panel data Double clicking on an error message line displays the corresponding source code in a Source Code Edit window lE lx Compiling PANELCOMPILER 1 6 0 C WINDOWS Desktop Panels1 pnl CO WIKDOWS Desktop Panels1_pnl Ho 1 Pnamefpanel1 Lineg 4 cannot cast ai ce Ready eat af of of IT
17. PAC language programming It consists of a single command A command consists of the command name plus parameters specifying additional information to the command 4 2 Character Set The TP panel control language uses ASCII letters digits and certain special characters lt does not distinguish between upper and lower case These special characters consist of the arithmetic operators and plus the following comma Delimiter for parameters single quote In line counterpart of the REM command double quote Beginning and end markers for a string constant space Delimiter before and after instruction name 4 3 Reserved Words Command names the MOD operator and other words are reserved that is have a preassigned function in processing the TP panel control language so cannot be used and names for variables panels etc TP Panel Reserved Word List if then else elseif while do return print add_widget msgbox page_change set reset run kill suspend suspendall killall caption fg bg timeout defint defsng defdbl defstr defio in out break continue var def pend for refresh extern begin end wend next endif status str continuerun io i f d s sysstate curoptmode time date timer select case is to deadmanstate sprintf releasemode pniccver chr step 102 4 4 Declaration Directives These specify names and types for variables constants functions
18. Ye Dow ie w He ls aL eee rer e SA e AAA pos i Bo e EEE ani AA i io ow B i Lh A Tia Ez iE E E pi R a 12 Step 2 In the Source Code Edit window select the REFRESH event for one lamp This example uses LightButton1 and add the following action source code for copying the I O states to the lamps at regularly scheduled intervals to the skeleton automatically created LightButton1 state 1O 24 copy I O variable 24 state into LightButton1 LightButton2 state lIO 25 copy I O variable 25 state into LightButton2 LightButton3 state O 26 copy I O variable 26 state into LightButton3 LightButton4 state lIO 27 copy I O variable 27 state into LightButton4 pal tl Ua eA A ellen Da DEF Liyhtiuttont REFHESAL Lignehut tim states TOPAN Lightiuttant grts state oF 10 74 meea Lighttutltua2 State iN 2 Lightivt tun getu state of topes eee Lightbuttond states TO 6 Lightiutton gots state of 10 26 DI IL state 10 37 Lightvettanh gets shale af pay se MOT HD EEan m AAA Y 2 2 Y 2 73 2 3 4 Modifying I O States Use the SET and RESET commands to modify system I O states ON SET IO I O number OFF RESET IO I O number Example Modifying I O States The following example updates I O variables 28 to 31 from the corresponding check boxes when a button is pressed Load the editor and
19. an ASCII code to a character Format CHR lt Expression gt Explanation This statement obtains a character with the character code of the value designated in lt Expression gt Related Terms STR Example DEB SER 1s1 1s2 lsl CHRS 49 Assign a character with the character code of 49 to lsl 1s2 CHRS amp H4E Assign a character with the character code of amp H4E to 1s2 PBl caption program CARS 3 CHRS 10 start Use CR LF combination as a line delimiter for captions 127 SPRINTES Function Function Convert an expression to a designated format and returns it as a character string Format SPRINTF lt Format gt lt Expression gt Related Terms STR Example SO SPRINTFS 3 d 123 Assan TL23 Eo SO 128 5 9 System Information CUROPTMODE Statement Function Get the current operation mode Format CUROPTMODE Explanation This statement gets the current operation mode as a value any of 1 to 4 shown below 1 Manual 2 Teach check 3 Internal auto 4 External auto Example 1 1 CUROPTMODE Get the current operation mode SYSSTATE Statement Function Get the system status of the robot controller Format SYSSTATE Explanation This statement gets the system status of the robot controller The status data differs depending upon the I O line assignment Listed below are data that can be obtained Bit O Robot in operation signal 1 Robot failure signal 2 servo ON sign
20. controller and test 65 720 160700 240 780 320_360 90999 60620 560 600 TE A E 2 3 Interfaces with PAC Language and System Data exchange between the PAC language and the TP panel is via global and folder variables The interface with the system uses the SYSSTATE command and I O variables 2 3 1 Reading and Displaying PAC Variables A TP panel can access PAC global and folder variables but not local ones Folder variables require EXTERN declarations global ones do not The following examples display such variables on TP panels Example Displaying Global Variables Accessing a global variable uses array notation with the array name indicating the type for integer F for float D for double and S for string Global integer variable 10 for example is 1 10 The following example displays a global variable of each type in a numerical input box or text box for the string when a button is pressed Step 4 Load the editor and place a button three numerical input boxes for displaying the three numerical variables and a text box for displaying the string variable on the panel layout ET a kad 1 reed Ha Hh d URES REM EE ry 66 Step 2 Open the Source Code Edit window and add the following action source code for when this button is pressed This example copies global integer variable 10 float variable 11 and double variable 12 to numerical input
21. directory In the case of lt gt it searches only the system directory If the path is designated with a full path it searches only in the directory designated You can include the include statement for a file designated with the include statement You can nest up to 8 levels The file extension available is H Example include samp1 h Expand the sampl h file on this line 132 RC7 CONTROLLER Teach Pendant Operating Panel Editor Panel Designer User s Manual First Edition February 2005 Fourth Edition April 2009 Fifth Edition March 2010 DENSO WAVE INCORPORATED 3M C The purpose of this manual is to provide accurate information in the handling and operating of the Panel Designer Please feel free to send your comments regarding any errors or omissions you may have found or any suggestions you may have for generally improving the manual In no event will DENSO WAVE INCORPORATED be liable for any direct or indirect damages resulting from the application of the information in this manual
22. for specifying the three numerical values and a text box for specifying the string on the panel layout l er DEE A A wil iis 69 Step 2 Open the Source Code Edit window and add the following action source code for when this button is pressed This example copies the three numerical values to global integer variable 20 float variable 21 and double variable 22 and the string to global string variable 23 1 20 Numeric1 value F 21 Numeric2 value D 22 Numeric3 value S 23 Textbox1 text at a Es saa ue l inime CCCs DEF Huttoni _ECLICRED 20023 1720 Huneric1 value s 121 weer ie va dur ee 1 27 Hunerica value gooo s 2 Textoxt text SOOT END coos Cunmpiling PANELCOMPILER 1 0 0 C 1My DocurnentsiPanelsi pn1 Complete Errors U Warnings U 70 Step 1 Step 2 Example Modifying Folder Variables Accessing folder variables in action source code for a button or other part requires first declaring them with EXTERN plus a reserved word DEFINT DEFSNG DEFDBL or DEFSNG indicating the type The following example updates a folder variable of each type from the corresponding numerical input box or text box for the string when a button is pressed Load the editor and place a button three numerical input boxes for specifying the three numerical values and a text box for specifying the string on the panel layout Note that th
23. index is 9 or more gn Declare the end of the plural conditional decision statement 114 5 4 Input Output Control Statements IN Statement Function Read data from the I O port designated by an I O variable Format IN lt Arithmetic variablename gt lt l O variable gt Explanation This statement assigns the I O port data designated by lt I O variable gt to the variable designated by lt Arithmetic variablename gt The lt l O variable gt is declared using a DEFIO statement or an I O type variable Related Terms OUT DEFIO Example DEBENT id LIZ DEFIO sampl INTEGER 220 Declare sampl as an INTEGER type I O variable beginning at port 220 IN Lil sampl Assign the sampl data to Lil IN Li2 10 240 Assign the port 240 data Co Diza OUT sampl Lil Output the Lil data from the port declared in sampl OUT IO 240 Li2 Output the 2 data from port 240 OUT Statement Function Output data to the I O port designated by an I O variable Format OUT lt I O variable gt lt Output data gt Explanation This statement outputs the value of lt Output data gt to the port address designated by lt I O variable gt lt I O variable gt is declared using a DEFIO statement or I O type variable Related Terms IN DEFIO Example DEFINT Lil Li2 DEFIO sampl INTEGER 220 Declare sampl as an INTEGER type I O variable beginning at port 220 IN Lil sampl Assign the sampl data to Lil
24. left corner Position relative to the upper left corner of the coordinates drawing region This corner must be within the teach pendant drawing range Part dimensions in These define the corner opposite the reference pixels corner x y x width y height Negative means left or up of the reference corner positive right or down Foreground and 1 White O Black 1 Blue 2 Green 3 Cyan 4 background colors Red 5 Magenta 6 Brown 7 Light Gray 8 Gray 9 Light Blue 10 Light Green 11 Light Cyan 12 Light Red 13 Light Magenta 14 Yellow Group to which part belongs Active setting O Invisible 1 Visible Display style O Solid line 1 to 7 Dash dashed line 8 to 14 Dash double alternate long and two short dashed line Line thickness The O setting produces a line width of 2 Upper left corner Position relative to the upper left corner of the coordinates drawing region This corner must be within the teach pendant drawing range width and height fg and bg Numerical x and y Input Button Events width and CLICKED height RELEASED Part dimensions in These define the corner opposite the reference pixels corner x y x width y height Negative means left or up of the reference corner positive right or down Foreground and 1 White O Black 1 Blue 2 Green 3 Cyan 4 background colors Red 5 Magenta 6 Brown 7 Light Gray 8 Gray 9 Light Blue 10 Light Green 11 L
25. place four check boxes and a button on the panel layout Step 1 Laan Panel ao A a a egg lA gg ee ee i TEJ pa A e a i maji ia Yet S RM oe at a SP ed a re Eds heated e Ji aa hiai gt Wo a ir oe AET A Lee ead OS 74 Step 2 Open the Source Code Edit window and add the following action source code for updating the outputs from the check boxes O 28 Checkbox1 state update I O variable 28 from Checkbox 1 l O 29 Checkbox2 state update I O variable 29 from Checkbox2 l O 30 Checkbox3 state update I O variable 30 from Checkbox3 I0 31 Checkbox4 state update I O variable 31 from Checkbox4 He Fela i a a a 4 1 T a r i ao ala Fe mS nn ii E we 5 EA S TERI SL ii PEI Ii rd ii PEO hp I mi J pa E ii i VH a aha a ee a a ee AA A A tard Lisa ao ee A OR 22 DEF Mutbamt CLICKED A LO ea Checkbox state AEN gets state of Cheehtont Soe 6029 Checkbox state TOENI gets state of Checkbox wae 18 pr estad ene etate Lantos gets state af Chechagi eee jojy CheckBoxA stato LU 29 gtts state of Chechens oS LHD 19 2 3 5 Reading System Status The SYSSTATE command reads the system status For further details on this and other commands see Chapter 5 Command Reference Example Reading System Status The following example lights a lamp when the controller is in automatic mode Load the editor and place a lamp on the panel layout Step 1
26. terminate a task Format KILL lt Programname gt Explanation This statement forcibly terminates the task program designated by lt Programname gt However it cannot kill a program that contains the statement If attempted an error will occur To forcibly terminate a statement containing program use a STOP instruction Related Terms SUSPEND Example RUN sampl Concurrently runs sampl KILL sampl Ends sampi SUSPEND Statement Function Suspend a task Format SUSPEND lt Programname gt Explanation This statement suspends the processing of a designated task However it cannot suspend a program that contains the statement Related Terms KILL Example SUSPEND sampl Suspend task execution of sampl 119 SUSPENDALL Statement Function Suspend all running programs except supervisory tasks Format SUSPENDALL Explanation This statement suspends all tasks except supervisory tasks makes them enter the Continue Stop state and turns off the Robot in operation output signal Related Terms SUSPEND KILLALL Example SUSPENDALL Immediately stop all tasks and enter Continue Stop status KILLALL Statement Function Forcibly terminate all tasks except supervisory tasks Functionally equivalent to the Program reset command Format KILLALL Explanation This statement forcibly terminates all tasks except supervisory tasks and turns off the Robot in operation output signal Related Terms KILL
27. the corresponding TP panel file into executable format a 5 Move tool bar These buttons move parts around the panel layout and within the file s part hierarchy Oh Boho fo ee Mame et ey Fon Mowetothetplyen S ea Back Morea me tomes Eh Forward Move forwardonelayer Backward Move backward one layer Nudge up Move up Simultaneously holding down the Shift key moves 5 pixels each time e Nudge left Move left EE Nudge right Move right 1 2 2 Parts Tree Pane This displays the current file s panels and parts in tree format 1 Parts Tree pane The following figure shows a sample Parts Tree pane Double clicking on a part displays its panel layout Joja amp SE Panels Sm j Panel 3 Button 3 Label SO EN Panel2 3 Group 3 RadioButton 3 RadioButtor 2 Parts tool bar This provides the following buttons Balg Name Despi O Layout form Specify the Layout window as target Source form Specify the Source Code Edit window as target Fa Layout window Display the target window specified above E Erasepanel Delete a panel layout from the TP panel data 1 2 3 Properties Pane This accesses the position size and other properties for a part The list of properties depends on the part type For further details see Section 1 5 1 Property Lists xl Property F Mame Guttoni Type PB BG _ Gray Component narne Properties Pan
28. 4 Compiler Messages Pane 11 1 2 7 Menus This section lists the editor s menus and menu commands 1 File i N Create new TP panel file Open an existing TP panel file Close the current file first t displaying th the dialog box for saving if current file edits have not been saved Save the current file to disk displaying the dialog box for saving if the file i is new Save the current file to disk andere a new name AAA Print the contents of the current window Layout or Source _ Code E Edit Print Preview Display a print image o on 1 the s screen 1 instead of sending data to the printer Printer Setting Display the dialog box for specifying printer settings Import Read panel layouts from another TP panel file Most recently This section lists the last few TP panel files saved used files 2 Edit _ Reverse the effects of the last operation Undo the last undo operation in other words repeat tthe last operation Move the contents of the selected range to the system clipboard Copy Copy the selected parts or r string to the system clipboard Paste Insert the clipboard contents at the current cursor position Delete Delete the selected parts or string Display the dialog box for finding and optionally replacing the specified string 3 View Toggle display of tool bars Toggle display of status bar Tree bar Toggle display of the Parts Tree pane Parts
29. 6 3 Double constants These are double precision floating point constants with up to 15 digit mantissas over the range 1 79769313486231E 308 to 1 79769313486231E 308 There are two ways to specify them in decimal and exponential E notation Example 1 1256 325468 This has more than 7 decimal digits so does not fit in a float Example 2 9 345E 06 4 String constants These are constants consisting of up to 128 characters enclosed in double quotes Example PAC 3 8 Expressions and Operators Expressions evaluate to a value An expression can be anything from a single element constant or variable to an arithmetic formula combining such elements with operators The PAC language offers expressions for all data types that it supports This section describes operators and their operations on elements in expressions 1 Assignment operator An assignment statement assigns copies the result of evaluating the expression on the right side of this operator to the variable on the left 99 2 Arithmetic operators The following table lists these operators and gives their order of precedence during expression evaluation Arithmetic Operators Exponentiation Highest ay mias E Multiplication and division MoD Modus e Addition and subtraction Sign of Division Results Divisor right element Left element 3 Relational operators Relational operators compare two numerical values and ret
30. AN PER Tineri TERE Se TF kightNuttani statesi then fe 15 Lightinttont state t mom Else os a Ligntautton state O18 Endir 0001 Hb Step 1 Step 2 11 Line This part draws a straight line with the specified pattern on the panel layout The parts line oval and rectangle are for drawing only They support no events Nevertheless other parts on the same screen can still change their properties Line Example Load the editor and place a line on the panel layout Changing line properties Like all drawing parts the main properties here are line type style and line thickness thickness The following example uses a button press to change line thickness and style Add a second line and a button to the panel layout A Fiatal ax E a e zeal Hor EE sio Ez oes nao a E J p AA TE bate eee bd om gy Bie eee ie a fj B F mir Ui kr 7 5 Ja a TE AA Af E jj ok T A OP eed Eu al ieee T TER 61 Step 3 Step 4 Open the Source Code Edit window and add the following action source code for changing the line 1 thickness to 5 pixels and the line 2 style to dotted line when the button is pressed A er r a e angit AN il El A Ta A VAART AAA A EE aS 5 a Ha E SSS PEF Huttoni ELINRED 222 Lined thickness 5 es Line styles1 oot FHD PAHELCOHPILER 1 0 0 ery becuneats Panett pm Complete Errors H War
31. CKED to create the action source code skeleton and add the following IF statement branching on the radio button properties state If radiobutton 1 state 1 then lo 24 1 Numeric1 value F 10 Elseif radiobutton2 state 1 then lo 25 1 Numeric2 value F 11 Elseif radiobutton3 state 1 then lo 26 1 Numeric1 value F 12 End if m Pier aie a Pius yeni m7 TA Winds oe Hee i V oO Si di a mr 5 psi DEF Radiobuttoni_CLICNED If radiobuttent state 1 then Lolz Hiner ic wale F 10 Flerif Aadiohut ton tates Chien lo 25 1 Huneric value F 11 1 Elseif Radiobutton3 state 1 then 20010 fo zo 1 oe Her ie wale F 12 rats Endif Cots EMD E Vz l tM 7 TE y al J ma A Lii y p a a a 1 cd oa ce PE DA 3 PL COMPILER 1 14 0 CAH Documents Panels i pnl Compile this panel layout download it to the controller and test 54 8 Group This part provides mutually exclusive operation for a set of radio buttons Group Example The following example demonstrates mutually exclusive operation with two sets of radio buttons Place two groups with three and four radio buttons respectively on the panel layout Step 1 i AS Med Gey ar DES ome i i AA E MES w i a oz ee rik E LES i ninia eein ET j SS Er EI FE mii Mr EE NTIS TTE 15 eT 55 Step 2 Assig
32. DENSO ROBOT RC7 CONTROLLER Teach Pendant Panel Editor Panel Designer USER S MANUAL Copyright DENSO WAVE INCORPORATED 2005 2010 All rights reserved No part of this publication may be reproduced in any form or by any means without permission in writing from the publisher All products and company names mentioned are trademarks or registered trademarks of their respective holders Specifications are subject to change without prior notice Foreword This manual sets forth the Panel Designer a teach pendant panel editor that enables you to create teach pendant TP panel screen software on the computer screen This is a supplement to the Setting Manual and WINCAPSIII Guide Note for the global type of robot controllers Version 2 801 or earlier When the External auto limited mode is selected teach pendant TP panel screen software cannot run in External auto mode Refer to the RC7M Controller Manual Version 2 802 or later Even in External auto mode TP panel screen software can run except that RUN and COTINUERUN commands TP panel control languages cannot execute Contents Chapter 1 Panel Designer Overview cccoccccocncocnccconccccnncconaconnnconnnnenn rra rrnnnrrnnn rear rra rra rrnnnrrnnnrrnnrrnnrrnnnrennnnnn 1 1 1 Overview of Procedures for Creating TP Panel Data occccocncccnccccnccccnncncnocannnnannnnnnnnnnnnnnnnonannnnons 2 1 2 Editor Screen Functional DescriptiON cooccccoccoconcccon
33. ET dea ul NEP High E ETE ajj Is Erp tee a ES E y as 7 i i re T MES i E A A gt a Hi ME A al E pl E A MA t Fl ik im tie A 6 Pare Je F DF ate E SE DEF Hutton CLICKED 0 Munerdiet value Vi od 11 Hunerlcd values 5 00005 Eno En wi ling PAMELCOMPILER 1 0 0 Es My Documents Panels T pnd Complete Errors A Warnings 46 Step 1 Step 2 Step 3 5 Text Box This part is a button that displays a string Pressing this button switches the pendant operation screen to keyboard input for directly updating that string This part has CLICKED and RELEASED events similar to those for buttons Note In Version 2 32 or later the DONE event is added to this part For details see Section 2 2 5 DONE Event Text Box Example Load the editor and place a text box on the panel layout Optional Specify an initial value Add action source code This part has CLICKED and RELEASED events similar to those for buttons Changing text box properties In addition to the color position and other properties that this part shares with buttons this part it has the unique property of a display string text This example uses a button press on the same screen to read global string variable 10 into a text box and store that value in global string variable 11 Load the editor and place a text box and button on the panel layout Open the Source Code
34. Edit window select Button1 and CLICKED to create the action source code skeleton and add the following lines The procedures for accessing properties are the same as for all other parts Textbox1 text S 10 S 11 Textbox1 text illinois Panels al ola CEE Doe Usa Ba ee EA a Py or fr ZAS E MENO fie Elg MARGUE pim ENT oao d aurce Panel E e i si CLICKED 2 DEF Tekthoaw CLICKED pete Texthont text i 10 me 11 Textbox1 bext CELES F EHD gm am PETET PANELCOMNPILER 1 0 0 Complete Errors U Warnings U aL Cni DocumentsiPanels1 pm1 Had 47 6 Check Box This part toggles a setting between on and off Access to this setting is via the property state This part has other properties similar to buttons and labels Check Box Example Step 1 Load the editor and place a check box on the panel layout at de 7 Ir F z 9 cere tt i IDAS BE ee Bs A Sid AA cats gt el e r a aripi z z i j En i a a Lam z J IA A ee li LL L 2 E F 7 Pp ui uE 5 a ar a a ie j P S a E No p5 i A Am D ee rat pos ti PA iae pel rv pa Pat 1 wt e Ci el A ERA AA A ee A AA Ee ee Se a E Y CE Sa A Prd da apl WI A L bea ey t E rE z al J t Step 2 Adding action source code This part has CLICKED and RELEASED events simila
35. KED teach pendant drawing range RELEASED width and Part dimensions in These define the corner opposite the reference height pixels corner x y x width y height Negative means left or up of the reference corner positive right or down fg and bg Foreground and 1 White 0 Black 1 Blue 2 Green 3 Cyan 4 background colors Red 5 Magenta 6 Brown 7 Light Gray 8 Gray 9 Light Blue 10 Light Green 11 Light Cyan 12 Light Red 13 Light Magenta 14 Yellow active Visible and active 0 Invisible amp inactive Add 1 for visible and 2 for settings active Note that 3 is the only setting producing events CLICKED and RELEASED style Display style 0 2D check box 1 3D check box 2 3D button caption S Display text String max 80 bytes Note Specifying too long a string produces string overlap on the button surface justify EM Caption positioning 0 Centered 1 Right justified 2 Left justified 94 Radio x and y Upper left corner Position relative to the upper left corner of the Button coordinates drawing region This corner must be within the Puente teach pendant drawing range CLICKED width and Part dimensions in These define the corner opposite the reference RELEASED height pixels corner x y x width y height Negative means left or up of the reference corner positive right or down fg and bg Foreground and 1 White 0 Black 1 Blue 2 Green 3 Cyan 4 background colors Red 5 M
36. Local variable allowed No access Mo access allowed 3 3 2 Global Variables These have names consisting of one or two letters indicating the type l for integer F for float D for double S for string and IO for I O and a number in brackets These names are predefined by the system so can be used without declarations I integer 2147483648 to 2147483647 F single precision floating point 3 402823E 38 to 3 402823E 38 D double precision floating point 1 7976931348623157E 308 to 1 7976931348623157E 308 S string up to 243 bytes long IO I O line Examples 1 1 F 1 D 1 S 1 10 1 88 3 3 3 Local Variables These have the same types as global ones integer 2147483648 to 2147483647 F single precision floating point 3 402823E 38 to 3 402823E 38 D double precision floating point 1 7976931348623157E 308 to 1 7976931348623157E 308 S string up to 243 bytes long I O I O line A local variable must be defined with a type declaration directive before it can be used Note The TP panel control language does not share the PAC language s support for indirect reference or post positions 3 3 4 Object Properties Object properties provide read write access to TP panel screen part internals using the standard dot notation part_name property Examples 1 Change the caption for the part named Button1 to Button 2 Read the state for the part named LightButton1 into 1 1 The following table lists pa
37. MSB is assumed to be a sign bit The table below lists the allowable range of numeric values and pot numbers used as the MSB WORD Allowable range of numeric values 32768 to 32767 MSB port No Starting port address 15 INTEGER Allowable range of numeric values 2147483648 to 2147483647 MSB port No Starting port address 31 111 5 3 Flow Control Statements FOR NEXT Statement Function Repeatedly execute a series of instructions between FOR NEXT sections Format FOR lt Variablename gt lt Initial value gt TO lt Final value gt STEP lt Increment gt NEXT lt Variablename gt Explanation This statement repeatedly executes a series of instructions between FOR NEXT according to the condition designated on the FOR line Set the initial value of the variable designated by lt Variablename gt for lt Initial value gt Set the final value of the variable designated by lt Variablename gt for lt Final value gt Set an increment value between the initial value and the final value for lt Increment gt Omitting STEP regards the increment as 1 No negative value can be specified for lt Increment gt You can put another FOR NEXT in one FOR NEXT referred to as a nested construction In this case a different variable must be used for each lt Variablename gt Additionally one FOR NEXT must be completely inside the other FOR NEXT Example DEFINT lil FOR dit TOS Repeat the process of FOR NEXT 5 tim
38. Note The password entry range is from 2147483648 to 2147483647 When you attempt to exit the TP panel screen software by pressing the Cancel key with the Shift key held down the password entry window appears as shown below You need to enter the password and press the OK button If the password entered here matches the one preset to the 3 Mode1 Password parameter the TP panel screen software exits Tip If you forget the password enter 273958314 to exit the TP panel screen software 24 2 1 5 Hiding the Shortcut Button Version 2 6 or later You can hide the SHORTCUT button to prevent it from being pressed inadvertently when the TP panel screen is active os SHORTCUT button Step 11 Press F6 Set F7 Options F9 Panel to display the Panel Setting screen Step 2 Select 4 SHORTCUT disable and change the parameter by pressing F5 Change Pressing the OK button enables the setting Parameters for 4 SHORTCUT disable on the Panel Setting screen Display the SHORTCUT button when the TP panel Default screen Is active 4 Hide the SHORTCUT button when the TP panel screen is active 20 2 2 Using Parts 2 2 1 Parts and Their Functions The following table lists the 14 part types available for building TP panel screen software Parts Arama LO eta Part i ng box 6 7 Radio button Selects from a group of mutually exclusive choices 8 Group Provides mutually exclusiv
39. OMES Misc Be CLICKED 0000 DEF Button3_RELEASED oo0007 0000s END no00g 00010 DEF RadioButton1 CLICKED 00011 00012 END FG Foreground color Ready pesaje 21 TT TT Creating TP Panel Screens 1 1 Overview of Procedures for Creating TP Panel Data The procedure for creating TP panel data consists of the following five basic steps 1 Load editor 1 In WINCAPSIII choose Project Add Program to display the Create new program dialog 2 In Type select Operation panel pnl enter the desired file name and press OK to start the Panel Designer Note To open existing TP panel data double click it in the Program List Mn Create new program Create new program Select kind of program and input Program name Type Template Program Bac O Header h Operation panel pnl Folder Program L o File name SamplePanell pn Create new program Dialog in WINCAPSIII im PanelDesigner Panels File Edit View Tools window Help pesas Belo o S jale2na seovrome e OO HHl eje nue i al x E Layout Panell ia IGE e a sr El C Panel st anell 160 200 24 280 320 360 400 440 480 520 560 600 E Eri 2 zi Property Panel Designer Window for New Panel Layout 2 2 Create panel layout Select the necessary parts from the Parts tool bar and arrange them in the Layout window to create the TP panel scree
40. Prepress Ann eR Re a re ee ne eee ee 106 Chapter 5 Command Reference inicia 107 Si Listor iLP Panel COnmowe OMminMmanGS cui icdenhiadaiencoalcnuaaieaneaisted EA E E EA AT 107 diz Declaration Statements aoa a a a E a E 109 DEFINTA Site men taaan ld incre terete leaned cata ald vanadate ventas luaiiel 109 DERONG Statement nr A a 109 DEFDBL Statements ia loci 110 DEF SIR Statement usei ll A id 110 DERIO StS IN SIN r a aci a io o a ates 111 Do IOW COMO Statements said ade aaa 112 FOR NEXT State Mn A es 112 FEND IF Statements a tie eee deidae a vin evans seeeed eae 113 SELECT GASE Statements ole 114 5 4 Input Output Control StatementS occcocnccccnccocnoconnoconcononcnonnocnnnonannonnnnonnnonononnnnonnnnonannnnnnnnnnnnnnons 115 INAStatementiacas acia lot di a ia 115 OUT Statement nta dies 115 SE I Slate taa iaa aaa 116 RESET MN aid 116 MS GB OX Slemen sssaaa E E a E a hia 117 PAGE CHANGE Statemen aena aa a a A eis avs becca Maes eeeea 117 5 5 Multitasking Control StatementS oocccocnccocnccocnoccnnononcnnnnccnnnocnnnonannonnnnonnnonnnnonannnnnnnnnnnnnnnnanannanans 118 RURA Leal ENE caco acne ats a a tec obo tos nds 118 RIEL Statement aaan a E aa a leven a a E 119 SUSPEND Statement a A Aa iaa 119 gt USPENDAULE Statement ata ii 120 KILEALL State MGM ias 120 CONTINUERUN State Men bis airis 121 DEADIMANSTATE Statemeni errre p a r a a a AA 121 O O MS a a a a a a a ante a ca eet eat 122 OFF BURIT CON Sta
41. WORD and INTEGER Designate a range of 1 bit fora BIT type 8 bits fora BYTE type 16 bits fora WORD type and 32 bits for an INTEGER type lt Port address gt Designates the starting input output port number lt Mask data gt In the case of an input port the AND product set from input data and mask data is taken In the case of an output port the AND product set from output data and mask data is output however the output status of a bit where no mask has been set does not change Related Terms IN OUT SET RESET Example DEFIO sampl BIT 1 Declare sampl as a BIT type I O variable which starts from port 1 The return value of sampl becomes a 1 bit integer of 1 or 0 that expresses the status of port 1 DEFIO samp2 BYTE 10 B00010000 Declare samp2 with mask data as a BYTE type I O variable which starts from port 10 The return value of samp2 becomes an 8 bit integer of 0 or 16 that expresses the status of port 10 DEFIO samp3 WORD 15 Declare samp3 as a WORD type I O variable which starts from port 15 The return value of samp3 becomes a 16 bit integer of 0 to amp Hffff which expresses the status of the ports Brom Lo Eo 30 DEFIO samp4 INTEGER 1 Declare samp4 as an INTEGER type I O variable which starts from port 1 The return value of samp4 becomes a 32 b1t integer of 0 to Hffffffff which expresses the status oit the ports Trom e O lt 32 Notes For WORD and INTEGER a port used as the
42. a Related Terms DEFINT DEFSNG DEFSTR Example DEFDBG Tlax Tady dz Declare ldx ldy and ldz as double precision real type variables DEFDBL lax 1 0 Declare ldx as a double precision real type variable and sets the initial value to 1 0 DEFSTR Statement Function Declare a string variable You can enter 243 characters or less as a character string Format DEFSTR lt Variablename gt lt Constant gt lt Variablename gt lt Constant gt Explanation This statement declares a variable designated by lt Variablename gt as a character string By writing a constant after lt Variablename gt initialization can be done simultaneously with the declaration Multiple variable names can be declared at a time by separating each variable with a comma Related Terms DEFDBL DEFINT DEFSNG Example DEFSTR 1sx 1sy lsz Declare lsx lsy and lsz as character string type variables DEFSTR 1lsx DENSO Declare lsx as a character string type variable and set the initial value to DENSO 110 DEFIO Statement Function Declare an I O variable corresponding to the input output port Format DEFIO lt Variablename gt lt l O variable type gt lt Port address gt lt Mask data gt Explanation This statement declares a variable designated by lt Variable name gt as an I O variable lt I O variable type gt Selects the type of the I O variable The I O variable types include BIT BYTE
43. agenta 6 Brown 7 Light Gray 8 Gray 9 Light Blue 10 Light Green 11 Light Cyan 12 Light Red 13 Light Magenta 14 Yellow active Visible and active 0 Invisible amp inactive Add 1 for visible and 2 for settings active Note that 3 is the only setting producing events CLICKED and RELEASED style Display style 0 2D check box 1 3D check box 2 3D button caption S Display text String max 80 bytes Note Specifying too long a string produces string overlap on the button surface fsize 1 Fontsize 0 Tiny 1 Small 2 Standard 3 Big justify 1 Caption positioning 0 Centered 1 Right justified 2 Left justified e Pt sae romo Key index Function key 1 to 12 Events number CLICKED Timer x and y Upper left corner Position relative to the upper left corner of the Event coordinates drawing region This corner must be within the TIMER teach pendant drawing range group active Group number Group to which part belongs Active setting O Inactive 1 Active Spacing in ms between events interval Illuminated x and y Upper left corner Position relative to the upper left corner of the Push Button coordinates drawing region This corner must be within the Events teach pendant drawing range CLICKED width and Part dimensions in These define the corner opposite the reference RELEASED height pixels corner x y x width y height Negative REFRESH means left or up of the reference co
44. al 3 Robot initialization complete signal in the I O standard mode Robot power on complete signal in the I O compatible mode 4 Auto mode signal 5 External mode signal 6 Dead battery warning signal T Robot warning signal 8 Continue start permitted signal 9 SS mode signal 10 Robot stop signal 11 Enable Auto signal 12 to 15 Reserved 16 Program start reset signal in the I O compatible mode 17 CAL complete signal in the I O compatible mode 18 Teaching signal in the I O compatible mode 19 Single cycle end signal in the I O compatible mode 20to23 Reserved 24 Command processing complete signal in the l O standard mode 25 to 31 Reserved Example 1 1 SYSSTATE Get the system status of robot controller 129 STATUS Function Function Obtain the program status Format STATUS lt Programname gt Explanation This statement stores the program status of the program designated in lt Programname gt using an integer Value tata O Stopping Stopping in progress Suspension in progress 4 Delay in progress Currently pending 6 Step Stopped Step stoppage in progress Example defint lil lil STATUS sampl Assign the program status of sampl to 1il using an integer Notes This statement cannot obtain the status of its own 130 5 10 Preprocessors define Preprocessor statement Function Format Explanation Example Replace a designated constant or macro name in the program with a desig
45. art to a global variable 32 2 2 6 Part Descriptions Step 1 1 Button This part has two events CLICKED and RELEASED Button Example The following example illustrates the procedure for creating two buttons one labeled I O operation that turns I O variable 24 on as long as it is pressed and another labeled Program_run that runs a program Sample pro Create a panel layout with two buttons The buttons can go anywhere within the boundaries of the teach pendant screen All parts not just buttons have a unique name providing read write accesses to part properties from the part itself as well as other parts on the same TP panel The editor uses as its default Button plus a number but the developer is free to change names The following example simply uses the default names Button1 and Button2 a Pirri be ste HP akain E a E Est Y E e ace jji E EX F mb FEL rra AA PE A bor TS ee oe iana Tt i S li T l a Patra Sand ri cael Mes pore elfen i be el a kh q mr Er a tr J a dna Er i E 33 Step 2 1 Label the buttons by changing their caption properties Farms n Fis Edk Ves Tadi Window Hels AAA E ES E ay abl a7t 6 Posa vpojna ae E a Ra La Gh TS ios cag Giplayed best m the component Needy Step 3 Adding action source code A button has separate actio
46. ater 21 2 1 3 Automatically Displaying TP Panel Screens Version 2 31 or earlier oocococnccccnccncnnc 23 2 1 4 Specifying the Close Mode of TP Panel Screen Software Version 2 32 or later 24 2 1 5 Hiding the Shortcut Button Version 2 6 or later occooccccocnccccncoccnconnncnnnnoncnconcnonannnnnnnnos 25 22 SNO A in A ne aseteies 26 2201 PANS ana Ther FUNCIONA Sustancia 26 2 2 2 Specifying Action Source Code for Parts ccooccccoccoconnoccnncnoncconnnnannonannonannonnnonannnnannnnannnnaninos 27 2 2 3 Specifying the RELEASED Event Execution Condition Version 2 32 or later 28 2 2 4 INITIALIZE Event Version 2 32 or later oooccoconcoccncoccnccocnococnoconoononccnnnonannonannonannonanonos 31 2 2 5 DONE Event Version 2 320r later a a a a a eee il 32 220 Part DSS CDOS coitus e a E sed dente 33 2 3 Interfaces with PAC Language and SysSteM c oocccccncoccnccocnccocnoconncnonononnncnnnonannononnnnnnnnnnnonannonannnnaninns 66 2 3 1 Reading and Displaying PAC Variables occooccccocccoccncccnccccnncnononacoconcnonononnnnonnnnonnrnnnaconnnnonos 66 2 3 2 Modifying PAG VanmaDlI Silao 69 ZO Reading WO Stale S seien ena a a a ad te a a 72 ZE OGL AGH UAC S cee het dered 2 ace o R E 74 2 39 Reading Ystemn Statis ti at 76 2A ES A sen E os ezcus dame E E i yesesene 78 24 1 Example Switching In Same Folder ui o a a 78
47. boxes and global string variable 13 to a text box Numeric1 value 1 10 Numeric2 value F 11 Numeric3 value D 12 Textbox1 text S 13 Fie dk View Tecla window ele 15 e Pei is a js 2 MEA ae A ER Hute Panell D 3 Button CLICKED at ES Numencd ree y Perico a ps DEF Button _CLICHED he S0007 HMuneric1 value 1 10 Himeric valioe 1 fat aA Hunerica uslue 1 17 TuxlBox1 texl 3 13 ama BN E HD Step 3 5 Compiling this panel layout and downloading it to the controller produces a display similar to the following when the button is pressed a So 0 menr Joint noro iz 10 55 et td 67 Example Displaying Folder Variables Accessing folder variables in action source code for a button or other part requires first declaring them with EXTERN plus a reserved word DEFINT DEFSNG DEFDBL or DEFSTR indicating the type To access folder integer variable itest for example the action source code must first declare it with the following statement EXTERN DEFINT itest The following example displays a folder variable of each type in a numerical input box or text box for the string when a button is pressed Step 414 Load the editor and place a button three numerical input boxes for displaying the three numerical variables and a text box for displaying the string variable on the panel layout Note that the layout is identical to
48. coconcconnoconnonanccnanconnnnnnnnononnonannnnnnnonnnanananenons 4 a2 ols TO0LBAS aisa aaa ts a tia coa a E a alone oe aee ees hse ote a Sealer ocr 5 12 2 AA 8 SN PODEIS O ee eee eee 9 124 kavout VV IC W a ds a 9 1 2 5 Sotirce Code Edit WINdOW ii is da ca 10 1 2 6 Compiler Messages Panes da 11 A a oo 12 1 3 Creating and Modifying Panel Layouts oocccocncoocnccocnoconncconccnnnccnnnonannononnonnncnnnnonannnnannonnnenannnnnns 14 o o A To re ee eee ee 14 1 3 2 IMOGIEVING AINE AY OUTS sisas iii 14 O20 GChanging Par Properes dto a tear eos dica 15 1 34 Deleting Panel Layouts il ds 15 1 3 5 Importing Panel Layouts from Another TP Panel File oocccoccccoccncccnccccnccncncnncncnncononnnnns 15 Le AQUINO ACION SOUICO Old A va ise ack 16 14 1 Witing ACTON Source Ol ri en a a a E aE 16 1 4 2 Checking Compiling Action Source COdB oooocccoccncoccncoccnccccccncnnoncncnncncnncnnnnnnnnnnnnnnncnnnnnnnnonnnnonos 16 A a E E EN 17 LSA Property SS a A E le aie ateetaies 17 SA cee dee ae ee a ht eel el 17 12020 Acton Source COdG S A ein echoes 18 1 5 4 Sending Data to Controller oocccconccconccconccccnoconnoconocconconancnnnnnnonnononconnnonancnnnncnnnnenannnnnns 18 1 5 0 Important Note on Radio BUON Suicida N AAA 18 Chapter 2 Creating TP Panels crrr aa 19 Zo Configuring TE ACA AAA ed oleo 19 Za Enabling TRA ARCO o caia 19 2 1 2 Specifying the Start Mode of TP Panel Screen Software Version 2 32 or l
49. corner positive right or down fg and bg Foreground and 1 White O Black 1 Blue 2 Green 3 Cyan 4 background colors Red 5 Magenta 6 Brown 7 Light Gray 8 Gray 9 Light Blue 10 Light Green 11 Light Cyan 12 Light Red 13 Light Magenta 14 Yellow O Tiny 1 Small 2 Standard 3 Big Caption positioning 0 Centered 1 Right justified 2 Left justified group active caption fsize justify Lamp x and y Upper left corner Position relative to the upper left corner of the coordinates drawing region This corner must be within the teach pendant drawing range Events REFRESH width and height Part dimensions in These define the corner opposite the reference pixels corner x y x width y height Negative means left or up of the reference corner positive right or down Foreground and 1 White 0 Black 1 Blue 2 Green 3 Cyan 4 background colors Red 5 Magenta 6 Brown 7 Light Gray 8 Gray 9 Light Blue 10 Light Green 11 Light Cyan 12 Light Red 13 Light Magenta 14 Yellow Group to which part belongs Active setting O Invisible 1 Visible Display style 0 2D rectangle 1 3D rectangle 2 2D oval 3 3D oval caption S Display text String max 80 bytes justify Caption positioning 0 Centered 1 Right justified 2 Left justified Note This setting is ignored for style settings 2 and 3 fg and bg group active style 90 Upper
50. creen Mao meer Juimouerejf n Panel Set tip Step 2 Set the first setting to 1 to enable automatic loading and the second path to the folder containing the TP panel screen software Step 3 Test by rebooting the controller Note An error message on the teach pendant screen blocks automatic display 23 2 1 4 Specifying the Close Mode of TP Panel Screen Software Version 2 32 or later The teach pendant provides the following setting for exiting the TP panel screen software Close mode parameter Aieceanode 2 Operation Panel Close Mode SHIFT CANCEL default Pressing the Cancel key with the Shift key held down exits the TP panel screen software 1 SHIFT CANCEL Password Pressing the Cancel key with the Shift key held down and entering the password exits the TP panel screen software The password should be specified with the password entry parameter 3 Mode1 Password 2 CANCEL Pressing the Cancel key exits the TP panel screen software Step 1 Press F6 Set F7 Options F9 Panel to display the following screen Step 2 Step 3 el aii hi a de abra Specify the close mode of TP panel screen software Set the 2 Operation Panel Close Mode parameter to any of 0 to 2 0 SHIFT CANCEL 1 SHIFT CANCEL Password Proceed to Step 3 2 CANCEL If the Operation Panel Close Mode parameter is set to 1 enter an arbitrary password to the 3 Mode1 Password parameter
51. ctive Visible and active O Invisible amp inactive Add 1 for visible and 2 for settings active Note that 3 is the only setting producing events CLICKED and RELEASED E 1 CCE TI ooro fsize 1 Fontsize 0 Tiny 1 Small 2 Standard 3 Big justify 1 Caption positioning 0 Centered 1 Right justified 2 Left justified Group x and y Upper left corner Position relative to the upper left corner of the coordinates drawing region This corner must be within the teach pendant drawing range width and height Part dimensions in These define the corner opposite the reference pixels corner x y x width y height Negative means left or up of the reference corner positive right or down fg and bg Foreground and 1 White 0 Black 1 Blue 2 Green 3 Cyan 4 background colors Red 5 Magenta 6 Brown 7 Light Gray 8 Gray 9 Light Blue 10 Light Green 11 Light Cyan 12 Light Red 13 Light Magenta 14 Yellow a 1 Soup rater Group which panbeongs O Pee 1 Active sing 0 iio Viable Hfsize I Fontsize O Tiny 1 Small 2 Standard 3 Big justify 1 Caption positioning 0 Centered 1 Right justified 2 Left justified Fitness 1 une ikness The 0 seting produces a ne wih of2 e Li Group number numerico oup O 93 Check Box x andy Upper left corner Position relative to the upper left corner of the Events coordinates drawing region This corner must be within the CLIC
52. currence of errors 1 Workaround 1 With the supervisory task mode or its extension being enabled run the following supervisory task that causes a fail safe operation that is turn I O 128 off if an error occurs Refer to the SETTING UP MANUAL Chapter 3 Sections 3 4 10 and 3 4 11 Program TSR1 DEFINT ERRCODE INITWAITERR Initialize WAITERROR data WHILE 1 ERRCODE WAI TERROR Wait until an error occurs IF GETERRLVL ERRCODE gt 1 If Level 2 or higher error occurs RESET 10 128 turn 1 0 128 off as fail safe operation INITWAITERR Initialize WAITERROR data ENDIF WEND END 2 Workaround 2 Use a supervisory task that monitors the deadman switch Enable switch state and add such a process that turns l O 128 on or off when the deadman switch is pressed or released respectively Accordingly if an error occurs releasing the deadman switch causes a fail safe operation turn I O 128 off 3 Workaround 3 Modify the program to turn l O 128 on for the specified time length when the push button is pressed and to cause no change when the push button is released This produces inching like motion Also change the PRINTMSG and PAGE CHANGE commands to turn I O 128 on or off when the switch is pressed or released respectively 30 2 2 4 INITIALIZE Event Version 2 32 or later The INITIALIZE event can be added to each panel It is used to initialize the TP panel layout The INITIALIZE event will be called wh
53. date Format DATES Explanation This statement stores the current date in the following format yyyy mm dd year month day Related Terms TIMES Example defstr lsl lsi DATES Assign the current date to lsl TIMES System Variable Function Obtain the current time Format TIMES Explanation This statement stores the current time in the following format hh mm ss Time minute second Time is displayed using the 24 hour system Related Terms DATES Example defstr lsl lsl TIMES Assign the current time to Isi 125 TIMER System Variable Function Obtain the elapsed time Format TIMER Explanation This statement obtains the elapsed time measured in milliseconds from the time when the controller power is ON 0 Note If the elapsed time exceeds 2147483647 milliseconds the elapsed time will be displayed from 2147483648 milliseconds Example DEFINT lily iZ LES 111 TIMER Assign the elapsed time from the reference time to lil 126 5 8 Character String Functions STRS Function Function Convert a value to a character string Format STR lt Expression gt Explanation This statement converts the value designated in lt Expression gt to a character string Related Terms CHR SPRINTFS Example DEFSTR 1s1 1s2 ls1 STRS 20 Convert 20 to a string and assign it to Isl 152 STRS 111 Convert 111 toa string and assign 1t to Ls2 CHRS Function Function Convert
54. directly updating that value This part has CLICKED and RELEASED events similar to those for buttons Note In Version 2 32 or later the DONE event is added to this part For details see Section 2 2 5 DONE Event Numerical Input Box Example Step 1 Load the editor and place a numerical input box on the panel layout Optional Specify an initial value E Penclinangren Pak Pl lis a 5 E Na Pia ra ee rn A ed De ee ee et EE E Paes ee aq Tyi ht eres ot th Wer opat te i Step 2 Adding action source code The procedures for adding action source code are the same as for buttons 45 Step 3 Changing numerical input box properties In addition to the color position and other properties that this part shares with buttons it has the unique properties of a floating point value value and display format decimal or hexadecimal style This example uses a button press on the same screen to read global string variable 10 into a text box and store that value in global string variable 11 Load the editor and place a numerical input box and button on the panel layout Open the Source Code Edit window select Button1 and CLICKED to create the action source code skeleton and add the following lines The procedures for accessing properties are the same as for all other parts He Ty Soke ees ha a E Fa To fas Hp 53 PA A MAR ear gees a a na a op la
55. e 1 2 4 Layout Window This window is for designing teach pendant TP panel screen software by placing parts on this screen and then adjusting their positions and sizes with the cursor keys or rubber band drag operations Clicking on the Display source code icon displays the corresponding Source Code Edit window Display source code icon ls Lapout Panel i i A i a fs a E pul m Y in Esu heed i Layout window client area Layout Window 1 2 5 Source Code Edit Window This window is for assigning action source code to events associated with the parts on the current panel layout 1 Source Code Edit window tool bar 2 Part list box 3 Event list box EA er METE uttan l lt DEF Buttoni CLICKED gt Action when Buttoni is clicked 00004 set 10 128 O00 run PROV66 Oboe run PRO116 OOOO run PR01280 00008 END ogona 00010 DEF Buttoni _RELEASED 00041 Action when Buttoni is released 00012 reset 10 128 GOO TS kill PRO166 00014 kill PROW16 000415 kill PRO128 000016 END D004 7 4 Action source code block Hz Source Code Edit Window 1 Source Code Edit window tool bar REFRESH al 10 dh Name Deseo ae Layout window Display the corresponding panel layout Indent Shift the selected lines one tab position to the right Outdent Shift the selected lines one tab position to the left Comment out the selected lines Undo comment block
56. e layout is identical to that for the global variable example above Open the Source Code Edit window and add the following action source code for when this button is pressed This example copies integer ITEST float FTEST and double DTEST to numerical input boxes and string STEST to a text box EXTERN DEFINT ITEST EXTERN DEFSNG FTEST EXTERN DEFDBL DTEST EXTERN DEFSTR STEST ITEST Numeric1 value FTEST Numeric2 value DTEST Numeric3 value STEST Textbox1 text E Same are EA PRE ve SY oo MOS AA 115 MAS MAR ee Berna CE ET DEF Hutton CLICKED EXTEHA DEFIA PIES FATFRH DEFEAT FTFST CATCRH DEFDOL DTEST ESTERM DCFSTR STEST TESI Hone ict valor FETER T Hineric ui Lir BDIEST Hurerici valur a S5TIEST TextBox1 text OO a END Cirmi l ing al PANELCONPILER 1 0 0 C 4 My Documents i anels prnl Complete Errors U Warnings U Teod EH TESFST a 71 2 3 3 Reading I O States A TP panel can read robot controller I O states via global I O variables or local I O variables declared with DEFIO We postpone discussion of the latter to the local variable description below Example Using Global I O Variables Accessing a global I O variable uses array notation with the array name IO This example monitors global I O variables 24 to 27 with lamps updated at regularly scheduled intervals Load the editor and place four lamps on the panel layout Step 1 Te is
57. e operation for a group of radio buttons 9 Function key Configures a teach pendant function key F1 to F12 for use as a push button 10 Timer Triggers action source code at a fixed interval 10 not shown below 11 Displays a straight line 11 12 Displays a circle or oval 12 13 Rectangle Displays a square or rectangle 13 Illuminated push Combines push button and pilot lamp operation button not shown below Sample TP Panel Screens 8 Group 7 Radio buttons 6 Check boxes jar A 2 Label o e a e A y Ad EA 5 Textbox _ EZ 13 Rectangle 4 Numerical input box E a A PE AE A SPW cdl in Rand A ir z E UU Gh u 1 Button rn ya y 9 Function keys ne p 3 Pilot lamp 11 Line 12 Oval 26 2 2 2 Specifying Action Source Code for Parts A parton a TP panel screen responds to button presses and other events by executing action source code that reads or modifies part properties and performs other operations Action Source Code Syntax An action source code block has the following structure DEF object_event desired operations END Selecting an object and an event in the editor automatically generates a skeleton consisting of the first DEF and last END lines The developer needs only supply the source code specifying the desired response The table below lists the possibilities Note The events available depend on the part type CLICKED Bu
58. ed by lt l O variable gt to OFF BIT port 240 tor ON BIT port 241 to ON for 40 ms port specified by I O variable SOLL to ON BIT ports 104 o LLO TO ON BIT ports 10 Tto 1 0 To OEF port specified by I O variable SOL1 to OFF BIT ports 104 to 110 CO ORF 116 MSGBOX Statement Function Display message screen Format MSGBOX lt message_string gt Explanation This statement displays the specified message up to 60 characters long on the teach pendant s color LCD screen Related Terms MSGBOX Hello World Notes This statement does nothing in a CLICKED event source code block for parts numerical input box and text box using pop up windows PAGE CHANGE Statement Function Display the specified TP panel Format PAGE CHANGE lt panel_name gt lt folders_up gt where lt panel name gt TP panel to display on the teach pendant s color LCD screen lt folders_up gt Number of folder levels to step up to reach the folder containing the specified TP panel Explanation This statement displays the specified TP panel on the teach pendant s color LCD screen Example page change panell Display specified TP panel page change panell 2 Move up two folders and display panell in that folder 117 5 5 Multitasking Control Statements RUN Statement Function Format Run another program concurrently RUN lt Programname gt lt Argument gt lt Argument gt lt RUN option gt Explanati
59. el Discard new entry es ETT 19 Step 2 Type the password 1453 and press the OK button to display the list of additional functionality available Step 3 1 Press the OK button to return to the top screen and confirm that the F5 label now reads Panel Press F5 Panel to start the TP panel screen software Note Enabling TP panel operation disables the RC5 compatible TP panel operation assigned to F9 20 2 1 2 Specifying the Start Mode of TP Panel Screen Software Version 2 32 or later Note For Version 2 31 or earlier see Section 2 1 3 Automatically Displaying TP Panel Screens The teach pendant provides the following setting for specifying the start mode of TP panel screen software The four choices of the start mode parameters are available by the combination of what starts TP panel screen software booting the controller or pressing F5 Panel and which TP panel screen appears first as listed below Start Mode of TP Panel Screen Software Path of TP panel Start mode screen that parameter should appear a What starts TP panel screen software R k emarks 0 Panel Start first b Which TP panel screen appears at the start Setting 1 Start Panel Path a Pressing F5 Panel b Current directory of the Program List To be specified a Booting the controller Select this parameter b TP panel screen specified by Start Panel to run TP panel Path screen software when the controller
60. en any of the following conditions arises 1 When pressing F5 Panel starts the TP panel screen software 2 When booting the controller starts the TP panel screen software 3 When the PAGE_CHANGE command switches the TP panel screen Selecting the INITIALIZE event automatically generates a skeleton consisting of the first DEF and last END lines as shown below DEF Panel_INITIALIZE END Select a TP panel file Select INITIALIZE event H Action source code block Flesh out the skeleton with action source code Step 1 Select a TP panel file and the INITIALIZE event only becomes available Step 2 l Note The PAGE_CHANGE command cannot be used for this source code 31 2 2 5 DONE Event Version 2 32 or later The DONE event is added to the Numerical input box and Text box Pressing the OK button on the numerical input box or the text box executes the DONE event Pressing OK executes the DONE event Pressing CANCEL produces nothing Example Numerical input box Step 1 Select one of the numerical input boxes and select the DONE event The action source code block in the following skeleton will be executed DEF NB1_DONE END Select one of the numerical input boxes Spt gar Select DONE a Eil tl A event yl The action source code block executes DONE event example IO NB1 Value In this example pressing the OK button sets the property value of the selected p
61. er ida _ i ences DEF Duttoni_CLICKED 3 Soco DEFINT COUNT ZEROCOUNT 0 00004 22009 FOR CUUHI 0 MI YY MELO IF T CHH T 0 THEM soy 7EROCOUMT 7FROGCOUNT 1 apos EMD iF 5o05 HEXT BODIO NUMERIC VALUE ZERUCUUNI 26011 FHI mina Compiling PANELCOMPILER 0 0 Cy DocunentsiPanels1 phl Complete Errors a warnings ij Compile the panel layout download it to the controller and test 84 2 6 Local Variables The TP panel control language supports local variables of type integer float double string and I O Declaring a variable inside an action source code block makes it local that is accessible only that block DEF Button1_CLICKED DEF Button1_ CLICKED DEFINT COUNT ZEROCOUNT 0 FOR COUNT 0 TO 99 IF COUNT 0 THEN Valid range for COUNT and ZEROCOUNT ZEROCOUNT 1 _ ZEROCOUNT END IF NEXT NUMERIC1 VALUE ZEROCOUNT END Example Using Local Variables The following example copies global variables into local ones when a button is pressed manipulates the local variables and copies the results back to the original global variables Step 1 Load the editor and place a button on the panel layout 85 Step 2 Open the Source Code Edit window and add the following action source code for reading global integer variable 10 into a local integer variable multiplying it by 10 and writing the result back reading global float variable 10 into a local float variable
62. er key combination to insert a line break in multiline text Foreground color Specify these colors with the list box bg Background color 0 Super small 1 Small 2 Medium 3 Large justify Caption positioning 0 Center 1 Right justified 2 Left justified Note The 0 setting produces flood fill state value text index interval Interval A single timeout property per TP panel file can be defined release mode RELEASED event Applicable when no button line or any other parts are selected execution condition A single release mode property per TP panel file can be defined Version 2 32 or later 1 5 2 Event List The Event list box is for selecting a CLICKED RELEASED or other state change event associated with the part Note The events available depend on the part type CLICKED Button pressed RELEASED Button released 17 1 5 3 Action Source Code Syntax Action source code blocks consist of two kinds of statements 1 TP panel control commands Chapter 4 gives TP panel control language syntax Section 5 1 List of TP Panel Control Commands 2 Read write access to part properties Note The properties available depend on the part type Such accesses use the standard dot notation part_name property Example 1 Reading the current state for radio button RadioBtn DEFINT State IState RadioBtn State Example 2 Setting button width to 200 Button Width 200 1 5 4 Sending Data to Controller U
63. es NEXT Repeat 112 IF END IF Statement Function Conditionally decide a conditional expression between IF END IF Format IF lt Conditional expression gt THEN ELSEIF lt Conditional expression gt THEN ELSE END IF Explanation The execution of a program is controlled with the condition of lt Conditional expression gt If lt Conditional expression gt of an IF statement is true except for 0 then the statements between the IF ELSEIF statement are executed If the lt Conditional expression gt is false 0 then lt Conditional expression gt of an ELSE IF statement is decided In the same manner as this ELSEIF ELSE and ELSE END IF are executed Related Terms IF THEN ELSE Example DIM 1il As Integer IF lil O THEN When lil is 0 PAGE CHANGE PANELI move to PANELI ELSEIF lil 1 THEN When lil is 1 PAGE CHANGE PANEL2 move to PANEL2 ELSEIF lil 2 THEN When lil is 2 PAGE CHANGE PANEL3 move to PANEL3 ELSE When lil is any other value PAGE CHANGE PANEL4 move to PANEL4 END IF Declare the end to the IF statement 113 SELECT CASE Statement Function Format Execute a plural condition decision SELECT CASE lt Expression gt CASE lt ltem gt lt ltem gt CASE ELSE END SELECT Explanation This statement executes a series of instructions after CASE if the value of lt Expression gt matches lt ltem gt of the CASE statement An arithmetic expression or cha
64. ewon A fouicxeD 00001 00002 DEF Button1_CLICKED 3 7 DODO 3 Visible and Enabled 00004 END Style 1 Rectangle 3D 00005 Caption I 0_operation Justify 37 Step 10 f Type in the source code as shown below a Pala rd ll dia Se PEF MutEond_ELIEXED y mam za Suttent fg yel low Hakea Foregruusd color wel low Ta Di suttent ig rr fakes bacigroumi colur red E futtent caption Changes ception to Fressed 5 Buttent utteut ee 6 loves position by 48 dots to right side FG Sutton y Button gee fous position by 4A dba fowmemres o oe He refresh heirpeahes utteni ES Cun ling 3 PAM COMPILER 4 0 0 PE shy Botines Pires pl Complete ferora O Warnimga i sjaj Nimh MEAE Step 111 Save the edits compile the file and download the results to the controller as before Sg oa mer Jint HoT ol 11 TP Panel Screen with Button Pressed as al E mems ant 38 Step 1 2 Label This part simply displays text It supports no events so does not accept action source code Label Example The following example shows how pressing a button on the same screen can change label properties Load the editor and place a label and a button on the panel layout pl Cos pri TTT Fa i y sl gt 300 L 4 E Bi B la AE J a ra a 2 pi 1 cj ES an i pos a a a BD lot ets LA i a tl i ae ie ee ee I i E ie eD dl ay A ee a
65. g the parameter applies to all parts containing the RELEASED event 28 2 2 3 2 Notes on using the RELEASED event The RELEASED event cannot be executed if any other screen appears on the current TP panel screen The following example using the push button shows the detail E What blocks the execution of the RELEASED event If any of the following conditions arises when the push button is being pressed the RELEASE event cannot be executed 1 When an error occurs 2 When the PRINTMSG command displays the message 3 When the PAGE CHANGE command switches TP panel screens using the timer If blocking the execution of the RELEASED event with the above conditions raises a problem use a workaround in your program as shown on the next page Push button beina pressed If any of the following conditions arises releasing the di push button does not execute the RELEASED event 1 When an error occurs a Q me ACTO o 3 When the PAGE_CHANGE command switches TP panel screens using the timer buol ms lado n 29 E Program example requiring a workaround The program example given below turns l O 128 on only when the push button is being pressed so it requires a workaround While l O 128 is on the external equipment operates Only when the push button is being pressed I O 128 is on Program example DEF PB1 CLICKED set 10 128 END DEF PB1 RELEASED reset 10 128 END E Workarounds to the oc
66. he real variable ENDIF 122 PI Built in constant Function Set a x value Format Pl Explanation This statement returns a double precision value of r Example IF 11 TRUE THEN Set the Boolean value to true 1 EE OM Set ON 1 to the integer variable ELSEIF 11 FALSE THEN Set the Boolean value to true 1 11 OFF Set OFF 0 to the integer variable ELSE DI PI Assign m to the real variable ENDIF FALSE Built in constant Function Set a value of false 0 to a Boolean value Format FALSE Explanation This statement sets a value of false 0 to a Boolean value in an expression Related Terms TRUE Example 1F 11 TRUE THEN Set the Boolean value to true 1 11 ON Set ON 1 to the integer variable ELSEIF 11 FALSE THEN Set the Boolean value to true 1 11 OFF Set OFF 0 to the integer variable ELSE D1 PI Assign m to the real variable ENDIF 123 TRUE Built in constant Function Set a value of true 1 to a Boolean value Format TRUE Explanation This statement sets a value of true 1 to a Boolean value Related Terms FALSE Example 1F 11 TRUE THEN Set the Boolean value to true 1 TA ON Set ON 1 to the integer variable ELSEIF 11 FALSE THEN Set the Boolean value to true 1 11 OFF Set OFF 0 to the integer variable ELSE DLS BT Assign m to the real variable ENDIF 124 5 7 Time Date Control DATES System Variable Function Obtain the current
67. ically generates the corresponding 3 line action source code block skeleton on the editor screen Example Skeleton action source code block for pressing Button1 DEF Button1 CLICKED END 4 Add action source code Flesh out the skeleton with action source code Example Action source code block for pressing Button1 Example Action source code block for pressing Button DEF Button1 CLICKED Set 1O 128 turn I O variable 128 ON Run PRO100 run PRO100 Run PRO200 run PRO200 END 1 4 2 Checking Compiling Action Source Code Compile the action source code just written to check for syntax typing or other errors Progress and other messages from the compiler appear in a pane near the bottom of the main editor window Double clicking on an error message displays the corresponding source code in a Source Code Edit window 1 5 Miscellaneous 1 5 1 Property Lists The following table lists the position size and other properties that can appear in the Properties pane Note The list displayed in the Properties pane depends on the part type x coordinate Reference position relative to the x and y axes within the teach pendant screen s drawing range Width in pixels relative to the reference corner x y Group number to which the part belongs Active inactive setting Select with the list box Display style Select with the list box caption Display string String to display on part surface Note Use the Ctrl Ent
68. ies for modifying the parts name color and other properties 1 3 4 Deleting Panel Layouts Select the panel layouts to delete on the Parts Tree pane and press the Delete panel button 1 3 5 Importing Panel Layouts from Another TP Panel File Use the following procedure to import panels from another TP panel file with extension pnl 1 Use the File Import menu command to specify the source TP panel file 2 Select the panel layouts to import from the list for the file and press the Import button to add them to the Parts Tree pane 1 4 Adding Action Source Code A Source Code Edit window is for specifying the events to take in response to a CLICKED RELEASED or other state change event associated with the corresponding part on the panel layout 1 4 1 Writing Action Source Code 1 Open the Source Code Edit window Use one of the following methods to open the Source Code Edit window for the part 1 Double click on the part in the Layout window 2 Select the part in the Layout window and press the Display layout button 3 Select the panel layout on the Parts Tree pane make sure that the Source form button is pressed and press the Display panel button 2 Select the part Check whether the part appears in the Part list box at the top of the Source Code Edit window If it does not select it with the list box 3 Select the event The Event list box gives the events available for the selected part Selecting one automat
69. ight Cyan 12 Light Red 13 Light Magenta 14 Yellow active Visible and active O Invisible inactive Add 1 for visible and 2 for settings active Note that 3 is the only setting producing events CLICKED and RELEASED style 1 Display style 0 2D 1 3D Display text String max 80 bytes fsize Font size O Tiny 1 Small 2 Standard 3 Big justify a Caption positioning 0 Centered 1 Right justified 2 Left justified value EN Input value Equivalent to variable of type double 91 Upper left corner Position relative to the upper left corner of the coordinates drawing region This corner must be within the teach pendant drawing range Part dimensions in These define the corner opposite the reference pixels corner x y x width y height Negative means left or up of the reference corner positive right or down Foreground and 1 White O Black 1 Blue 2 Green 3 Cyan 4 background colors Red 5 Magenta 6 Brown 7 Light Gray 8 Gray 9 Light Blue 10 Light Green 11 Light Cyan 12 Light Red 13 Light Magenta 14 Yellow Group to which part belongs Active setting O Invisible 1 Visible Display style O Solid line 1 to 7 Dash dashed line 8 to 14 Dash double alternate long and two short dashed line Line thickness The O setting produces flood fill Upper left corner Position relative to the upper left corner of the coordinates drawing region This corner must be within
70. il ae eae ee a 39 Step 2 Changing label properties The label properties for display text color font size and character position support read write access using the standard dot notation part_name property Changing the display text for the part named Label1 to Off requires the following line Label1 caption Off Changing the foreground color to yellow the background color to brown the font size to big and the character position to left justified requires the following lines Label1 fg yellow Foreground color Yellow Label1 bg brown Background color Brown Label fsize 2 Font size Big Label justify 2 Character position Left justified Add the above to the skeleton created in the Source Code Edit window for pressing Button1 Lo E z EN Fama aair higi EF e A a kal y F Hd rived Wt tr a E 3 kT ia Sure Fare o Z CUCKED E are i ain L i SPS EF Matton LIKED 9 EXA abel caption nFF oi Labeld fg yellow S55 Label bg brown Ct Label1 Fsize 2 0507 Labeit qustiry 4 CEC FAD CALA 40 Step 35 Compiling this panel layout and downloading it to the controller produces the following display when the button is pressed Before pressing button After pressing button 41 3 Pilot Lamp This part has two display states ON and OFF and generates REFRESH events at regularly scheduled intervals to allow visual monitoring of some state Lamp Example The fo
71. ing I O DEFIO Declare an I O variable corresponding to the input output port Flow Control Statements Repeat FOR NEXT Repeatedly execute a series of instructions between FOR NEXT sections Conditional Branch IF END IF Conditionally decide a conditional expression between IF END IF SELECT CASE Execute a plural condition decision Input Output Control Statements I O Port IN Read data from the I O port designated by an I O variable OUT Output data to the I O port designated by an I O variable SET Set an I O port to ON O O RESET Set an I O port to OFF TP Panel MSGBOX Display message screen PAGE CHANGE Display the specified TP panel O O Multitasking Control Statements Task Control RUN Concurrently run another program O O KILL Forcibly terminate a task O O SUSPEND Suspend a task O O SUSPENDALL Suspend all running programs except supervisory O O tasks KILLALL Forcibly terminate all tasks except supervisory O O tasks CONTINUERUN Continue run tasks O O DEADMANSTATE Obtain the current deadman switch state Constants Built in Constants OFF Set an OFF 0 value ON Set an ON 1 value P Set a n value FALSE Set a value of false 0 to a Boolean value TRUE Set a value of true 1 to a Boolean value Time Date Control Time Date DATES Obtain the current date O O TIMES Obtain the current time TIMER Obtain the elapsed time
72. ing action source code The property state gives the lamp s current state just as it does for lamps and check boxes Illuminated Push Button Example Load the editor and place the button just as you would with a regular button Changing illuminated push button properties The following example uses illuminated push buttons to run a program and display an I O state Pressing this button runs a program in the same folder This program waits two seconds and then turns IO 24 on The lamp in the button tracks IO 24 Add the necessary parts to the panel layout ECT Ra E a E ios rc es FA a NOO n alo 64 Step 3 Adding action source code This part supports three events for adding action source code CLICKED RELEASED and REFRESH This example uses only two Ibutton1 state io 24 copy 1O 24 state into Lightbutton1 w PanelDesigner Panels1 File Edit View Tools Window Help y 4 gt gt 000041 00002 DEF LButton1_CLICKED 00003 run PRO1 00004 END 00005 00006 DEF LButton1_REFRESH 00007 LButton1 state 10 24 00008 END 00009 Caption Displayed text in the component eh rT TT Step 4 Write the program to run using WINCAPSIII all prol_pac 4 TITLE TP Panel Sample 2 PROGRAM prol 3 delay 000 4 set iolz4 5 end Ei Compile this and the panel layout download them to the
73. ion sets forth the TP panel control language s rules Names representing commands and variables must comply with the following rules e Names consist of letters digits and underscores The first character must be a letter Note that there is no distinction between upper and lower case e The following characters cannot be used in identifiers period slash backslash space colon semicolon single quote double quote and asterisk e Certain characters are used as operators so cannot be used in identifiers etc e A space or other delimiter must separate a name from other words on either side e The maximum permissible length for a name is 64 characters 8 3 3 Identifiers and Variables 3 3 1 Variables Variables represent temporary storage for data There are global variables local variables and for TP panel parts object properties A global variable is accessible from all TP panel files A local variable is accessible only within the program defining it Another program running concurrently may define its own local variable with the same name but the two never interact because they are considered entirely separate variables An object property is accessible only within the TP panel file defining the object part The following figure illustrates the relationships between parts objects and programs TP panel file max one per folder Data for TP panel 1 Data for TP panel 2 Program 1
74. lder at the top of the directory tree structure applies Note 1 The 1 Start Panel Path parameter can only specify a path If more than one TP panel screen is defined the one that is located at the top when complied with Panel Designer will be displayed at the start of TP panel screen software Pressing this changes the order of TP panels The TP panel at the top of the directory tree structure appears when the controller boots Note 2 After the teach pendant panel screen is switched to a different one located in the Start Panel Path or in the current directory of the Program List with the PAGE CHANGE command exiting from the TP panel screen software and restarting it calls up the last TP panel screen However after the teach pendant panel screen is switched to a different one located in the path other than the Start Panel Path and the current directory of the Program List doing the same calls up the TP panel screen located in the Start Panel Path or in the current directory of the Program List just as when the controller boots 22 2 1 3 Automatically Displaying TP Panel Screens Version 2 31 or earlier Note For Version 2 32 or later see Section 2 1 2 Specifying the Start Mode of TP Panel Screen Software The teach pendant provides the following setting for automatically displaying TP panel screen software when the controller boots Step 1 Press F6 Set F7 Options F9 Panel to display the following s
75. llowing example uses a lamp to monitor an I O state Load the editor and place a lamp on the panel layout Step 1 Pamclilinangne Pao in af n M a Ta Ex j ETIS E a ar 243 E A NE trai Boia de bo a a a re bat te keas edi a p es E oe g a ler a a ak oo IE le mare Coronet ane 42 Step 2 Adding action source code This part generates REFRESH events at regularly scheduled intervals Use these to visually monitor I O variable 25 by turning the lamp ON and OFF as appropriate In the Source Code Edit window select the lamp s REFRESH event and add the following line to the skeleton automatically created This statement means update the lamp state from the IO 25 state t P Er itt mgen Al ba gi pe n i B 5 SCL Parr fil Ih a in eae vee 2 DEF LightBultowt REFRESHC Ses Lightbuttent state 10 25 jf 20504 EHD eke Conplling PAHELCUMPILER Tatali Es AMy PocumentsiPanels1 pni Complete Error 4 Mernings 43 Step 31 Compiling this panel layout and downloading it to the controller produces the following displays Lamp on Lamp off Step 4 Changing lamp properties The procedures for accessing properties are the same as for all other parts 44 4 Numerical Input Box This part is a button that displays a numerical value Pressing this button switches the pendant operation screen to ten key pad input for
76. n For further details see Chapter 2 Creating TP Panels Parts tool bar Layout window fim PanelDesioner Panels ih a Fj rA Ta TA A mo of e oe fre Ed a m ER i mMmAalemd ka I eT Fi hi at FIA A a z 2 Panell a HA g a TY Lp JAPE A fold le A i p A i er o 0 iz kh me gt s iio r a Lo as a EN 3 Edit action source code 1 Click the Display source code icon in the Layout window to display the Source Code Edit window 2 Add to the Source Code Edit window the action source code for when the part is pressed For further details see Section 2 2 2 Specifying Action Source Code for Parts Display source code icon Source Code Edit window Panel esiques Panel I ere ty ET rara Fie Edi fil Re E Ti Ha J A i ii Ml ME oe de A Wel e 7 Lui E Sr amp Fi Ae oo mel Ait pul E dl ment Ete LA gt T g tee en A if age A aa lich FS aa ato e Y a un 7 F Pa e itara n J AE pre m r T a APA el iain Lori TF p EE i r F a i e sw i F gt i i it 1 FE Mae ls A EN pur Ji E a i p E 1 me La elt be Fa mit TF d a i ire Loc oP int aa f n TF j p E hi T i l pg g 4 A ii am a y e j 5 gt ln i _ 7 me a EY nee i E s z a E al A e AAA rt sil ya i E A a 3 i gt i pe ee g li NE
77. n group number 0 to Group1 and 1 to Group2 di Panchi rio Ea eee w Pa ee o E be ae El pod 24 HE E E 1 de abl azl A ca s Cry SS uO 2140 E Ea Layuul Pannell EE Ef fou E houpa Gi Falo E Madonna Ef Smeri E Faded Ad a Rad Bulton O Arihi El Redobumor E Aninha Fo RadtoButtons ia RadoButtons Foie ef f Cenber Step 3 L Set the property group for all radio buttons to the group number for the group to which they belong to ensure mutually exclusive operation within the group pa a Panett Flo Edo sd Teali lidia Halo a A A wie 3 t Eg ity 22 i aba ile HOE NER a abil IF Foo O0 Bin 6 8 Naot m T Pinell E E bes EEE E Gra E Dioui Gi Hahok E Madonna Et EILE t an aE E Anini RadioButton D RadioButton Foie E dry f Zenl Thickress 96 Step 1 9 Function Key This part resembles buttons in assigning captions to pendant function keys and action source code to function key presses but it lacks the position properties of other parts because the pendant function keys have fixed positions specified by number index Note In Version 2 32 or later the RELEASED event is added to this part Function Key Example Load the editor and place the function key anywhere on the panel layout in the Layout window Note h
78. n source code blocks for the events CLICKED and RELEASED The following example shows how to add action source code for these two events Double clicking the button labeled I O operation opens an empty Source Code Edit window Parada Fie El View Todi Window itep A JE gt E NE A O i my a 7 te E 7 i qe an oy Parent Ed Baer i Suuman gt P ll zo aunan aaa Tet E 3 visible and Enabled HN re He aie A Io eur chine Fan 12 Just Q Conte lo agitan played best i the component ii AAA 34 Step 4 Start by adding action source code to turn I O variable 24 on when the button is pressed Selecting the combination Button1 and CLICKED from the Part and Event list boxes at the top of the Source Code Edit window automatically generates the corresponding 3 line action source code block skeleton on the editor screen ga i ee a e am eu ar Bi Ti er raed bear i a J ie wig pare ite ao Too een UEF Button _CLICKED ooo EMI E Ss cece p r Putton CLICKED Moe PRA L or att do 128 Elgual 1 0 24 turns ON 35 Step 6 Similarly add action source code to turn I O variable 24 off when Button is released RELEASED and to run a program Sample pro when Button2 is pressed CLICKED Panor P A SE cece DEF Buttont CLICKED pea 3 Wadi are tnt 3 ee at iof24 Signal t70 24 tur
79. nacida 122 ON BUMM Costa nido ia 122 PNB UIIMCONS IAN aprene iia 123 FALSE BUIN IMMCOMStAINY ia 123 TRUE BUIN COMS LANL italia aida 124 Out lime Date CONTO dai tdi an ciao e ranas dictds 125 DATES System VENADO aa as 125 TIMES System Variable tetra a odo odode is 125 TIMER System VANDI OC limpias a oa 126 5 0 Character SPNO FUNCION Sidi e 127 o A loess ig tare ene eee acs se castes mance oedema eiaaaassteas 127 CHRO CUA IOI Saas tse re societal a el dedo 127 SPRINTES FUNCION dec mate id ii Seer wa he cto one ion iii 128 9 9 SYSTEM IMTORMAUON iS 129 GUROPEMODE Statement sist ins id 129 SS MATE State Men dle 129 STATUS FUNCION ica A 130 A mn PP e ee aE a a aal 131 POSTING Preprocessor SIalEMONl ii ii 131 include Preprocessor SAME io 132 Chapter 1 Panel Designer Overview WINCAPSIII includes the Panel Designer a teach pendant editor for creating teach pendant TP panel screen software by simply arranging parts on the computer screen and then specifying action source code for the events associated with them This chapter outlines the procedures involved W PanelDesigner Panels1 pnl File Edit View Tools Window Help Pe El O Panels B m Panell ES Labell 13 Groupl 2 RadioButton i pa G RadioButton 9 LighiButtor 3 LightButton2 23 LightButton3 23 Button os Gg Button 9 Button e 13 Linel Condition E G pti an 1 S Optione El Property Paneli ES C
80. nated character string define lt Symbol constant gt lt String gt or define lt Macro name Argument gt lt Argument included character string gt This statement replaces lt Symbol constant gt or lt Macro name gt in the program with a designated character string In the case of a macro name it is replaced with the arguments already included lt Symbol constant gt or character strings of lt Macro name gt in not replaced double quotations are You must describe the define statement on one line You must place 1 or more space characters between lt Symbol constant gt and lt String gt Do not place a space between a macro name and the parentheses of an argument lt Symbol constant gt and lt Macro name gt must be within 64 characters You can use a maximum of 2048 macro names in one program There is no limitation to the number of macro function arguments you may use DEFINE NAME Denso Corporation Assign DENSO Corporation to the symbol constant NAME S1 NAME ASS iG DENSO Corporation to Sl 131 include Preprocessor statement Function Fetch the preprocessor program Format include Path filename include lt Path filename gt Explanation This statement fetches the preprocessor program file at a position where the include statement is placed In the case of if the path of the file is ignored the system searches for the file in the current directory first and then the system
81. nings 4 Compiling this panel layout and downloading it to the controller produces the following displays Before button press 62 Step 1 Step 2 Step 1 Step 2 12 Oval This part draws an oval with the specified pattern on the panel layout The parts line oval and rectangle are for drawing only They support no events Nevertheless other parts on the same screen can still change their properties Oval Example Load the editor and place an oval on the panel layout Changing oval properties Like all drawing parts the main properties here are line type style and line thickness thickness The procedures for accessing properties are the same as for all other parts 13 Rectangle This part draws a rectangle with the specified pattern on the panel layout The parts line oval and rectangle are for drawing only They support no events Nevertheless other parts on the same screen can still change their properties Rectangle Example Load the editor and place a rectangle on the panel layout Changing rectangle properties Like all drawing parts the main properties here are line type style and line thickness thickness The procedures for accessing properties are the same as for all other parts 63 Step 1 Step 2 14 Illuminated Push Button An illuminated push button combines button and lamp operation It therefore supports CLICKED RELEASED and REFRESH events for add
82. ns DH O88 DER Buttont RELEASED Per reset da 2h Gignal 140 24 turns OFF Sesto DUE Dutton CLICKED 11 Pun gamil l P ania lF runs na mp Leper aran ap lp Ls LE Step 7 When the panel layout is complete save it to disk and compile the file to check for syntax typing or other errors n DEF Buttoni CLICHEDA FA TE inp 2a ignaictisi ti borns BH rca EF futtond RELEASEN ar pesot inj i Igual 1740 73 turns OFF ooo END CO LLO DEF Muttan CLICKED FProgram sanplrpro runs tompiling PAHELCOMPILER 1 0 8 TEV Documentar Pan lel pil onpletef Errors 0 Warnings 0 36 Step 8 If the compile operation is successful download the results to the controller with WINCAPSIII ag nn eo py Step 9 Changing button properties Color position and other button properties support read write access from the part itself as well as other parts on the same TP panel using the standard dot notation part_name property For a list of part properties and possible values see Section 3 3 4 Object Properties The following example changes the foreground color fg background color bg display text caption horizontal position x and vertical position y Start by loading the editor adding a button and opening the corresponding Source Code Edit window as above PanelDesigner Panels1 meo je arar o o Se S Source Panell S
83. nt program according to the value in a numerical input box when a button is pushed Step 1 E Load the editor and place a button and a numerical input box on the panel layout Step 2 Open the Source Code Edit window and add the following action source code for the button s CLICKED event DEFINT TYPE TYPE Numeric1 value SELECT CASE TYPE CASE 0 RUN PROO CASE 1 RUN PRO1 CASE 2 RUN PRO2 CASE ELSE RUN PRO10 END SELECT NA il ES E PE i rh si cas Nro er rx Sea Pi UA y i re y al F J ES Panell 1 Nmeret 05057 DEFIMT TYPE T Dawa IN PES Hiner ie value eA SELERT NASE TYPE gogor CASE M 0007 RON PROD DOGO q a ooh COOL 00013 CASE ELSE emit RUM PROTA Tars EMD SELECT 00018 END 00047 Compile the panel layout download it to the controller and test 83 2 5 2 Iteration Example Using FOR NEXT The following FOR NEXT example counts the number of zero values in global integer variables 0 to 99 when a button is pushed and displays the result in a numerical input box Step 1 Load the editor and place a button and a numerical input box on the panel layout Step 2 Open the Source Code Edit window and add the following action source code for the button s CLICKED event DEFINT COUNT ZEROCOUNT 0 FOR COUNT 0 TO 99 IF COUNT 0 THEN ZEROCOUNT ZEROCOUNT 1 END IF NEXT NUMERIC1 VALUE ZEROCOUNT al E H mula jmil 1 oe fae dt Wir ardia nimi Peal iar lev
84. on This statement allows the currently executed program to run a program designated in lt Programname gt However the current program cannot run the program itself Only values are usable for lt Argument gt Even if you specify reference pass the reference data will automatically be changed to values But you cannot use local array For lt RUN option gt there are PRIORITY or P and CYCLE or C PRIORITY or P Designates the priority of a program If ignored the default value of 128 is set The smaller the value the higher the level of priority The setting range is from 102 to 255 Note The priority over of the supervisory task cannot be changed CYCLE or C Designates an alternate cycle time of each cycle when a program is run repeatedly This option is expressed in msec The setting range is from 1 to 2 147 483 647 You cannot start any program that includes arguments when using the cycle option Example DEFINT Lil 1 Li2 2 Li3 3 RUN sampl C 1000 Runs sampl in parallel n C 1000 RUN samp2 Lil Runs samp2 using the Lil argument in parallel RUN samp3 Lil Li2 PRIORITY 129 Runs samp3 using the Lil and Li2 arguments in parallel MADE 2 Os RUN samp4 Li1 Li12 PRIORITY 150 Runs samp4 using the Lil and Li2 arguments in parallel P LID RUN Samp gt Ciel 12 bis Ps LZ0 Runs samp5 using the Lil Li2 and Li3 arguments in parallel AP 120 118 KILL Statement Function Forcibly
85. oper needs only supply the source code specifying the desired response The table below lists the possibilities Note The actions available depend on the part type CLICKED Button pressed RELEASED Button released TIMER Interval elapsed REFRESH Screen refreshed For further details see Section 2 2 2 Specifying Action Source Code for Parts One TP panel program cannot access the local variables in another 3 5 Data Types The TP panel control language supports three types of data 1 String data S A string can be up to 243 bytes long 2 Numerical data I F and D There are three types here I integer 2147483648 to 2147483647 F single precision floating point 3 402823E 38 to 3 402823E 38 D double precision floating point 1 7976931348623157E 308 to 1 7976931348623157E 308 3 VO data IO I O data expresses the I O port status ON OFF as a numeric value 97 3 6 Type Conversion Mixing data of different numerical types involves type conversion using the following rules Assigning a numerical value to a numerical variable of a different type involves first converting that value to the target variable s type implicit casting An expression mixing two numerical values of different types usually involves first converting the one with lower precision to the type with higher precision promoting The only exception to the preceding rule involves bitwise logical operators which always conver
86. owever that the final result will not appear at this position but on the corresponding function key on the teach pendant screen Specify Next panel as the display text caption for the function key Le a Pine lr sare P amuza ior an E uE SE i De imr ve am DR anah ar a onde AAA EF A at Fo da LU eral 0 A Bo pe a label e e ae a LANE Ad E an aT E i C a bpi 3A da P E iF La im PP L_ Fo L qu a es BE 100 mies A O ior A Lol Ea 57 Step 2 Specify the desired function key number 0 to 9 This example uses 2 Step 3 Adding action source code This part differs from buttons and other parts in supporting only a single event CLICKED This example responds to the key press by switching to a different panel Panel2 ET 2 PEF FunckKey1_E1LTEKEO cwo page change panel ma m EHD Oo PEE Step AF Changing function key properties This part differs from other parts in offering only a single property caption Access is the same as for other parts 98 Step 1 Step 2 10 Timer This part automatically triggers action source code for the TIMER event at the interval specified by the property interval Timer Example Load the editor and place a timer anywhere on
87. r and double click on the corresponding Layout window icon or press the Display panel button 2 Select a part Selecting a part from the Parts tool bar displays the part mark at the current cursor position in the Layout window 3 Add the part Clicking in the Layout window adds the part with the default size at that location Note Dragging the part at this point then adjusts the size 1 3 2 Modifying Panel Layouts The following methods are available for modifying part positions and sizes in Layout windows 1 Moving parts 1 Drag the part with the mouse whenever the move cursor is visible 2 Use a cursor key 3 Use the Move tool bar 4 Modify the position properties x and y 2 Changing size 1 Drag part frame s rubber band 2 Modify the properties width and height 3 If multiple parts are currently selected use the Layout tool bar buttons for standardizing spacing and size 3 Aligning If multiple parts are currently selected use the Layout tool bar buttons for centering parts or aligning them along the specified edge Note For function keys the property Index automatically determines the position and size 4 Changing layers Select the part to reorder and either choose Move on the right click menu or press a button in the tool bar s Order section Note Changing the part order automatically updates the Parts Tree pane accordingly 1 3 3 Changing Part Properties The Properties pane provides facilit
88. r to those for buttons 48 Step 3 Read write access to check box properties This example shows how pressing a button on the same screen can update IO 24 to l O 26 from a set of check boxes Add a button to the panel layout 49 Step 4 Open the Source Code Edit window select Button1 and CLICKED to create the action source code skeleton and add the following lines for reading the check box properties state lO 24 checkbox1 state IO 25 checkbox2 state IO 26 checkbox3 state Compile this panel layout download it to the controller and test WIE le ees Us x aE x el i Fm inm Eh aein a f ae Te El iil re f ay a an i EROAN ae ee Mi ae a Es a CS AA Oe G de 0 ey A E ral at ie Ne Ws are ey od ere A fare E C DEF Buttoni_CLICKEO O 1096 checkbox state Soe O25 checkbox2 state St IA checkbox state DAA EXD 50 7 Radio Button A group described below of these parts provides a set of mutually exclusive settings These parts have ON OFF properties state similar to those for lamps and check boxes Radio Button Example The following example uses radio buttons for three mutually exclusive settings Load the editor and place a group with three radio buttons on the panel layout Step 1 o int fore ea nm I m fa q 1 TT al ia sie ee el Biana Lal amistad beware ear ls Mie Se Awd Li a E Tu
89. racter string can be designated for lt Expression gt A variable a constant an expression or a conditional expression can be designated for lt Item gt A conditional expression can be designated as follows e lt Arithmetic expression 1 gt TO lt Arithmetic expression 2 gt The result of lt Expression gt is checked if it is lt Arithmetic expression 1 gt or higher or if it is lt Arithmetic expression 2 gt or lower This statement cannot be used in the case of a character string e IS lt Comparison operator gt lt Arithmetic expression gt The result of lt Expression gt and the value of lt Arithmetic expression gt are compared In the case of a character string lt Comparison operator gt is A CASE ELSE statement is executed if all CASE statements are not satisfied A CASE ELSE statement must be put before an END SELECT statement Related Terms IF END IF Example SELECT CASE CASE 10 Burton CASE 1 Button1 CASE 2 Button1 CASE 3 Button1 CASE 4 Button CASE 5 Button1 CASE 6 TO Button1 CASE IS 2 Button1 END SELECT Index Caption CAPt LOA Caption Caption Caption CAPELOM 8 Caption 9 caption Execute this command if the index value matches the CASE statement value If the index 18 0 non ee index Sd myn rit the index T9 2 Won MIE 1 ENS Ge 1835 nan rit the index r94 wan CEE The index 15733 on tE the index 19 G to D g g If the
90. rner positive right or down fg and bg Foreground and 1 White O Black 1 Blue 2 Green 3 Cyan 4 background colors Red 5 Magenta 6 Brown 7 Light Gray 8 Gray 9 Light Blue 10 Light Green 11 Light Cyan 12 Light Red 13 Light Magenta 14 Yellow active Visible and active 0 Invisible amp inactive Add 1 for visible and 2 for settings active Note that 3 is the only setting producing events CLICKED and RELEASED style Display style 0 2D rectangle 1 3D rectangle Display text String max 80 bytes justify Caption positioning 0 Centered 1 Right justified 2 Left justified Note This setting is ignored for style settings 2 and 3 3 3 5 Folder Variables To access a folder variable declared by a PAC program in the same folder a TP panel file must first declare it with an EXTERN declaration Example EXTERN DEFINT AAA declare folder variable with name AAA Read write access then uses the same syntax as normal variables Examples AAA LightButton1 state read lamp LightButton1 state into folder variable AAA 2 AAA copy contents of folder variable AAA into global variable 1 2 96 3 4 TP Panel Program A TP panel program consists solely of action source code blocks with the following structure DEF Object Event desired operations END Selecting an object and an action in the editor automatically generates a skeleton consisting of the first DEF and last END lines The devel
91. rts their events and their properties Object Properties for TP Panel Screen Parts Button x and y Upper left corner Position relative to the upper left corner of the Events coordinates drawing region This corner must be within the CLICKED teach pendant drawing range RELEASED width and Part dimensions in These define the corner opposite the reference height pixels corner x y x width y height Negative means left or up of the reference corner positive right or down fg and bg Foreground and 1 White O Black 1 Blue 2 Green 3 Cyan 4 background colors Red 5 Magenta 6 Brown 7 Light Gray 8 Gray 9 Light Blue 10 Light Green 11 Light Cyan 12 Light Red 13 Light Magenta 14 Yellow active Visible and active O Invisible amp inactive settings Add 1 for visible and 2 for active Note that 3 is the only setting producing events CLICKED and RELEASED style Display style 0 2D rectangle 1 3D rectangle 2 2D oval 3 3D oval Display text String max 80 bytes justify Lae Caption positioning 0 Centered 1 Right justified 2 Left justified 89 Label x and y Upper left corner Position relative to the upper left corner of the Events coordinates drawing region This corner must be within the None teach pendant drawing range width and Part dimensions in These define the corner opposite the reference height pixels corner x y x width y height Negative means left or up of the reference
92. s three panel layouts in the same folder with two buttons on each for freely moving between them Step 1 Load the editor create three panel layouts with two buttons on each and label the buttons for the two other panel layouts Pane tc e ot it ee Fi FZI ESRAR ae mx ag Ea H E 78 Step 2 Open Source Code Edit windows for the panel layouts and add the appropriated line from the following action source code to each button s CLICKED event PAGE_CHANGE PANEL1 PAGE_CHANGE PANEL2 PAGE_CHANGE PANEL3 e Taia i J aten A a m ilm switch screen to PANEL1 switch screen to PANEL2 switch screen to PANEL3 ols AAA o lt a i o b T JF Ca ET a T 7 y e TET 7 AA A eT RAEE f oo te a i i eee A wa A bo m elim ze pl Happs dE e a NA MS F dal TGAS rey E ee Tr Bye seit A 1 i 00007 PEW MULEONZ_CLICKED wo page change PAHEL conc END PS 2208 PEF Bol tond CLICKED DST Page_change PAHELS oe wad Se DEF Button CLICKED Se Page chango PAMELA Ono EHD nooo TAN DEF Buttons CLTCEED j mo Page change PANELI OOo FHD OCF huttont_CLICKCO 2 Page change PAHELA OOo End A cocot BEF Muttonz_CLICKED a Pape change PANEL al zpr a 0 2 o Compile the panel layouts download them to the controller and test 79
93. se WINCAPSIII to send the created TP panel data to the controller Before data transfer WINCAPSIII compiles the last saved data If the TP panel data is being edited therefore be sure to save any data modifications before data transfer 1 5 5 Important Note on Radio Buttons Makes sure that only one the default has ON in its state property The editor does not check sets of radio buttons for multiple ON settings Sending such data to the controller produces a TP panel screen with multiple ON settings exactly as specified Chapter 2 Creating TP Panels Chapter 1 gave an overview of the procedures for arranging objects parts on panel layouts using mouse operations on the computer screen assigning action source code and adjusting their size position color and other properties This chapter gives the detailed procedures for creating TP panels The teach pendant provides a clean slate on which to display such user specified panel layouts A folder can have only one TP panel file specifying a series of such panel layouts 2 1 Configuring Teach Pendant 2 1 1 Enabling TP Panel Operation Add support for TP panel operation to the teach pendant with the following procedure Step 4 From the teach pendant top screen press F6 Set F7 Options F8 Extnsion F5 Input ID to display the following screen amp E w er Joint motel xz apa System Extension Key 39 Input ID Number 8 i OK Take in new entry Canc
94. t their operands to integers and yield integer results Converting a floating point value to an integer rounds toward zero yielding the first integer between the original value and zero Examples 1 23 gt 1 and 1 23 gt 1 Assigning a double precision floating point double value to single precision float one rounds the mantissa off to seven decimal digits 3 7 Constants A constant is an expression representing a fixed value The TP panel control language supports four types of constants integer 1 float F double D and string S The following describes them individually 1 Integer constants These cover the range 2147483648 to 2147483647 There are two ways to specify them in decimal and binary notation There is no hexadecimal notation Decimal Notation These are integer constants specified in standard decimal notation Examples 32767 125 10 Binary Notation These are integer constants specified in a binary notation consisting of a prefix amp B and a string of binary digits 0 or 1 Using this binary notation the valid range for 32 bit integer constants is amp BO to 4B11111111111111111111111111111111 Examples amp B110 B0011 98 2 Float constants These are single precision floating point constants with up to 7 digit mantissas over the range 3 402823E 38 to 3 402823E 38 There are two ways to specify them in decimal and exponential E notation Examples 1256 3 9 345E 0
95. that for the global variable example above Step 2 Open the Source Code Edit window and add the following action source code for when this button is pressed This example copies integer ITEST float FTEST and double DTEST to numerical input boxes and string STEST to a text box EXTERN DEFINT ITEST EXTERN DEFSNG FTEST EXTERN DEFDBL DTEST EXTERN DEFSTR STEST Numeric1 value ITEST Numeric2 value FTEST Numeric3 value DTEST Textbox1 text STEST a Fanie abjir Fanelli pni a Pile Es ARA AAA AE EEE OE ER o GLATIGIS mua 2 DEF Button CLICKED EXTERN DEFIMT TEST ESATEAN DCR SHG FTEST EXIERM DEFDUL DIEST FATERH EFSTA STEST hiner ic value TEHTI Himerig valor F TEST Honeric values DTEST pa extn text lt STEST ME SE x Compiling i J PREL PILER 1 0 0 Cty DocumentsiPanelst pml Complete Errors 6 Warnings amp Hasi E FSE Es 68 2 3 2 Modifying PAC Variables Modifying PAC variables is simply the write access counterpart of the read access described in the preceding section Example Modifying Global Variables The following example updates a global variable of each type from the corresponding numerical input box or text box for the string when a button is pressed Step 4 Load the editor and place a button three numerical input boxes
96. the teach pendant drawing range Oval x and y Circle width and height fg and bg a width and height fg and bg style Part dimensions in These define the corner opposite the reference pixels corner x y x width y height Negative means left or up of the reference corner positive right or down Foreground and 1 White O Black 1 Blue 2 Green 3 Cyan 4 background colors Red 5 Magenta 6 Brown 7 Light Gray 8 Gray 9 Light Blue 10 Light Green 11 Light Cyan 12 Light Red 13 Light Magenta 14 Yellow Group to which part belongs Active setting O Invisible 1 Visible Display style O Solid line 1 to 7 Dash dashed line 8 to 14 Dash double alternate long and two short dashed line Line thickness The O setting produces flood fill 92 Text Box x and y Upper left corner Position relative to the upper left corner of the Events coordinates drawing region This corner must be within the CLICKED teach pendant drawing range RELEASED width and Part dimensions in These define the corner opposite the reference pixels corner x y x width y height Negative means left or up of the reference corner height positive right or down fg and bg Foreground and 1 White O Black 1 Blue 2 Green 3 Cyan 4 background colors Red 5 Magenta 6 Brown 7 Light Gray 8 Gray 9 Light Blue 10 Light Green 11 Light Cyan 12 Light Red 13 Light Magenta 14 Yellow a
97. the panel layout in the Layout window Note however that the final result will not appear on the teach pendant screen Changing timer properties The main properties here are active which controls and indicates timer status and interval which controls event frequency This example uses buttons to enable and disable a timer which alternately switches a pilot lamp on and off Load the editor and place a timer two buttons and a pilot lamp on the panel layout in the Layout window EE E Ea z e a lee Sal ua TEn ig 99 Step 3 Adding action source code Open the Source Code Edit window select Timer1 and TIMER create the action source code skeleton and add the following line to switch the lamp ON and OFF If Lightbutton1 state 1 then Lightbutton1 state O Else Lightbutton1 state 1 End if Add the following lines so that the CLICKED events for Button1 Start and Button2 Stop respectively enable and disable the timer Timer1 active 1 Timer1 active O grr E n Te aro Fa ha fs a p sli 3 a W 4 ta va Al eo Y ba ompiling PAN ELCOMPILER 1 0 0 E 4 Hp Docimentai Panels 1 pul Complete Errors 0 Warnings U fae ee ee E A Fret i 1s a E ow a Adnan t 60 E Timer it POS PER Bee CTL CKEDL D0 Timer t active Ca EFD EAF SE MEF Mutton 6i 1CKER A fiperd active a eee pd LET
98. tree Property bar Toggle display of the Properties pane O Property Grid i _ Toggle the grid display on and off Snap to grid Toggle automatic grid positioning on 1 and off Zoom Normal Cancel zooming and return the Layout window to the standard 100 magnification Zoom Percent Change the magnification ratio for the Layout window 50 75 100 200 4 Tool Options Specify the compiler output version Compile Translate the corresponding TP panel file into executable format 5 Window Close Close the currently selected window Close all Close all open editor windows windows Cascade Display all open windows with the same size and overlapped with only their title bars visible Display all open windows as individual rectangles dividing up the screen Tile Align the icons for minimized windows in the lower left corner of the main editor window List windows Display a list of all windows 6 Help Help Display the editor s help file Arrange Icons About Panel Display the About screen indicating the editor s version Designer number etc 13 1 3 Creating and Modifying Panel Layouts 1 3 1 Adding Parts Adding parts to a panel is a three step procedure 1 Open the Layout window To create a new panel choose the File New menu command or press the tool bar button New panel To modify an existing panel layout select the Layout form button on the Parts tool ba
99. tton pressed RELEASED Button released See Section 2 2 3 Action Source Code Statements Action source code blocks consist of two kinds of statements TP panel control commands and read write accesses to part properties Accesses use the standard dot notation part_name property For a list of part properties and possible values see Section 3 3 4 Object Properties Action source code blocks can use global variables of type integer float double or string local variables and folder variables 21 2 2 3 Specifying the RELEASED Event Execution Condition Version 2 32 or later 2 2 3 1 Release mode property added The release mode property is added to the property screen making it possible to specify the RELEASED event execution condition The property provides the following setting Release mode parameter The RELEASED event executes Even if a press on the part is released outside Default in Version 2 32 O Post Event the part or later 1 No Event Only when a press on the part is released Fixed to this setting in within the part Version 2 31 or earlier Specifying the RELEASED event execution condition E Pamiliremnr Fare li Me p yer par es ip H B DT G8 in Release the press on the part within the part 1 No Event Release the press on the part outside the part by sliding your finger on the screen surface 0 Post Event Note The release mode parameter can be contained one per panel file Changin
100. types 1 Conditional branching IF THEN ELSE and IF END IF statements change execution flow based on whether the specified condition is satisfied Execution branches to the statements following the THEN if the relational expression immediately following the IF evaluates to TRUE 1 and to those following the ELSE otherwise 2 SELECT CASE Here execution branches to the CASE line matching the result of evaluating the specified arithmetic expression on the SELECT line executing the statement block between that CASE line and the next one or END SELECT line If there is no such match execution branches to the CASE ELSE block 3 Iteration Here execution of the statement block between the FOR and NEXT lines repeats as long as the condition specified on the FOR line remains satisfied 104 4 7 I O Control Statements There are three types here 1 DI and DO control statements These directly control I O ports DI DO Commands Read data from the I O port designated by an I O variable OUT Output data to the I O port designated by an I O variable SET Set an I O port to ON RESET Set an I O port to OFF 2 Teach pendant control statements These control teach pendant screen I O Teach Pendant Commands 4 8 Task Control Statements These control the multitasking of tasks other than the one containing the statement Task Control Commands RUN Create initiate task SUSPEND Interrupt task 105
101. urn a Boolean result 1 for true and O for false The archetypical use is as the conditional expression in a flow control statement Relational Operators less than or equal approximately equal greater than or equal 100 4 Bitwise logical operators These operators perform bit arithmetic logical operations on the bits of their operands Note that operands are first converted to integers if necessary Bitwise Logical Operators AND Logical product o Logicalsum OOO XOR Mutually exclusive OR Example 11 amp B1100 XOR amp B0101 The result is amp B1001 because the bits differ only in the first and fourth positions 5 String operator This operator concatenates joins two strings Example A ABC DEF String A becomes ABCDEF 6 Order of precedence for arithmetic bit arithmetic and relational operators The following table gives the order of precedence for mixtures of these operators during expression evaluation Tay mias LA Logical sum Mutually exclusive OR When two operators have the same order of precedence expression evaluation is from left to right To override this behavior explicitly specify the order of evaluation with parentheses 101 Chapter 4 TP Panel Control Language Syntax 4 1 Statements and Lines A TP panel control language program consists of lines with one statement per line A line can be up to 255 bytes long A statement is the minimum unit for

Download Pdf Manuals

image

Related Search

Related Contents

gb ifdep nl dk sf ns gr ru h ro pl cz sk si hr/scg lt ee lv bg  LED NEUTRON 4 x QUAD COLOUR LED LIGHT  Crowcon Gas-Pro PID Portable Gas Detector User Manual  UFSC - Universidade Federal de Santa Catarina 28/03/2012  Gunnar Optiks Haus  取扱説明書 - 三菱電機  

Copyright © All rights reserved.
Failed to retrieve file