4.3.4. Initialization of variables and signals
4.3.4. Initialization of variables and signals
The Variable initialization program (Job program #200) is a job program used to designate the initial values of various variables that are used in the standard program. Most of the values are processed in the standard program internally. They are created automatically by HRpal or HRpalware.
However, in case of the pickup height in the 28th line, the values that are designated directly by the user will be used. Once the standard program is created, the user shall carry out the change manually (Figure 4.2). When it comes to the Print and Stop section of the #2, #3, #42, and #43 lines, deleting after changing the job program shall be carried out to run the robot.
Figure 4.2 Meaning of V!121~136 variables
In addition, when the standard program is saved by using HRpalware, the data comments and various data monitoring lists for variables will be created automatically. When this function is used, it is possible to monitor the palletizing process directly from the teaching pendant.
Program 2 Program for initializing variables
Program File Format Version 1.6 Mech Type: _MECHTYPE Total Axis: _TOTAL_AX Aux Axis: _AUX_AX 1 ''Initialize Variable 2 PRINT #0, "Change the values of variables and then delete Print or Stop." 3 STOP 4 V%[1]=0 'Start Signal 5 V%[5]=0 'Current Working Pallet Number 6 V%[6]=0 'Previous Working Pallet Number 7 V%[7]=1 'Package Number 8 V%[8]=1 'Previous Package Number 9 ''Total package count 10 V%[121]=36 'Total Package #1 11 ''Odd layer package count 12 V%[151]=9 'Odd Layer Package #1 13 '' Even layer package count 14 V%[181]=9 'Even Layer Package #1 15 ''Top layer package 16 V%[211]=9 'Top Layer Package #1 17 ''Slip sheet count 18 V%[241] = 0 'Total Slip sheet #1 19 ''First slip sheet insertion or not 20 V%[271]=0 'Slip sheet Stack First-layer #1 21 ''Top slip sheet insertion or not 22 V%[301]=0 'Slip sheet Stack Top-layer #1 23 'Package length, width and height 24 V![31]=400 'Package Length #1 25 V![61]=300 'Package Width #1 26 V![91]=300 'Package Height #1 27 'Package pick height 28 V![121]=0 'Pickup Height #1 29 'Decision regarding workpiece counter resetting or not 30 'When the workpiece counter is reset, the slip sheet and layer counters will be reset together 31 FOR V%[3]=1 TO 16 32 IF V%[30+V%[3] <> 0 THEN 33 PRINT #0, "1:Continue, 2: Reset 34 INPUT #0, V%[2] 35 IF V%[2]<>1 THEN 36 V%[30+V%[3]=0 'Workpiece counter reset 37 V%[60+V%[3]=0 'Slip sheet counter reset 38 V%[90+V%[3]=0 'Layer counter reset 39 ENDIF 40 ENDIF 41 NEXT 42 PRINT #0, "Change the values of variables and delete Print or Stop." 43 STOP 44 END |
The Signal initializing program (Job program #300) is used to record the signals that shall be initialized before executing relevant programs. At the initial stage, there is nothing defined. Signals shall be recorded according to relevant processes.