M0000464_progr_ing_v3.3

Share Embed Donate


Short Description

Download M0000464_progr_ing_v3.3...

Description

NC Software SIAX S series

Programming Manual SIPRO S.r.l. Viale dell'Industria, 7 37135 Verona - ITALY Tel. +39 045 508822 - Fax +39 045 585477 http://www.sipro.vr.it - e-mail:[email protected] M0000464 v3.3

This manual is updated as at the date indicated in the last page,the Sipro S.r.l. reserves the right to update the product specifications or performance or the contents of the manual without prior notice

Page 2

M0000464

Programming Manual

Index

Index Introduction

14

Programming the NC .............................................................................................................. 15

Programming directly from the keyboard

16

Program Editor ........................................................................................................................ 17 General rules for writing steps ............................................................................................... 17 Inserting instructions .............................................................................................................. 18 Deleting instructions............................................................................................................... 18 Replacing instructions ............................................................................................................ 18 Modifying instructions ........................................................................................................... 18 Change step number ............................................................................................................... 18 Inserting a step........................................................................................................................ 18 Deleting a step ........................................................................................................................ 18 I/O descriptors ........................................................................................................................ 19 Program example.................................................................................................................... 20

General programming notes

21

Structure of an NC program................................................................................................... 22 Program identification directives (number, name, definitions, files included) ...................... 22 Step syntax.............................................................................................................................. 24 Example of an NC program.................................................................................................... 26 Compiling Program ................................................................................................................ 26 Instruction priorities ............................................................................................................... 27 List of available instructions ................................................................................................... 29 Instruction list assignment values to variables .............. Errore. Il segnalibro non è definito. Instructions for the management of analogs inputs and outputs .. Errore. Il segnalibro non è definito. Instructions for the management of timers .................... Errore. Il segnalibro non è definito. Instructions for the management of the axes ................. Errore. Il segnalibro non è definito. Instructions for handling of axes with interpolation...... Errore. Il segnalibro non è definito. Instructions for the management of the origins ............. Errore. Il segnalibro non è definito. Instructions for managing tools (instructions developed for specific applications. To use these instructions consult the Sipro technical department ) ......... Errore. Il segnalibro non è definito. Instructions for controlling the flow of the program ..... Errore. Il segnalibro non è definito. Instructions managing parallel programs ...................... Errore. Il segnalibro non è definito. Instructions for the management of the parameters of the numerical control ............Errore. Il segnalibro non è definito. Instructions for general use............................................ Errore. Il segnalibro non è definito. NC DESCRIPTION ISTRUCTION....................................................................................... 40 Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction

(14) AN OUT n = m .............................................................................................................................. 40 (77) ANT AX n TP t VAL q ................................................................................................................. 41 ( 94 ) AX n INCR m .............................................................................................................................. 42 ( 80 ) AX n TO m .................................................................................................................................. 43 ( 85 ) AX n VEL v QUOTE m.............................................................................................................. 44 (38) CONT MOVE � .......................................................................................................................... 46 (34) END � .......................................................................................................................................... 47 (57) F m � ............................................................................................................................................ 48 M0000464

Pag. 3

Index Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Page 4

Programming Manual (120) FORK PROG n ........................................................................................................................... 49 (60) FXY m � ...................................................................................................................................... 50 (61) G1 X xf Y yf � ............................................................................................................................ 50 (56) G103 P n VQi � ........................................................................................................................... 51 (66) G1XYN xf, yf, n, nf �.................................................................................................................. 55 (62) G2 X xf Y yf I xc J yc �............................................................................................................... 56 (72) G2R r e xf yf �............................................................................................................................. 57 (67) G2XYN xc yc xf yf n qf � ............................................................................................................ 58 (63) G3 X xf Y yf i xc J yc � ................................................................................................................ 59 (73) G3R r e xf yf �............................................................................................................................. 60 (68) G3XYN xc, yc, xf, yf, n, qf � ...................................................................................................... 61 (40) G40 �............................................................................................................................................ 62 (41) G41 �............................................................................................................................................ 64 (42) G42 �............................................................................................................................................ 66 (43) G43 (or TOOL EXT) �............................................................................................................... 67 (44) G44 (or TOOL INT) � ................................................................................................................ 68 (45) G45 �............................................................................................................................................ 69 (4) GOSUB n �.................................................................................................................................... 70 (8) GOTO n �..................................................................................................................................... 71 (142) IF AX n GOSUB m �............................................................................................................... 72 (146) IF AX n GOTO m �.................................................................................................................. 73 (132) IF IN n GOSUB m � ................................................................................................................. 74 (133) IF IN n JMPPRG m �............................................................................................................... 75 (136) IF IN n GOTO m � ................................................................................................................... 76 (248) IF VBi = ValB GOTO m � ....................................................................................................... 77 (230) IF VNi < n GOSUB m � ........................................................................................................... 78 (231) IF VNi = n GOSUB m � ........................................................................................................... 79 (232) IF VNi > n GOSUB m � ........................................................................................................... 79 (233) IF VNi < n GOTO m � ............................................................................................................. 80 (234) IF VNi = n GOTO m � ............................................................................................................. 81 (235) IF VNi > n GOTO m � ............................................................................................................. 81 (210) IF VQi < m GOSUB n � ........................................................................................................... 82 (211) IF VQi = m GOSUB n � ........................................................................................................... 83 (212) IF VQi > m GOSUB n � ........................................................................................................... 83 (213) IF VQi < m GOTO n � ............................................................................................................. 84 (214) IF VQi = m GOTO n � ............................................................................................................. 85 (215) IF VQi > m GOTO n � ............................................................................................................. 85 (49) INCR ORG m AX n VAL i � ..................................................................................................... 86 (3) INPUT n........................................................................................................................................... 87 (37) INTP MODE = n �...................................................................................................................... 88 (31) INTP PAR n AX m P p � ........................................................................................................... 89 (5) JMPRG n �.................................................................................................................................... 91 (121) KILL PROG n............................................................................................................................. 91 (84) LINE n1 m1 n2 m2........................................................................................................................ 92 (50) LINE2 q1 q2 �............................................................................................................................. 93 (51) LINE3 q1 q2 q3 �........................................................................................................................ 93 (52) LINE4 q1 q2 q3 q4 � .................................................................................................................. 93 (53) LINE5 q1 q2 q3 q4 q5 � .............................................................................................................. 94 (54) LINE6 q1 q2 q3 q4 q5 q6 � ........................................................................................................ 94 (102) MEM STEP VNi.......................................................................................................................... 95 (70) MOVEXYT xf yf tf �.................................................................................................................. 96 (39) NO CONT MOVE � ................................................................................................................... 97 (35) NO WAIT AX................................................................................................................................ 98 (55) ORG n (or G55 n) � .................................................................................................................. 101 (18) OUTON n..................................................................................................................................... 103 (19) OUTOFF n................................................................................................................................... 103 (15) PULSE n ...................................................................................................................................... 104 (93) QUOTE AX n = m....................................................................................................................... 105 (47) SET ANGLE ORG n VAL i �.................................................................................................. 106 (59) SET ORG m AX n VAL i ........................................................................................................... 107 M0000464

Programming Manual Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction

Index

(86) SET POS AX n = m..................................................................................................................... 108 (87) SKIP WAIT AX n ....................................................................................................................... 109 (83) STOP AX n .................................................................................................................................. 110 (17) TIME m........................................................................................................................................ 111 (75) TOOL ANGLE = m �............................................................................................................... 112 (74) TOOL n � .................................................................................................................................. 113 (195) VB [VNi] = n .............................................................................................................................. 113 (190) VBi = EQ2D v1 v2 v3 n............................................................................................................. 114 ( 176 ) VBi = SETMAC PAR n VAL m............................................................................................. 115 (178) VBi = SETP AX n PAR j VAL m............................................................................................. 116 (246) VBi = VB[VNj ] ......................................................................................................................... 117 (240) VBi = x........................................................................................................................................ 117 (189) VBi = x........................................................................................................................................ 118 (82) VEL AX n = m %........................................................................................................................ 118 (92) VEL AX n = m [mm/min]........................................................................................................... 119 (192) VN[VNi] = n............................................................................................................................... 119 (220) VNi = m ...................................................................................................................................... 119 (188) VNi = m ...................................................................................................................................... 120 (221) VNi = m + n................................................................................................................................ 120 (222) VNi = m - n................................................................................................................................. 121 (225) VNi = VQj .................................................................................................................................. 121 (227) VNi = VN[VNj] .......................................................................................................................... 122 (228) VNi = AI m................................................................................................................................. 122 (238) VNi = STEP + n ......................................................................................................................... 123 (191) VQ[VNi] = m ............................................................................................................................. 123 (200) VQi = m...................................................................................................................................... 124 (187) VQi = m...................................................................................................................................... 125 (208) VQi = AI n.................................................................................................................................. 125 (184) VQi = ATAN2 (m,j)................................................................................................................... 126 (186) VQi = CATH (m,j) .................................................................................................................... 126 (185) VQi = DIST (m,j)....................................................................................................................... 127 (104) VQi = FUN n p1 p2 p3 p4 ......................................................................................................... 128 (48) VQi = GET ANGLE ORG n �................................................................................................. 128 (177) VQi = GETMAC PAR n........................................................................................................... 129 (179) VQi = GETP AX n PAR j ......................................................................................................... 129 (193) VQi = m * j................................................................................................................................. 130 (194) VQi = m/j ................................................................................................................................... 130 (180) VQi = m * SIN j ......................................................................................................................... 131 (181) VQi = m * COS j ....................................................................................................................... 131 (182) VQi = m/SIN j............................................................................................................................ 132 (183) VQi = m/COS j .......................................................................................................................... 132 (201) VQi = m + j ................................................................................................................................ 133 (202) VQi = m - j ................................................................................................................................. 133 (203) VQi = m * n................................................................................................................................ 134 (204) VQi = m/n.................................................................................................................................. 134 (197) VQi = j % k................................................................................................................................ 134 (205) VQi = VNj .................................................................................................................................. 135 (58) VQi = ORG m AX n.................................................................................................................... 136 (206) VQi = POS AX n ....................................................................................................................... 136 (207) VQi = VQ[VNj] ......................................................................................................................... 137 (36) WAIT AX..................................................................................................................................... 137 (81) WAIT AX n IN QUOTE............................................................................................................. 137 (247) WAIT VBi.................................................................................................................................. 138

NC Functions .......................................................................................................................... 139 FUN 50 STORAGE FEE MAXIMUM or MINIMUM. ....................................................................................... 139 FUN 55 INITIATION MANAGEMENT ACTION TO STOP AXIS ON DIGITAL INPUT OR MARK OF ZERO 140 FUN 56 RESET GESTIONE STOP ASSE DA INGRESSO DIGITALE o TACCA DI ZERO ...................... 142 FUN 61 DIGITAL CAM MANAGEMENT INITIALIZATION AND RESET CAMS ................................... 143 FUN 62 ACTIVATION, CHANGE OR DEACTIVATION OF A DIGITAL CAM......................................... 144 M0000464

Pag. 5

Index

Programming Manual

FUN 63 INITIATION MANAGEMENT ACTION CAM WITH AXIS ASSOCIATED ................................. 147 FUN 64 PROGRAMMING OF A CAM SHAFT ASSOCIATED WITH .......................................................... 148 FUN 65 DETERMINATION OF A POSITION OF AXIS SLAVE CORRESPONDING TO A POSITION OF AXIS MASTER ....................................................................................................................................................... 152 FUN 66 SETTING THE STAGE........................................................................................................................... 155 FUN 71 ACQUISITION OF AXIS LEVEL FROM INTERRUPT OF THE ENCODER ZERO NOTCH 157 FUN 72 INITIALIZATION VARIABLES FOR IRQ MANAGEMENT ON CANopen ........................... 160 FUN 76 – 77 POSITION ROLLOVER........................................................................................................... 161 FUN78 SET MODES FOR COUPLING AND UNCOUPLING TRACKING........................................... 162 FUN 79 MODIFY THE OBJECTIVE LEVEL OF AN AXIS IN MOTION ..................................................... 165 FUN 80 MODIFY AXIS POSITION WITH AXIS IN MOTION....................................................................... 167 FUN 81 RESET IN AUTOMATIC CYCLE......................................................................................................... 169 FUN 82 FUNCTION OF CHANGE SPEED AT FINAL LEVEL ...................................................................... 171 FUN 104 AUTOMATIC RECOVERY QUOTA .................................................................................................. 173 FUN 106 AUTOMATIC RECOVERY QUOTA .................................................................................................. 174 FUN 107 AUTOMATIC RECOVERY QUOTA .................................................................................................. 175 FUN 111 TRIGGER SWAP WITH TRACKING PROFILE TABLES SINE .................................................. 180 FUN 130 ACTIVATION TRACKING WITH TABELLARE SINE AND MANAGEMENT PACK HIGH PROFILE. 185 FUN132 CALCULATE THE COORDINATE OF A PALLET'S CURRENT POSITION........................ 190 FUN133 CALCULATE THE COORDINATE OF A PALLET'S SPECIFIED POSITION ...................... 191 FUN134 RESET AUTOMATIC SEQUENCE OF A PALLET..................................................................... 192 FUN196 FUNCTION TO SET/RESET VB ON ZERO ENCODER NOTCH ............................................. 193 FUN 200 INITIALIZATION RESET ENCODER THROUGH ZERO NOTCH......................................... 194 FUN 216 CALCULATION COORDINATES FOR LEANING MOVEMENT 3 AXES ............................. 195 FUN 251 MODIFY FIRMWARE PARAMETERS......................................................................................... 197 FUN 255 RUN FUNCTION WPLC FROM NC PROGRAM......................................................................... 199

Loops ....................................................................................................................................... 200 Management of variables ...................................................................................................... 201 Examples of operations on variables with instructions ........................................................ 202 Conditional instructions with variables ................................................................................ 202 Tracking management........................................................................................................... 203 Variables for managing tracking .......................................................................................... 203 Tracking mode 0................................................................................................................... 204 Tracking mode 1................................................................................................................... 204 Tracking mode 2................................................................................................................... 204 Tracking mode 3................................................................................................................... 204 Tracking mode 4................................................................................................................... 204 Tracking mode 5................................................................................................................... 204 Tracking mode 6................................................................................................................... 205 Tracking mode 7................................................................................................................... 205 Tracking mode 8................................................................................................................... 205 Tracking mode 9................................................................................................................... 205 Tracking mode 10................................................................................................................. 205 Tracking modes 12 and 13.................................................................................................... 205 Tracking modes 14 and 15.................................................................................................... 205 Tracking mode 101............................................................................................................... 205 Tracking modes 104, 105, 112, 113, 114 and 115................................................................ 206 Tracking modes 107 and 109................................................................................................ 206 Resetting for Twin Axes ........................................................................................................ 207 Resetting for Twin Axes ........................................................................................................ 207 Barcode management ............................................................................................................ 208 Dedicated password management ........................................................................................ 211 Page 6

M0000464

Programming Manual

Index

NC – Operating in Single State............................................................................................. 213 VBs and VNs for managing the SINGLE STATE ............................................................... 213 Automatic Cycle ................................................................................................................... 214 Manual Movement (JOG)..................................................................................................... 214 Speed Test............................................................................................................................. 214 NC Master Protocol ............................................................................................................... 215 Command error codes set in VN393 (VN_DATA_CN_MASTER_NUM)......................... 216 Status codes set in VN394 (VN_CN_MASTER_STATO).................................................. 216 ENTER INDIVIDUAL COMMANDS ................................................................................ 217 FUN120 Vn stato = 1 Vn stato = -2

217 218 218

Modbus Management Protocol............................................................................................. 220 Modbus Protocol Functions Implemented............................................................................ 221 Interface PLC LADDER MASTER ..................................................................................... 222 Protocol MASTER initialization Start Packet Set Parameters Closing packet and sending data Reading protocol state FUN110 Intialization ( MdbMasterInitProt ) FUN111: Start Packet ( MdbMasterStartPack ) FUN112: Set Parameters ( MdbMasterInsPar ) FUN113: Closing packet and sending data ( MdbMasterEndPack ) FUN114: Request protocol status Read output 1 from the node 1 and write in the VB310 of the MASTER

222 222 222 222 222 223 223 224 224 225 227

PLC LADDER SLAVE interface old protocol .................................................................... 239 PLC LADDER SLAVE interface new protocol................................................................... 241 FUN115 Variables Mapping ( WplcMdbConfMap ) Error code response

241 244

Special handling for rotating table....................................................................................... 246 Details implementation

246

Scale factor ............................................................................................................................. 248 Specularity .............................................................................................................................. 248 ISO Programming.................................................................................................................. 249 Programs generated with CAD/CAM................................................................................... 249 ISO codes recognized ........................................................................................................... 249 Programs generated with the editor ...................................................................................... 254 Types of ISO programming.................................................................................................. 257 Circular Interpolation Profile by Points Machine parameter “Acceleration factor between two entities” Machine parameter “Acceleration factor” ISO instructions

257 260 262 263 265

Use of tools........................................................................................................................... 268 Temporary transmission of ISO programs ......................................................................... 271 Example of PLC logic for temporary transmission .............................................................. 272 Programming examples......................................................................................................... 275 Examples of logical external decoding................................................................................. 275 Example of palletization....................................................................................................... 276

Variables Numerical Control Variables

280 (from 4.37 firmware version) ......................................... 281 M0000464

Pag. 7

Index

Programming Manual

Structure of the variables with DOS PLC ........................................................................... 282 Structure of the variables for Siax 80-100-110-110Light-150-300..................................... 283 Structure of the variables for Siax100 Plus ......................................................................... 284 Structure of the variables for Siax 200................................................................................. 285 Binary Variables with dedicated functions........................................................................... 286 Numeric Variables with dedicated functions........................................................................ 288 Position Variables with dedicated functions ........................................................................ 290 Binary Variables with dedicated functins............................................................................ 291 VB256 VB_START ......................................................................................................................................... 292 VB257 VB_STOP ............................................................................................................................................ 292 VB258 VB_JOG_P .......................................................................................................................................... 293 VB259 VB_JOG_M......................................................................................................................................... 293 VB260 VB_EMERG........................................................................................................................................ 293 VB261 VB_PRG_RUN � ............................................................................................................................. 294 VB262 VB_STEP_STAND_BY...................................................................................................................... 294 VB263 VB_NO_MOVE_AX........................................................................................................................... 294 VB264 VB_EDGE_STEP ............................................................................................................................... 294 VB265 VB_SET_PRG_NUM ......................................................................................................................... 295 VB266 VB_MAN_MULTI.............................................................................................................................. 295 VB267 VB_END_PRG � ............................................................................................................................. 295 VB268 VB_ACCESS_KEY ............................................................................................................................ 296 VB269 VB_NO_SETVAR .............................................................................................................................. 296 VB270 VB_TOOL_COORD .......................................................................................................................... 296 VB271 VB_TEACH ........................................................................................................................................ 297 VB272 VB_TEACH_LINE............................................................................................................................. 297 VB273 VB_CN_IN_SETVAR ........................................................................................................................ 297 VB274 VB_LOC_REM................................................................................................................................... 297 VB275 VB_MAN_AUTO................................................................................................................................ 298 VB276 VB_ST_MENU � ............................................................................................................................. 298 VB277 VB_ST_AUTO � .............................................................................................................................. 298 VB278 VB_ST_MANU � ............................................................................................................................. 298 VB279 VB_ST_ACQ_PAR � ...................................................................................................................... 298 VB280 VB_ST_TEST � ............................................................................................................................... 298 VB281 VB_ST_TEST_VEL � ..................................................................................................................... 298 VB282 VB_ST_SEMI_AUTO �.................................................................................................................. 298 VB283 VB_ST_OMNI � .............................................................................................................................. 298 VB284 VB_ST_AZZ � ................................................................................................................................. 298 VB285 VB_ST_EDIT �................................................................................................................................ 299 VB286 VB_ST_EME � ................................................................................................................................ 299 VB287 VB_AX_ENABLE � ........................................................................................................................ 299 VB288÷295 VB_FIRST_AX_DIS .......................................................................................................................... 299 VB296÷303 VB_FIRST_AX_SEL.......................................................................................................................... 299 VB304÷311 VB_FIRST_AX_IN_QUO � ........................................................................................................... 300 VB312÷319 VB_FIRST_AX_ZERO ...................................................................................................................... 300 VB320÷327 VB_FIRST_PID_DIS ......................................................................................................................... 300 VB328÷335 VB_FIRST_SET_ZERO .................................................................................................................... 301 VB336÷343 VB_FIRST_AX_JOG_M ................................................................................................................... 301 VB344÷351 VB_FIRST_AX_HOLD_S ................................................................................................................. 301 VB352÷355 VB_FIRST_IRQ_EN.......................................................................................................................... 302 VB360÷367 VB_FIRST_FOLL_EN....................................................................................................................... 302 VB368 VB_SH_REG_LATCH_IN ................................................................................................................ 302 VB369 VB_SH_REG_LATCH_OUT ............................................................................................................ 303 VB370 VB_SH_REG_IN ................................................................................................................................ 303 VB372 VB_SH_REG_CLEAR....................................................................................................................... 303 VB373 VB_DINAM_SETVAR....................................................................................................................... 304 VB374 VB_SET_ORG .................................................................................................................................... 304 VB375 VB_GET_ORG ................................................................................................................................... 304 VB376÷383 VB_FIRST_AX_SET_ORG............................................................................................................... 304 Page 8

M0000464

Programming Manual VB384 VB385 VB386 VB387 VB388 VB389 VB390 VB391 VB392 VB393 VB394 VB395 VB396 VB397 VB398 VB399 VB400 VB401 VB402 VB403 VB404 VB405 VB406 VB407 VB408 VB409 VB410 VB411 VB412 VB413 VB414 VB415 VB416 VB417 VB418 VB419 VB420 VB421 VB422 VB423 VB424 VB425 VB426 VB427 VB428 VB429 VB430 VB431 VB432 VB433 VB434 VB435 VB436 VB437 VB438 VB439 VB440

Index

VB_CONT_MOVE............................................................................................................................. 305 VB_USE_TX_PRG ............................................................................................................................. 305 VB_START_TX.................................................................................................................................. 305 VB_TX_BUF_FULL .......................................................................................................................... 305 VB_TX_IN_PR ................................................................................................................................... 306 VB_END_TX....................................................................................................................................... 306 VB_ENAB_F3 ..................................................................................................................................... 306 VB_DISAB_F1_SET_PRG ................................................................................................................ 307 VB_REV_ARC_DIR .......................................................................................................................... 308 VB_WAIT_TX_PRG.......................................................................................................................... 308 VB_PROF_PER_PNT........................................................................................................................ 308 VB_PRG_RESET ............................................................................................................................... 309 VB_DIS_SET_F .................................................................................................................................. 309 VB_PC_CHG_PRG............................................................................................................................ 309 VB_APPR_F1...................................................................................................................................... 309 VB_CN_SET_PAGE .......................................................................................................................... 309 VB_VIEW_ALRM ............................................................................................................................. 310 VB_ENABL_RES_F1......................................................................................................................... 310 VB_QUO_AX_F1 ............................................................................................................................... 310 VB_SEMI_INCR ................................................................................................................................ 311 VB_DISABIL_F1_SET_VAR............................................................................................................ 311 VB_TEACH_EL ................................................................................................................................. 311 VB_MODEM_EN............................................................................................................................... 312 VB_RETR_ENAB .............................................................................................................................. 312 VB_RETR_IND .................................................................................................................................. 312 VB_RETR_AVA ................................................................................................................................. 313 VB_RETR_IN_PR � ....................................................................................................................... 313 VB_NEXT_MOVE �....................................................................................................................... 313 VB_ROTAT_ENAB ........................................................................................................................... 314 VB_GET_ANGLE .............................................................................................................................. 314 VB_CN_CHG_PRG ........................................................................................................................... 314 VB_CN_SEL ....................................................................................................................................... 314 VB_MIDDLE_PNT ............................................................................................................................ 315 VB_TASTO_PREMUTO................................................................................................................... 315 VB_EN_FASE_AX ............................................................................................................................. 315 VB_DISAB_PC_OUT......................................................................................................................... 315 VB_REQ_CONF_MEMO ................................................................................................................. 316 VB_EN_TAV_ROT ............................................................................................................................ 316 VB_APP_WITH_ORG....................................................................................................................... 316 VB_ENAB_F6 ..................................................................................................................................... 316 VB_ENAB_OTHER_PSW................................................................................................................. 316 VB_RESET_EMERG......................................................................................................................... 317 VB_ INIT_ERR_MAIN...................................................................................................................... 317 VB_OM_EXIT .................................................................................................................................... 317 VB_OM_START_AUTO ................................................................................................................... 317 VB_OM_START_TEST .................................................................................................................... 318 VB_OM_START_TSTVEL............................................................................................................... 318 VB_OM_START_SEMI .................................................................................................................... 318 VB_OM_START_ZERO ................................................................................................................... 318 VB_OMNI_MODE............................................................................................................................. 319 VB_OM_DIS_MAN............................................................................................................................ 319 VB_OM_DIS_PAGE_STATE ........................................................................................................... 319 VB_OM_INIT_QUOTE..................................................................................................................... 319 VB_SET_AUTO_ERR ....................................................................................................................... 319 VB_NO_SET_SER_QUO .................................................................................................................. 320 VB_DIS_COP_CHK_START ........................................................................................................... 320 VB_DIS_PROFI.................................................................................................................................. 320

Numeric Variables ................................................................................................................. 321 VN256 VN257

VN_OVERRIDE_VEL....................................................................................................................... 322 VN_PRG_NUM .................................................................................................................................. 322 M0000464

Pag. 9

Index

Programming Manual

VN258 VN_KEY_CODE ................................................................................................................................ 322 VN259 VN_MOVING_AXES � .................................................................................................................. 323 VN260÷267 VN_FIRST_POS_AX_MM � ......................................................................................................... 323 VN268÷271 VN_FIRST_IRQ_CNT....................................................................................................................... 323 VN272 VN_AX_ONOFF_REC_GC .............................................................................................................. 324 VN273 VN_AX_ONOFF_DEC ...................................................................................................................... 324 VN274 VN_EN_ROLLOVER ........................................................................................................................ 324 VN276–283 VN_FIRST_FOLL_FACT ................................................................................................................. 325 VN284÷291 VN_FIRST_FOLL_ENC ................................................................................................................... 326 VN292–299 VN_FIRST_AX_OVD ........................................................................................................................ 326 VN300 VN_SH_REG_DELAY....................................................................................................................... 326 VN301 VN_NUM_PRG_START ................................................................................................................... 326 VN302 VN_VQ_INDX_EMERG ................................................................................................................... 327 VN303 VN_VQ_INDX_FEED........................................................................................................................ 327 VN304 VN_VQ_INDX_IN_POS .................................................................................................................... 327 VN305 VN_GET_ORG_NUM ....................................................................................................................... 328 VN306 VN_SET_ORG_NUM ........................................................................................................................ 328 VN307 VN_CUR_ORG_NUM ....................................................................................................................... 329 VN308 VN_MAIN_PRG_NUM ..................................................................................................................... 329 VN309 VN_CUR_PRG_NUM �.................................................................................................................. 329 VN310 VN_TX_PRG_NUM ........................................................................................................................... 329 VN311 VN_INDX_POS_ERR ........................................................................................................................ 330 VN312 VN_CUR_STEP_NUM_H � ........................................................................................................... 330 VN313 VN_CUR_STEP_NUM_L � ........................................................................................................... 330 VN314 VN_TX_STEP_H................................................................................................................................ 330 VN315 VN_TX_STEP_L ................................................................................................................................ 330 VN316–323 VN_FIRST_FOLL_DEN ................................................................................................................... 331 VN324÷331 VN_FIRST_FOLL_MODE ............................................................................................................... 332 VN332 VN_FIRST_ORG_OFFS ................................................................................................................... 332 VN333 VN_FIRST_SCALE_FCT ................................................................................................................. 332 VN334 VN_EMERG_ERR_NUM � ........................................................................................................... 333 VN335 VN_EMERG_ERR_PAR � ............................................................................................................ 334 VN336 VN_PRG_IN_F1 ................................................................................................................................. 335 VN337 VN_VQ_TOOL_COORD .................................................................................................................. 335 VN338 VN_TX_WAIT_PRG_NUM .............................................................................................................. 335 VN339 VN_SEL_AX_NUM............................................................................................................................ 335 VN340 VN_VQ_INDX_SET_F ...................................................................................................................... 336 VN341 VN_APPR_F1 ..................................................................................................................................... 336 VN342 VN_START_F1_PRG ........................................................................................................................ 336 VN343 VN_CN_ACT_PAGE � ................................................................................................................... 337 VN344 VN_CN_SET_PAGE .......................................................................................................................... 337 VN345 VN_MAIN_ERR_NUM � ............................................................................................................... 338 VN346 VN_MAIN_ERR_PAR � ................................................................................................................ 338 VN347 VN_ZERO_AX_NUM ........................................................................................................................ 338 VN348÷355 VN_FIRST_TEACH_VEL ................................................................................................................ 339 VN356 VN_VQ_FEED.................................................................................................................................... 339 VN357 VN_MODEM_STAT �.................................................................................................................... 340 VN358 VN_MODEM_CDM........................................................................................................................... 340 VN359 VN_VB_INDX_MSG.......................................................................................................................... 341 VN360 VN_SOGL_PROX_AX � ................................................................................................................ 341 VN361 VN_TYPE_MOVE � ....................................................................................................................... 341 VN362 VN_TYPE_AUTOAPP....................................................................................................................... 342 VN363 VN_TIMER_SEC_RES ..................................................................................................................... 342 VN364 VN_VQ_POS_AX ............................................................................................................................... 342 VN365 VN_VIEW_MOD................................................................................................................................ 343 VN366 VN_INS_ISTR .................................................................................................................................... 343 VN367 VN_INS_PAR1.................................................................................................................................... 344 VN368 VN_RW_VQ........................................................................................................................................ 344 VN369 VN_VQ_RW_VQ................................................................................................................................ 344 VN370 VN_DIS_FN_KEY.............................................................................................................................. 345 Page 10

M0000464

Programming Manual VN371 VN372 VN373 VN374 VN375 VN376 VN377 VN378 VN379 VN380 VN381 VN382 VN383 VN384 VN385 VN386 VN387 VN388 VN389 VN390 VN391 VN392 VN393 VN394 VN395 VN396 VN397 VN398 VN399 VN400 VN401 VN402 VN403 VN404 VN405 VN406 VN407 VN408 VN409 VN410 VN411 VN412 VN413 VN414 VN415 VN416 VN417 VN418 VN419 VN420 VN421

Index

VN_SLG_EXE_ISO ........................................................................................................................... 346 VN_FMT_DATE ................................................................................................................................ 346 VN_WAKE_FUN................................................................................................................................ 346 VN_TIPO_RACCORDO ................................................................................................................... 346 VN_ MAIN_ERR_CODE .................................................................................................................. 347 VN_PAGE_ID..................................................................................................................................... 347 VN_PAGE_BASE_ADDR ................................................................................................................. 349 VN_VQ_OBJ_AX............................................................................................................................... 349 VN_OBJ_ID ........................................................................................................................................ 350 VN_AX_QUO_MODE ....................................................................................................................... 350 VN_QUO_VQ_INDX ......................................................................................................................... 351 VN_DATA_ENAB .............................................................................................................................. 351 VN_PUT_KEY.................................................................................................................................... 351 VN_VAR_VIEW_TICK..................................................................................................................... 352 VN_MODE_PRG_LIST..................................................................................................................... 352 VN_CUR_CN_LANG......................................................................................................................... 354 VN_DISAB_STD_VIEW .................................................................................................................. 354 VN_LAST_PRG_REC ...................................................................................................................... 354 VN_TIME_DATE_IDX .................................................................................................................... 355 VN_DATA_BARC_NUM ................................................................................................................. 355 VN_BARC_STATO........................................................................................................................... 355 VN_COPY_VA .................................................................................................................................. 356 VN_DATA_CN_MASTER_NUM ..................................................................................................... 357 VN_CN_MASTER_STATO .............................................................................................................. 357 VN_CN_MASTER_NUM_SENT...................................................................................................... 357 VN_FASE_AZZERAMENTO........................................................................................................... 357 VN_DISAB_NG_COP ........................................................................................................................ 357 VN_MODBUS_COM ......................................................................................................................... 358 VN_MODBUS_COM_MODE........................................................................................................... 358 VN_STD_STATE_NUM .................................................................................................................... 358 VN_OMNI_OPER .............................................................................................................................. 358 VN_OM_PRG_NUM.......................................................................................................................... 359 VN_OM_TSTVEL_AX_NUM........................................................................................................... 359 VN_EDIT2........................................................................................................................................... 359 VN_PRG_NUM_TO_EDIT ............................................................................................................... 359 VN_FIRST_PRG_LIST ..................................................................................................................... 359 VN_LAST_PRG_LIST....................................................................................................................... 360 VN_PRG_BASE_LIST....................................................................................................................... 360 VN_COP_WARN_ERR ..................................................................................................................... 360 VN_OBJ_DATA_LIST ...................................................................................................................... 360 VN_PAGE_MODE............................................................................................................................. 361 VN_PALM_PUT_KEY ...................................................................................................................... 361 VN_CONF_ISTR................................................................................................................................ 362 VN_EMRG_ERR_COD � .............................................................................................................. 362 VN_EMRG_ERR_AX �.................................................................................................................. 362 VN_CONF_EDIT ............................................................................................................................... 363 VN_DATA_EDIT_NUM .................................................................................................................... 363 VN_MENU_FUN_CODE................................................................................................................... 363 VN_PRESET_CN_PASSW ............................................................................................................... 364 VN_CNT_RTC_FULL ....................................................................................................................... 364 VN_FLOPPY_STATE ....................................................................................................................... 364

Position Variables .................................................................................................................. 365 VQ97 VQ98 VQ99 VQ256 VQ257

VQ_VAL_RACCORDO .................................................................................................................... 366 366 366 VQ_MENU_LEVEL .......................................................................................................................... 366 VQ_MENU_LEVEL_PALM............................................................................................................. 366

Program Management

368

List Programs in memory...................................................................................................... 369 M0000464

Pag. 11

Index

Programming Manual

Delete Program....................................................................................................................... 369 Copy programs....................................................................................................................... 369 Talk with PC........................................................................................................................... 370 Total program deletion.......................................................................................................... 370 Display Editor......................................................................................................................... 371

Manual Movement

372

Manual Movement in the SIAX150 and SIAX300C........................................................... 373 Example of PLC logic for manual movement in the SIAX150 and SIAX300C.................. 374 Manual movement in the SIAX110 and SIAX110L............................................................ 375 Example of PLC logic for manual movement in the SIAX110 and SIAX110L .................. 375 Multiple Manual..................................................................................................................... 377

Automatic

378

Example of PLC logic for automatic in the SIAX150 and SIAX300C................................ 380 Example of PLC logic for Automatic in the SIAX110 and SIAX110L............................... 380 Selection of the program to execute...................................................................................... 381 Displaying the executing program........................................................................................ 381 Program name ........................................................................................................................ 381 Local/Remote control mode .................................................................................................. 382 Example of PLC logic for LOCAL/REMOTE management ............................................... 382

Tool Parameters

384

Origins

387

Setting the positions directly ................................................................................................. 388 Self-learning the origins ........................................................................................................ 389 Other useful instructions for managing origins .................................................................... 389 Example of PLC logic .......................................................................................................... 390

User programs

393

USER PROGRAMS ............................................................................................................. 394 VNs for managing User Programs User Program Command Coding (VN58) Code of the operation that generated an error (VN58) Error Type Code (VN60) User Program Management State Codes (VN59)

395 398 400 401 402

Creating a "User Program" ................................................................................................... 403 USER PROGRAM MANAGER Object .............................................................................. 403 Example 1 ............................................................................................................................. 404 Implementation of New Program Function Implementing the Add Step Function Implementing the Step Scrolling Function Program Archive PLC of the Example

407 412 412 412 415

Example 2 ............................................................................................................................. 416 Program Management HotKey Options Step Management HotKey Options Display Options List Options

417 421 422 423

Appendix Page 12

427 M0000464

Programming Manual

Index

Writing a program with any editor...................................................................................... 428 Compiling a program with CSX........................................................................................... 428 TXP.......................................................................................................................................... 429 Utilities provided with the program..................................................................................... 430 Vwap.exe .............................................................................................................................. 430 Lstvar.exe ............................................................................................................................. 430 Getvb.exe and Getvn.exe...................................................................................................... 430 Setvb.exe and Setvn.exe ....................................................................................................... 430 Stdprint.exe........................................................................................................................... 431 Stdeditc.exe........................................................................................................................... 431 Custom Logo........................................................................................................................... 432 Key codes ................................................................................................................................ 433 Key codes for the palm computer keyboard........................................................................ 434 Use of the shift register .......................................................................................................... 435 Reset Shift Register .............................................................................................................. 435 Data insertion........................................................................................................................ 435 Data extraction...................................................................................................................... 435 Serial connection with a PC .................................................................................................. 436 Serial connection with two PCs............................................................................................ 437 Enabling Management Manual Brake onTW3 Drives....................................................... 438 Revisions ................................................................................................................................. 439

M0000464

Pag. 13

Introduction

Programming Manual

Introduction The CN Sipro are divided into two types: - Series S: Siax80, Siax100, Siax110Light, Siax110, Siax150, Siax200, Siax300C - M: SIAX M8, M32 SIAX

The numerical control consists of a 32-bit central processing unit and has two software sections (NC and PLC) that work in multitasking. The NC has a broad instruction set (subroutines, counts, comparisons, mathematical operations, interpolations, indexed tables, 2 and 4-byte variables, etc.) that allows resolving the most varied loop situations. It is accompanied by significant software supports for the operator, which simplify programming and allow for checks during the execution of programs. A description of these tools is found in manual M0000518, “SiaxED Manual.” The PLC program is written using graphic sets on a PC and transmitted to the controller over a serial line. The PLC program is described in manual M0000514, "PLC Software." The numerical control has a broad instruction set and all variables are in common between the NC and the LADDER PLC. It also has 250 programmable messages with which it is possible to construct data entry or display pages or alarm display pages.

Page 14

M0000464

Programming Manual

Introduction

Programming the NC The Sipro S.r.l. tool contains a PLC and NC that work in multitasking. Usually, the PLC handles all the logic that must be continually controlled during the operation of the machine (emergencies, alarms, safety devices, manual movements, etc.). The PLC works in a cyclical manner continually controlling and updating the variables involved in the program. It is programmable from a PC using software based on a contacts program conforming to Communitarian standards. A description of this program is found in manual M0000514, "PLC Software." The NC, on the other hand, handles the automatic movements that the machine must make during the work. The NC controls all of the machine's sequential logic. The NC's programs are divided into steps and each step contains one or more instructions. In practice, starting from the first step, the NC executes one instruction at a time in sequence. The Numerical Control is programmable both directly from the keyboard of the tool and from the PC. This manual describes both programming modes in detail; at any rate, except for those cases in which you need to write very simple programs, we recommend that you program through the PC. In fact, in this latter case, there is an integrated development package for numerical control called SiaxED. This software, which has a graphic interface, includes all the tools to help programmers program Numerical Controls from Sipro S.r.l. In addition to programs for programming the NC and PLC, there are utilities available that allow performing particular operations. These utilities are described at the end of this manual.

M0000464

Pag. 15

Chapter 1 Programming directly from the keyboard

Programming manual

Chapter 1

Programming directly from the keyboard The program editor on the numerical control allows entering and displaying the work sequences that will be executed during the operation of the machine.

Page 16

M0000464

Programming manual

Chapter 1 Programming directly from the keyboard

Program Editor The Program Editor is accessed by selecting Program Management from the Main Menu and typing 4 (or by positioning on it using the [�] and [�] keys) and confirming with [ENTER]. Then select the Program Editor ([1] and [ENTER] keys). PROGRAM MANAGEMENT 1 - Program Editor 2 - List Programs in memory 3 - Delete Program Access to writing and deleting programs is enabled with Binary Variable 268 (VB access key) set to 1 by the PLC: VB268 = 1.

General rules for writing steps When you enter the Program Editor you will see the words: EDIT PRG N. 0 STEP 0 To select a program, type the number of the desired program and press [ENTER]. It is possible to give programs a name. There are 23 characters available. Press [+/-], to select the character then use [�] to move to the next character. Press [ENTER] to confirm. The next time you access the Editor, you will be offered the last program edited. If it is a new program, step number 1 is automatically selected otherwise, if the program is already present in memory, you must select the number of the desired step, confirming it with [ENTER]. At this point, the cursor moves to the instruction space. Instructions are entered by typing the corresponding code and confirming it with [ENTER] (for the codes, see List of available instructions). If you do not remember an instruction code, on-line help is available by pressing the [HELP] key. A screen appears with all the instructions. The [�] and [�] keys are used to scroll within a page and the [PAGE] key is used to scroll from page to page. Once you have identified the instruction you are looking for, just position on it and press [ENTER]: the instruction will be copied to the editor as if you had typed it. On the other hand, if you wish to exit from Help, just press the [MENU] key. Except in a few cases, the instruction parameters can be specified as constants or variables. When setting a value, press the key sequence [SHIFT] + [VAR] and VQ0, VN0 or VB0 will automatically appear depending on the type of instruction requested. Then you can set the number of the desired variable. After you have entered an instruction, pressing [ENTER] allows you to enter another one. If, on the other hand, you want to enter it in another step, you must use [�] and [�]. Only one instruction is displayed: to see the other instructions in the step, you must use [�] and []; on the other hand, to move between one step and the next within the program, you must use [�] and [�]. To save the program, you must use the [MEMO] key or, if you wish to exit without saving, you must use the [MENU] key. M0000464

Page 17

Chapter 1 Programming directly from the keyboard

Programming manual

Inserting instructions If you wish to insert an instruction before the one displayed on the screen, you must use the key combination [SHIFT] + [INS] and then type the code of the instruction desired.

Deleting instructions It is possible to delete an instruction in a program by positioning on it with the cursor (using [] and [�]) and pressing [SHIFT] + [DEL].

Replacing instructions To replace one instruction with another inside a step, position on it (using [] and [�]), press [SHIFT] + [CODE] and type the code of the new instruction: this will replace the previous one.

Modifying instructions To replace the value in an instruction, just type the new value after positioning the cursor on the value itself. Remember to confirm it with [ENTER], otherwise the previous value remains.

Change step number Use [�] and [�] to move from one step to another, displaying, respectively, the previous and following step. To display a step that is not continuous to the current one, in addition to scrolling through the various steps with [�] and [�], position with [MENU] on the number of the step and type the number desired, confirming with [ENTER]. You will jump directly to the selected step.

Inserting a step In the case of a new program, the next step is automatically inserted when you use [�]. On the other hand, if you wish to insert a step between already existing steps, you must position on the step number (with [MENU]) without however pressing [ENTER] and type [SHIFT] + [INS]. You can then enter the desired instructions. The number of all subsequent steps will automatically be increased by 1.

Deleting a step To delete a step, position on the corresponding number (using [MENU]) and type [SHIFT] + [DEL]: you will be asked to confirm and the step will be deleted if you press [ENTER] or the request will be ignored if you press [MENU].

Page 18

M0000464

Programming manual

Chapter 1 Programming directly from the keyboard

I/O descriptors In the program editor phase (firmware version 4.08 and higher), it is possible to add a descriptor to the I/Os so as to display the descriptor alongside the I/O number or to be able to select an I/O by the descriptor as well as the number. At present, this function is enabled ONLY for the REMOTE CONTROL. The descriptors are stored in data (user) programs and, at present, the following types are available: Descriptor for digital input when ON Descriptor for digital input when OFF Descriptor for digital output when ON Descriptor for digital output when OFF in this way it is possible to assign a different name to the same I/O depending on whether its status is activated or disabled (example: "pincer open" and "pincer closed"). Descriptor display is enabled by bits 8-11 of VN_MODE_PRG_LIST (VN385): if the bit is 1, descriptor display is activated. bit 11 Dig. OUT OFF

� NOTE

bit 10 Dig. OUT ON

bit 9 Dig. IN OFF

bit 8 Dig. IN ON

if the bit corresponding to the OFF status is 0, the descriptor of the ON status is taken, if present.

NOTE: The names are stored in data (user) programs since it is possible to assign different names for the same contact (or output) open with respect to the one closed, 4 data programs are necessary: digital inputs ON (contact closed) prg 9881 digital inputs OFF (contact open) prg 9882 digital outputs ON (output active) prg 9883 digital outputs OFF (output off) prg 9884 if you intend to use a single description for the ON and OFF statuses, create only the programs relative to the ON status (programs 9881 and 9883) and then, VN385, write the value 1280 (256 [bit 8] + 1024 [bit 10]) The data programs must have the following structure: o program of type 1 (unique header) o each step contains the descriptor of an I/O and must consist of a VA and a VN that must contain the I/O's progressive number o for the VAs, define a length of 11 characters (maximum descriptor length) o step 1 contains the descriptor of I/O (input or output) number 1 (the VN must contain the value 1), step 2 contains the descriptor of I/O number 2 (VN = 2) etc.; so, it is not possible to "leave holes," i.e., to omit the descriptor (step) of an intermediate I/O; if necessary, it is possible to assign to the VA that contains the descriptor a null string while the VN must contain the progressive number. M0000464

Page 19

Chapter 1 Programming directly from the keyboard

Programming manual

Program example Suppose that we wish to execute a process after moving two axes to a work position. Suppose that we want to execute this loop 10 times. EDIT PRG.N.1000 FREE.MEM: 0 19 OUTOFF 5 220 VN1 = 0

STEP 1 STEPS: 12

NAME: PIPPO

//initialization of the outputs // and of the variables used in the program

------------------- STEP 2 -------------------//initial positioning at 84 LINE 1 0.000 2 0.000 ------------------- STEP 3 -------------------// awaiting input 3 INPUT 15

the zero of the axes

15 high to continue executing loop

------------------- STEP 4 -------------------// positioning axis 80 AX 1 TO 400.000 ------------------- STEP 5 -------------------// positioning axis 80 AX 2 TO 200.000

1 to a level of 400 2 to a level of 200

------------------- STEP 6 -------------------//activation of output 18 OUTON 5

5

------------------- STEP 7 -------------------//wait three seconds 17 TIME 3.0 ------------------- STEP 8 -------------------//deactivation of output 19 OUTOFF 5

5

------------------- STEP 9 -------------------// positioning axis 80 AX 2 TO 200.000

2 to a level of 0

------------------- STEP 10 -------------------//positioning axes 80 AX 1 TO 0.000

1 to a level of 0

------------------- STEP 11 -------------------//increment of a variable 221 VN1 = VN1 + 1 ------------------- STEP 12 -------------------//if 10 loops have been 234 IF VN1 = 10 GOTO 14

used as a counter

executed end program

------------------- STEP 13 -------------------//otherwise execute the loop 8 GOTO 3

again

------------------- STEP 14 -------------------//end program 34 END

� NOTE

Page 20

The examples shown in this manual are written on a PC. When you use the editor on the control (programming directly on the keyboard), there can be slight differences such as, for example, for instruction G3. In fact, when using the control editor, it presents the levels with the following sequence: G3XY xc yc xf yf While, if you program on the PC (CSX format) it is: G3 Xxf Yyf Ixc Jyc (where xc and yc = coordinates of the centre, xf and yf = final point coordinates).

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

Chapter 2

General programming notes Programs for Numerical Controls from Sipro S.r.l. consist of a series of instructions that allow defining the work sequence in a simple manner.

M0000464

Page 21

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

Structure of an NC program A program can be written directly on the control through the use of the keyboard, or by using the PC development systems (such as the integrated development package, SiaxED). If programming directly on the numerical control, follow the programming notes in Chapter 1. In any case, we recommend programming with the PC development systems, which are simpler and more intuitive. In the event you are using the PC development systems, programs are written as text files with the extension .SRC. Programs are written using the editor provided by the development system or another editor at the programmer's option. Each program is a text that must be written conforming to a syntax that can be interpreted by the compiler provided with the Sipro S.r.l. development systems. . In general, the structure of a program is as follows: // // // // // // // // // //

********************************************************************* FILENAME: PRG0001.SRC DESCRIPTION: test NOTES: NAME: VER: DATE: --------------------------------------------------------------------First Draft 1.0 27.05.99 Latest Change *********************************************************************

#prog 0001 #name Test :Start :End End

Lines beginning with // are comments. Then, there are two program lines #prog 0001 #name Test

which are program identification directives and obligatory.

Program identification directives (number, name, definitions, files included) #prog NUM

Sets the program number to NUM

#name NAME

Sets the program name to NAME

#define



#include ""

Page 22

looks for string and replaces it with string ; the input files are scanned a first time to make any replacements and and a .TMP file is generated (OPTIONAL) Includes the file . (OPTIONAL) The included file may not contains instructions but only definitions. M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

The #include directive is usually used to insert the program definition file (file with a .h extension). The definition files are the files where you can give an alphanumeric name to the constants, variables (binary, numeric and position), inputs and outputs that you intend to use in the program. For example, if you write #include “defvar.h” in a program, during the drafting of the program you could refer to the names defined in the file “defvar.h” that are associated to the constants, variables (binary, numeric and position), inputs and outputs used in the program. Example: //***************************************************** // Axes definition //***************************************************** #define

Cart

AX1

//name axis 1

//*********************************************************** // Constants definition //*********************************************************** #define #define

WorkPosition PumpTime

#define #define #define #define #define #define #define #define

START STOP JOG+ JOGEMERGENCY FCMaximum FcMinimum CheckOK

1000

//work position //activation time //of pump (seconds) //*********************************************************** // Inputs definition //*********************************************************** 5

1 2 3 4 5 6 7 8

//*********************************************************** // Outputs definition //*********************************************************** #define #define

ENABLING Pump

1 2

//*********************************************************** // Binary variables (VB) //*********************************************************** #define

EndWork

VB1

//signals the end of work

M0000464

Page 23

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

So, by putting the line #include defvar.h in the program, it is possible to use the definitions made in defvar.h in writing the instructions. Example: #prog 1000 #name PIPPO #include "defvar.h" :

Cart TO 0

//move to zero //initial check

:WaitInput IF IN CheckOK GOTO Proceed :

//if = 1 OK, otherwise //retry the check

GOTO WaitInput

:Proceed : : : :

Cart TO WorkPosition OUTON Pump TIME PumpTime OUTOFF Pump EndWork = 1

:

//work positioning //activation OUT 2 //wait a certain time //deactivation OUT 2 //signals end of work

end

In this way, the programs become much easier to understand. When a program written in this manner is compiled, an additional .tmp is created corresponding to the .src program with the value substitutions in place of the names. A program consists of a series of steps that form the sequence of the operations that you wish to execute. After the identification directives, the steps of the program are written. When writing the sequence of steps inside the program, you must follow the rules of syntax.

Step syntax : instruc.

: sets the beginning of a new step, is the label of the step (OPTIONAL) instruc. the instruction must be written as indicated in the list, and leaving at least one space after the ":"

//

Begins a comment that ends at the end of the line

{ }

comment in a line with ISO instructions

The number of steps that can be stored depends on the type and number of instructions used for each step. Each step can contain several instructions that are logically connected with each other. The number of instructions contained in a step depends on the type: in the event that instructions are entered for variables, there can be, at most, 8 instructions for each step. On the other hand, in the event that you are using FULL STEP instructions (these are jump, loop, conditional and end program instructions), they are entered alone in one step. Page 24

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

Putting several instructions in a step is useful in the event it is necessary to push instruction execution and calculation times to the maximum. However, it is generally recommended that you only put one instruction per step. The numerical control provides a set of instructions that can be used in programming. The list of instructions is found in the paragraph, “Instruction list.”

M0000464

Page 25

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

Example of an NC program // // // // // //

************************************************************************ FILENAME: Prg1000.src COMPANY: SIPRO S.r.l. viale dell'Industria, 7 - 37135 VERONA - tel. (045) 508822 DESCRIPTION: Program example ************************************************************************

#prog 1000 #name Pippo // ************************************************************************ // CODE // ************************************************************************ :

AX1 TO 0 VB1 = 0 OUTOFF 16

//move to zero

:Loop1 :

IF IN 16 GOTO WorkPos GOTO Loop1

:WorkPos : : : :

AX1 TO 1000 OUTON 16 TIME 5 OUTOFF 16 VB1 = 1

:

end

//initial check //if 1 OK, otherwise //retry check //work positioning //activation 16 //wait a certain time //deactivation 16 //signal end of work

As can be seen from the example, there is also the possibility of identifying the steps with labels and using them in jump (GOTO) instructions. This allows inserting new instructions in the program without having to fix references to steps in the instructions. The program provides for the END instruction. This instruction defines the end of the program and is obligatory. For example, programming using a normal editor is useful because it is possible to see several steps of the program (identified by ":" at the beginning of the line) in a single screen. It is also possible to comment program lines by placing the characters "//" before the comment.

Compiling Program When you have completed writing the program, you must compile the module into a user executable (i.e., in machine language), and then transfer it to the NC. For compiling and handling any errors, see the relative paragraphs of the PC development system, (SiaxED), or using the following DOS command: CSX {-g} {-ha} {-nologo} {} -g enable generation of debug files -ha expanded HA istruction -nologo don’t see initial logo file name to process

Page 26

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

Instruction priorities If there are several instructions in a step, they are evaluated and executed by the program according to a precise sequence, independently of the order in which they are written, and following the priorities defined in the table below. This table can be useful (in addition to the program writing phase) also for the Automatic interpretation of what is effectively happening during execution, since it indicates the possible statuses in which a system can find itself inside a step. The status indication is visible in the automatic page above and to the right. (St n). 1 2 3 4 5 6 7 8 9 10 11 12 13

Interpretation (step enabling) Management of variables Generic status Conditonal instructions Awaiting inputs Speed settings Special function calls Moving axes Conditioned movements Waiting for axes in position Set digital outputs Set wait times Wait times

Table of instruction priorities within a step.

For example, if a step contains instructions that are waiting for inputs and an axis movement, the instructions waiting for inputs will be evaluated first (priority 5) before the axis movement instruction (priority 8). In the case of instructions of the same type in the same step, these are executed simultaneously. For example, this allows starting the movement of several axes at the same time. In the case of several identical instructions in the same step, the value of the valid instruction is the last written. Example: #prog 1000 #name Pippo : AX 1 TO 500.00 AX 2 TO 30000 OUTON 1 AX 1 TO 100.00

In this case, axis 1 goes to position 100.00, since it is the last instruction of step1 indicated by a single ":".

M0000464

Page 27

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

Normally, steps are executed in their natural sequence (step 1, 2, 3 ...); this sequence can be altered by specific instructions: • instructions with GOTO: allow a jump to another step within the program. • instructions with GOSUB: allow jumping to another program with a return to the main program once execution is finished. The return occurs at the step after the one in which the GOSUB was called. • instructions with JMPPRG: allow making a jump to another program without a return to the main program once execution is finished. In this way it is possible to define subroutines, i.e., to pass control during the execution of the main program to another program or to another part of the same program. This allows dividing the problem into many parts and executing each part with a program of smaller size and, thus, more controllable and to give the main program the job of guiding the various subroutines. Using this programming technique makes programs more legible and easier to develop and test. Another advantage is that it allows setting a cyclical sequence of operations that is directly callable. Example: To execute 10 equidistant holes, one subroutine will be written that constitutes the drilling loop: � motor rotation ON; � axis Y descending at drilling speed; � return to initial axis Y position; � motor rotation OFF; � signaling through the execution of a timed output; � end of the subroutine. The work program will consist of a positioning of the first hole in position X, the opening of a loop (which will be repeated 10 times), of the recall of the subroutine that executes the drilling and of an increment of the position equal to the desired spacing. The problem is thus resolved with an extremely small number of instructions compared to what one would have had to write specifying each individual position and rewriting the drilling loop 10 times.

Page 28

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

List of available instructions Instruction list assignment values to variables Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione

( 195 ) VB [VNi] = n ( 190 ) VBi = EQ2D v1 v2 v3 n ( 246 ) VBi = VB[VNj ] ( 240 ) VBi = x ( 189 ) VBi = x ( 192 ) VN[VNi] = n ( 220 ) VNi = m ( 188 ) VNi = m ( 221 ) VNi = m + n ( 222 ) VNi = m - n ( 225 ) VNi = VQj ( 227 ) VNi = VN[VNj] ( 238 ) VNi = STEP + n ( 191 ) VQ[VNi] = m ( 200 ) VQi = m ( 187 ) VQi = m ( 184 ) VQi = ATAN2 (m,j) ( 186 ) VQi = CATH (m,j) ( 185 ) VQi = DIST (m,j) ( 193 ) VQi = m * j ( 194 ) VQi = m / j ( 180 ) VQi = m * SIN j ( 181 ) VQi = m * COS j ( 182 ) VQi = m / SIN j ( 183 ) VQi = m / COS j ( 201 ) VQi = m + j ( 202 ) VQi = m - j ( 203 ) VQi = m * n ( 204 ) VQi = m / n (197) VQi = j % k ( 205 ) VQi = VNj ( 206 ) VQi = POS AX n ( 207 ) VQi = VQ[VNj]

Instructions for the management of digital inputs and outputs Istruzione Istruzione Istruzione Istruzione

( 3 ) INPUT n ( 18 ) OUTON n ( 19 ) OUTOFF n ( 15 ) PULSE n

Instructions for the management of analogs inputs and outputs Istruzione Istruzione Istruzione

( 14 ) AN OUT n = m ( 228 ) VNi = AI m ( 208 ) VQi = AI n M0000464

Page 29

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

Instructions for the management of timers Istruzione

( 17 ) TIME m

Instructions for the management of the axes Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione

( 77 ) ANT AX n TP t VAL q ( 94 ) AX n INCR m ( 80 ) AX n TO m ( 85 ) AX n VEL v QUOTE m ( 35 ) NO WAIT AX ( 93 ) QUOTE AX n = m ( 86 ) SET POS AX n = m ( 83 ) STOP AX n ( 82 ) VEL AX n = m % ( 92 ) VEL AX n = m [mm/min]

Instructions for handling of axes with interpolation Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione

( 38 ) CONT MOVE � ( 57 ) F m � ( 60 ) FXY m � ( 61 ) G1 X xf Y yf � ( 56 ) G103 P n VQi � ( 66 ) G1XYN xf, yf, n, nf � ( 62 ) G2 X xf Y yf I xc J yc � ( 72 ) G2R r e xf yf � ( 67 ) G2XYN xc yc xf yf n qf � ( 63 ) G3 X xf Y yf i xc J yc � ( 73 ) G3R r e xf yf � ( 68 ) G3XYN xc, yc, xf, yf, n, qf � ( 37 ) INTP MODE = n � ( 31 ) INTP PAR n AX m P p � ( 84 ) LINE n1 m1 n2 m2 ( 50 ) LINE2 q1 q2 � ( 51 ) LINE3 q1 q2 q3 � ( 52 ) LINE4 q1 q2 q3 q4 � ( 53 ) LINE5 q1 q2 q3 q4 q5 � ( 54 ) LINE6 q1 q2 q3 q4 q5 q6 � ( 70 ) MOVEXYT xf yf tf � ( 39 ) NO CONT MOVE �

Instructions for the management of the origins Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione

Page 30

( 49 ) INCR ORG m AX n VAL i � ( 55 ) ORG n (oppure G55 n) � ( 47 ) SET ANGLE ORG n VAL i � ( 59 ) SET ORG m AX n VAL i ( 48 ) VQi = GET ANGLE ORG n � ( 58 ) VQi = ORG m AX n

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

Instructions for managing tools (instructions developed for specific applications. To use these instructions consult the Sipro technical department ) Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione

( 40 ) G40 � ( 41 ) G41 � ( 42 ) G42 � ( 43 ) G43 (oppure TOOL EXT) � ( 44 ) G44 (oppure TOOL INT ) � ( 45 ) G45 � ( 75 ) TOOL ANGLE = m � ( 74 ) TOOL n �

Instructions for controlling the flow of the program Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione Istruzione

( 34 ) END � ( 4 ) GOSUB n � ( 8 ) GOTO n � ( 142 ) IF AX n GOSUB m � ( 146 ) IF AX n GOTO m � ( 132 ) IF IN n GOSUB m � ( 133 ) IF IN n JMPPRG m � ( 136 ) IF IN n GOTO m � ( 248 ) IF VBi = ValB GOTO m � ( 230 ) IF VNi < n GOSUB m � ( 231 ) IF VNi = n GOSUB m � ( 232 ) IF VNi > n GOSUB m � ( 233 ) IF VNi < n GOTO m � ( 234 ) IF VNi = n GOTO m � ( 235 ) IF VNi > n GOTO m � ( 210 ) IF VQi < m GOSUB n � ( 211 ) IF VQi = m GOSUB n � ( 212 ) IF VQi > m GOSUB n � ( 213 ) IF VQi < m GOTO n � ( 214 ) IF VQi = m GOTO n � ( 215 ) IF VQi > m GOTO n � ( 5 ) JMPPRG n � ( 102 ) MEM STEP VNi ( 87 ) SKIP WAIT AX n ( 36 ) WAIT AX ( 81 ) WAIT AX n IN QUOTE

Instructions managing parallel programs Istruzione Istruzione

( 120 ) FORK PROG n ( 121 ) KILL PROG n

M0000464

Page 31

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

Instructions for the management of the parameters of the numerical control Istruzione Istruzione Istruzione Istruzione

( 176 ) VBi = SETMAC PAR n VAL m ( 178 ) VBi = SETP AX n PAR j VAL m ( 177 ) VQi = GETMAC PAR n ( 179 ) VQi = GETP AX n PAR j

Instructions for general use Istruzione Istruzione

Page 32

( 104 ) VQi = FUN n p1 p2 p3 p4 ( 247 ) WAIT VBi

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

In the list of available instructions that will now be shown, the following conventions are used:

{xxx}

Notations indicates that the parameter xxx is optional (can be omitted)



indicates a constant



indicates a constant (0, 1) or a Binary Variable



indicates a constant or a Numeric Variable



indicates a decimal constant or a Position Variable



instruction present only for compatibility with preceding versions. We recommend using the equivalent instruction in order to take advantage of all the programming help systems that will be developed by SIPRO Srl.



instruction available in versions with interpolation.



instruction available in versions with interpolation and tool management.



Full Step type instruction.

� Instruction to be executed preferably with PLC

� NOTE

The instructions for inputs or outputs (eg INPUT n, n OUTON etc..) Are valid for 1 to 64 inputs and outputs 1 to 64.Se you want to use the inputs or outputs from the NC program with index greater than 64 is necessary to use special firmware

M0000464

Page 33

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

N.B. The syntax of programming instructions follows this convention:

Instruction NC Editor format m Programming syntax in PC Editor Syntax for programming in NC keyboard Editor m indicates the number associated to the instruction

Index of available instructions Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Page 34

(14) AN OUT n = m ................................................................................................... 40 (77) ANT AX n TP t VAL q ...................................................................................... 41 ( 94 ) AX n INCR m................................................................................................... 42 (38) CONT MOVE � ............................................................................................... 46 (34) END � .............................................................................................................. 47 (57) F m � ................................................................................................................ 48 (120) FORK PROG n ................................................................................................. 49 (60) FXY m �........................................................................................................... 50 (61) G1 X xf Y yf � ................................................................................................ 50 (56) G103 P n VQi �................................................................................................ 51 (66) G1XYN xf, yf, n, nf � ...................................................................................... 55 (62) G2 X xf Y yf I xc J yc � ................................................................................... 56 (72) G2R r e xf yf � ................................................................................................. 57 (67) G2XYN xc yc xf yf n qf �................................................................................. 58 (63) G3 X xf Y yf i xc J yc � .................................................................................... 59 (73) G3R r e xf yf � ................................................................................................. 60 (68) G3XYN xc, yc, xf, yf, n, qf �........................................................................... 61 (40) G40 �................................................................................................................ 62 (41) G41 �................................................................................................................ 64 (42) G42 �................................................................................................................ 66 (43) G43 (or TOOL EXT) �..................................................................................... 67 (44) G44 (or TOOL INT) �...................................................................................... 68 (45) G45 �................................................................................................................ 69 (4) GOSUB n � ........................................................................................................ 70 (8) GOTO n �.......................................................................................................... 71 (142) IF AX n GOSUB m �.................................................................................... 72 (146) IF AX n GOTO m � ....................................................................................... 73 (132) IF IN n GOSUB m � ...................................................................................... 74 (133) IF IN n JMPPRG m �..................................................................................... 75 (136) IF IN n GOTO m �......................................................................................... 76 (248) IF VBi = ValB GOTO m �............................................................................. 77 (230) IF VNi < n GOSUB m �................................................................................. 78 (231) IF VNi = n GOSUB m �................................................................................. 79 (232) IF VNi > n GOSUB m �................................................................................. 79 (233) IF VNi < n GOTO m � ................................................................................... 80 (234) IF VNi = n GOTO m � ................................................................................... 81 (235) IF VNi > n GOTO m � ................................................................................... 81 (210) IF VQi < m GOSUB n �................................................................................. 82 (211) IF VQi = m GOSUB n �................................................................................. 83 (212) IF VQi > m GOSUB n �................................................................................. 83 (213) IF VQi < m GOTO n � ................................................................................... 84 (214) IF VQi = m GOTO n � ................................................................................... 85 (215) IF VQi > m GOTO n � ................................................................................... 85 (49) INCR ORG m AX n VAL i �........................................................................... 86 M0000464

Manuale di programmazione Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction Instruction

Capitolo 8: Origini7: Parametri utensili (3) INPUT n ............................................................................................................... 87 (37) INTP MODE = n �........................................................................................... 88 (31) INTP PAR n AX m P p � ................................................................................. 89 (5) JMPPRG n �....................................................................................................... 91 (121) KILL PROG n................................................................................................... 91 (84) LINE n1 m1 n2 m2 ............................................................................................. 92 (50) LINE2 q1 q2 �.................................................................................................. 93 (51) LINE3 q1 q2 q3 �............................................................................................. 93 (52) LINE4 q1 q2 q3 q4 �........................................................................................ 93 (53) LINE5 q1 q2 q3 q4 q5 �.................................................................................... 94 (54) LINE6 q1 q2 q3 q4 q5 q6 �.............................................................................. 94 (102) MEM STEP VNi............................................................................................... 95 (70) MOVEXYT xf yf tf �....................................................................................... 96 (39) NO CONT MOVE � ........................................................................................ 97 (35) NO WAIT AX .................................................................................................... 98 (55) ORG n (or G55 n) � ....................................................................................... 101 (18) OUTON n ......................................................................................................... 103 (19) OUTOFF n........................................................................................................ 103 (15) PULSE n ........................................................................................................... 104 (93) QUOTE AX n = m............................................................................................ 105 (47) SET ANGLE ORG n VAL i � ....................................................................... 106 (59) SET ORG m AX n VAL i................................................................................. 107 (86) SET POS AX n = m.......................................................................................... 108 (87) SKIP WAIT AX n ............................................................................................ 109 (83) STOP AX n....................................................................................................... 110 (17) TIME m ............................................................................................................ 111 (75) TOOL ANGLE = m � .................................................................................... 112 (74) TOOL n � ....................................................................................................... 113 (195) VB [VNi] = n.................................................................................................. 113 (190) VBi = EQ2D v1 v2 v3 n ................................................................................. 114 ( 176 ) VBi = SETMAC PAR n VAL m .................................................................. 115 (178) VBi = SETP AX n PAR j VAL m .................................................................. 116 (246) VBi = VB[VNj ] ............................................................................................. 117 (240) VBi = x ........................................................................................................... 117 (189) VBi = x ........................................................................................................... 118 (82) VEL AX n = m % ............................................................................................. 118 (92) VEL AX n = m [mm/min] ................................................................................ 119 (192) VN[VNi] = n................................................................................................... 119 (220) VNi = m .......................................................................................................... 119 (188) VNi = m .......................................................................................................... 120 (221) VNi = m + n.................................................................................................... 120 (222) VNi = m - n..................................................................................................... 121 (225) VNi = VQj ...................................................................................................... 121 (227) VNi = VN[VNj].............................................................................................. 122 (228) VNi = AI m..................................................................................................... 122 (238) VNi = STEP + n.............................................................................................. 123 (191) VQ[VNi] = m.................................................................................................. 123 (200) VQi = m .......................................................................................................... 124 (187) VQi = m .......................................................................................................... 125 (208) VQi = AI n ...................................................................................................... 125 (184) VQi = ATAN2 (m,j) ....................................................................................... 126 (186) VQi = CATH (m,j) ......................................................................................... 126 (185) VQi = DIST (m,j) ........................................................................................... 127 (104) VQi = FUN n p1 p2 p3 p4 .............................................................................. 128 (48) VQi = GET ANGLE ORG n � ....................................................................... 128 (177) VQi = GETMAC PAR n................................................................................. 129 (179) VQi = GETP AX n PAR j............................................................................... 129 (193) VQi = m * j ..................................................................................................... 130 (194) VQi = m/j........................................................................................................ 130 (180) VQi = m * SIN j.............................................................................................. 131 M0000464

Page 35

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

Instruction (181) VQi = m * COS j ............................................................................................ 131 Instruction (182) VQi = m/SIN j ................................................................................................ 132 Instruction (183) VQi = m/COS j ............................................................................................... 132 Instruction (201) VQi = m + j..................................................................................................... 133 Instruction (202) VQi = m - j...................................................................................................... 133 Instruction (203) VQi = m * n .................................................................................................... 134 Instruction (204) VQi = m/n ...................................................................................................... 134 Instruction (197) VQi = j % k..................................................................................................... 134 Instruction (205) VQi = VNj ...................................................................................................... 135 Instruction (58) VQi = ORG m AX n ......................................................................................... 136 Instruction (206) VQi = POS AX n ............................................................................................ 136 Instruction (207) VQi = VQ[VNj].............................................................................................. 137 Instruction (36) WAIT AX ......................................................................................................... 137 Instruction (81) WAIT AX n IN QUOTE .................................................................................. 137 Instruction (247) WAIT VBi ...................................................................................................... 138 FUN 61 DIGITAL CAM MANAGEMENT INITIALIZATION AND RESET CAMS.......... 143 FUN 62 ACTIVATION, CHANGE OR DEACTIVATION OF A DIGITAL CAM................ 144 FUN 71 ACQUISITION OF AXIS LEVEL FROM INTERRUPT OF THE ENCODER ZERO NOTCH 152 FUN 72 INITIALIZATION VARIABLES FOR IRQ MANAGEMENT ON CANopen ......... 160 FUN 76 – 77POSITION ROLLOVER ......................................................................................... 161 FUN78 SET MODES FOR COUPLING AND UNCOUPLING TRACKING ........................ 162 FUN 79 MODIFY THE OBJECTIVE LEVEL OF AN AXIS IN MOTION............................ 165 FUN 80 MODIFY AXIS POSITION WITH AXIS IN MOTION ............................................ 167 FUN 81 RESET FUNCTION IN AUTOMATIC CYCLE........................................................ 169 FUN 82 FUNCTION OF CHANGE SPEED AT FINAL LEVEL............................................ 171 FUN128 PALLET MANAGEMENT........................................................................................ 181 FUN131 INITIALIZES PALLET MANAGEMENT................................................................ 188 FUN132 CALCULATE THE COORDINATE OF A PALLET'S CURRENT POSITION...... 190 FUN133 CALCULATE THE COORDINATE OF A PALLET'S SPECIFIED POSITION..... 191 FUN134 RESET AUTOMATIC SEQUENCE OF A PALLET................................................ 192 FUN196 FUNCTION TO SET/RESET VB ON ZERO ENCODER NOTCH ......................... 193 FUN 200 INITIALIZATION RESET ENCODER THROUGH ZERO NOTCH ..................... 194 FUN 216 CALCULATION COORDINATES FOR LEANING MOVEMENT 3 AXES ........ 195 FUN 251 MODIFY FIRMWARE PARAMETERS.................................................................. 197 FUN 255 RUN FUNCTION WPLC FROM NC PROGRAM .................................................. 199 VB256 VB_START .................................................................................................................. 292 VB257 VB_STOP ..................................................................................................................... 292 VB258 VB_JOG_P ................................................................................................................... 293 VB259 VB_JOG_M .................................................................................................................. 293 VB260 VB_EMERG ................................................................................................................. 293 VB261 VB_PRG_RUN � ...................................................................................................... 294 VB262 VB_STEP_STAND_BY............................................................................................... 294 VB263 VB_NO_MOVE_AX.................................................................................................... 294 VB264 VB_EDGE_STEP ......................................................................................................... 294 VB265 VB_SET_PRG_NUM................................................................................................... 295 VB266 VB_MAN_MULTI ....................................................................................................... 295 VB267 VB_END_PRG �....................................................................................................... 295 VB268 VB_ACCESS_KEY...................................................................................................... 296 VB269 VB_NO_SETVAR........................................................................................................ 296 VB270 VB_TOOL_COORD .................................................................................................... 296 VB271 VB_TEACH.................................................................................................................. 297 VB272 VB_TEACH_LINE....................................................................................................... 297 VB273 VB_CN_IN_SETVAR.................................................................................................. 297 VB274 VB_LOC_REM ............................................................................................................ 297 VB275 VB_MAN_AUTO......................................................................................................... 298 VB276 VB_ST_MENU � ...................................................................................................... 298 VB277 VB_ST_AUTO � ....................................................................................................... 298 VB278 VB_ST_MANU �...................................................................................................... 298 VB279 VB_ST_ACQ_PAR � ................................................................................................ 298 Page 36

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

VB280 VB_ST_TEST � ........................................................................................................ 298 VB281 VB_ST_TEST_VEL �............................................................................................... 298 VB282 VB_ST_SEMI_AUTO � ........................................................................................... 298 VB283 VB_ST_OMNI � ....................................................................................................... 298 VB284 VB_ST_AZZ � .......................................................................................................... 298 VB285 VB_ST_EDIT �......................................................................................................... 299 VB286 VB_ST_EME �.......................................................................................................... 299 VB287 VB_AX_ENABLE � ................................................................................................. 299 VB288÷295 VB_FIRST_AX_DIS ............................................................................................... 299 VB296÷303 VB_FIRST_AX_SEL............................................................................................... 299 VB304÷311 VB_FIRST_AX_IN_QUO �................................................................................. 300 VB312÷319 VB_FIRST_AX_ZERO ........................................................................................... 300 VB320÷327 VB_FIRST_PID_DIS............................................................................................... 300 VB328÷335 VB_FIRST_SET_ZERO .......................................................................................... 301 VB336÷343 VB_FIRST_AX_JOG_M......................................................................................... 301 VB344÷351 VB_FIRST_AX_HOLD_S ...................................................................................... 301 VB352÷355 VB_FIRST_IRQ_EN ............................................................................................... 302 VB360÷367 VB_FIRST_FOLL_EN ............................................................................................ 302 VB368 VB_SH_REG_LATCH_IN........................................................................................... 302 VB369 VB_SH_REG_LATCH_OUT....................................................................................... 303 VB370 VB_SH_REG_IN.......................................................................................................... 303 VB372 VB_SH_REG_CLEAR ................................................................................................. 303 VB373 VB_DINAM_SETVAR ................................................................................................ 304 VB374 VB_SET_ORG ............................................................................................................. 304 VB375 VB_GET_ORG............................................................................................................. 304 VB376÷383 VB_FIRST_AX_SET_ORG .................................................................................... 304 VB384 VB_CONT_MOVE ...................................................................................................... 305 VB385 VB_USE_TX_PRG ...................................................................................................... 305 VB386 VB_START_TX ........................................................................................................... 305 VB387 VB_TX_BUF_FULL .................................................................................................... 305 VB388 VB_TX_IN_PR............................................................................................................. 306 VB389 VB_END_TX ............................................................................................................... 306 VB390 VB_ENAB_F3 .............................................................................................................. 306 VB391 VB_DISAB_F1_SET_PRG .......................................................................................... 307 VB392 VB_REV_ARC_DIR .................................................................................................... 308 VB393 VB_WAIT_TX_PRG.................................................................................................... 308 VB394 VB_PROF_PER_PNT .................................................................................................. 308 VB395 VB_PRG_RESET ......................................................................................................... 309 VB396 VB_DIS_SET_F ........................................................................................................... 309 VB397 VB_PC_CHG_PRG ...................................................................................................... 309 VB398 VB_APPR_F1............................................................................................................... 309 VB399 VB_CN_SET_PAGE .................................................................................................... 309 VB400 VB_VIEW_ALRM ....................................................................................................... 310 VB401 VB_ENABL_RES_F1 .................................................................................................. 310 VB402 VB_QUO_AX_F1 ........................................................................................................ 310 VB403 VB_SEMI_INCR .......................................................................................................... 311 VB404 VB_DISABIL_F1_SET_VAR...................................................................................... 311 VB405 VB_TEACH_EL........................................................................................................... 311 VB406 VB_MODEM_EN ........................................................................................................ 312 VB407 VB_RETR_ENAB ........................................................................................................ 312 VB408 VB_RETR_IND............................................................................................................ 312 VB409 VB_RETR_AVA .......................................................................................................... 313 VB410 VB_RETR_IN_PR � ................................................................................................. 313 VB411 VB_NEXT_MOVE � ................................................................................................ 313 VB412 VB_ROTAT_ENAB..................................................................................................... 314 VB413 VB_GET_ANGLE........................................................................................................ 314 VB414 VB_CN_CHG_PRG ..................................................................................................... 314 VB415 VB_CN_SEL ................................................................................................................ 314 VB416 VB_MIDDLE_PNT ...................................................................................................... 315 VB417 VB_TASTO_PREMUTO ............................................................................................. 315 M0000464

Page 37

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

VB418 VB_EN_FASE_AX ...................................................................................................... 315 VB419 VB_DISAB_PC_OUT .................................................................................................. 315 VB420 VB_REQ_CONF_MEMO ............................................................................................ 316 VB421 VB_EN_TAV_ROT...................................................................................................... 316 VB422 VB_APP_WITH_ORG................................................................................................. 316 VB423 VB_ENAB_F6 .............................................................................................................. 316 VB424 VB_ENAB_OTHER_PSW........................................................................................... 316 VB425 VB_RESET_EMERG................................................................................................... 317 VB426 VB_ INIT_ERR_MAIN................................................................................................ 317 VB427 VB_OM_EXIT ............................................................................................................. 317 VB428 VB_OM_START_AUTO............................................................................................. 317 VB429 VB_OM_START_TEST .............................................................................................. 318 VB430 VB_OM_START_TSTVEL ......................................................................................... 318 VB431 VB_OM_START_SEMI .............................................................................................. 318 VB432 VB_OM_START_ZERO.............................................................................................. 318 VB433 VB_OMNI_MODE....................................................................................................... 319 VB434 VB_OM_DIS_MAN..................................................................................................... 319 VB435 VB_OM_DIS_PAGE_STATE ..................................................................................... 319 VB436 VB_OM_INIT_QUOTE ............................................................................................... 319 VB437 VB_SET_AUTO_ERR ................................................................................................. 319 VB438 VB_NO_SET_SER_QUO ............................................................................................ 320 VB439 VB_DIS_COP_CHK_START...................................................................................... 320 VB440 VB_DIS_PROFI ........................................................................................................... 320 VN256 VN_OVERRIDE_VEL................................................................................................. 322 VN257 VN_PRG_NUM ........................................................................................................... 322 VN258 VN_KEY_CODE ......................................................................................................... 322 VN259 VN_MOVING_AXES � ........................................................................................... 323 VN260÷267 VN_FIRST_POS_AX_MM �............................................................................... 323 VN268÷271 VN_FIRST_IRQ_CNT ............................................................................................ 323 VN272 VN_AX_ONOFF_REC_GC ........................................................................................ 324 VN273 VN_AX_ONOFF_DEC................................................................................................ 324 VN274 VN_EN_ROLLOVER .................................................................................................. 324 VN276–283 VN_FIRST_FOLL_FACT ....................................................................................... 325 VN284÷291 VN_FIRST_FOLL_ENC ......................................................................................... 326 VN292–299 VN_FIRST_AX_OVD ............................................................................................. 326 VN300 VN_SH_REG_DELAY ................................................................................................ 326 VN301 VN_NUM_PRG_START ............................................................................................. 326 VN302 VN_VQ_INDX_EMERG ............................................................................................. 327 VN303 VN_VQ_INDX_FEED................................................................................................. 327 VN304 VN_VQ_INDX_IN_POS ............................................................................................. 327 VN305 VN_GET_ORG_NUM ................................................................................................. 328 VN306 VN_SET_ORG_NUM.................................................................................................. 328 VN307 VN_CUR_ORG_NUM................................................................................................. 329 VN308 VN_MAIN_PRG_NUM ............................................................................................... 329 VN309 VN_CUR_PRG_NUM � ........................................................................................... 329 VN310 VN_TX_PRG_NUM .................................................................................................... 329 VN311 VN_INDX_POS_ERR.................................................................................................. 330 VN312 VN_CUR_STEP_NUM_H �..................................................................................... 330 VN313 VN_CUR_STEP_NUM_L � ..................................................................................... 330 VN314 VN_TX_STEP_H ......................................................................................................... 330 VN315 VN_TX_STEP_L ......................................................................................................... 330 VN316–323 VN_FIRST_FOLL_DEN ......................................................................................... 331 VN324÷331 VN_FIRST_FOLL_MODE...................................................................................... 332 VN332 VN_FIRST_ORG_OFFS.............................................................................................. 332 VN333 VN_FIRST_SCALE_FCT............................................................................................ 332 VN334 VN_EMERG_ERR_NUM � ..................................................................................... 333 VN335 VN_EMERG_ERR_PAR �....................................................................................... 334 VN336 VN_PRG_IN_F1 .......................................................................................................... 335 VN337 VN_VQ_TOOL_COORD ............................................................................................ 335 VN338 VN_TX_WAIT_PRG_NUM........................................................................................ 335 Page 38

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

VN339 VN_SEL_AX_NUM .................................................................................................... 335 VN340 VN_VQ_INDX_SET_F................................................................................................ 336 VN341 VN_APPR_F1 .............................................................................................................. 336 VN342 VN_START_F1_PRG .................................................................................................. 336 VN343 VN_CN_ACT_PAGE � ............................................................................................ 337 VN344 VN_CN_SET_PAGE.................................................................................................... 337 VN345 VN_MAIN_ERR_NUM �......................................................................................... 338 VN346 VN_MAIN_ERR_PAR � .......................................................................................... 338 VN347 VN_ZERO_AX_NUM ................................................................................................. 338 VN348÷355 VN_FIRST_TEACH_VEL ...................................................................................... 339 VN356 VN_VQ_FEED............................................................................................................. 339 VN357 VN_MODEM_STAT � ............................................................................................. 340 VN358 VN_MODEM_CDM .................................................................................................... 340 VN359 VN_VB_INDX_MSG .................................................................................................. 341 VN360 VN_SOGL_PROX_AX � ......................................................................................... 341 VN361 VN_TYPE_MOVE �................................................................................................. 341 VN362 VN_TYPE_AUTOAPP ................................................................................................ 342 VN363 VN_TIMER_SEC_RES................................................................................................ 342 VN364 VN_VQ_POS_AX........................................................................................................ 342 VN365 VN_VIEW_MOD......................................................................................................... 343 VN366 VN_INS_ISTR ............................................................................................................. 343 VN367 VN_INS_PAR1 ............................................................................................................ 344 VN368 VN_RW_VQ ................................................................................................................ 344 VN369 VN_VQ_RW_VQ......................................................................................................... 344 VN370 VN_DIS_FN_KEY....................................................................................................... 345 VN371 VN_SLG_EXE_ISO..................................................................................................... 346 VN372 VN_FMT_DATE.......................................................................................................... 346 VN373 VN_WAKE_FUN......................................................................................................... 346 VN374 VN_TIPO_RACCORDO.............................................................................................. 346 VN375 VN_ MAIN_ERR_CODE ............................................................................................ 347 VN376 VN_PAGE_ID.............................................................................................................. 347 VN377 VN_PAGE_BASE_ADDR........................................................................................... 349 VN378 VN_VQ_OBJ_AX ........................................................................................................ 349 VN379 VN_OBJ_ID ................................................................................................................. 350 VN380 VN_AX_QUO_MODE ................................................................................................ 350 VN381 VN_QUO_VQ_INDX .................................................................................................. 351 VN382 VN_DATA_ENAB....................................................................................................... 351 VN383 VN_PUT_KEY............................................................................................................. 351 VN384 VN_VAR_VIEW_TICK .............................................................................................. 352 VN385 VN_MODE_PRG_LIST............................................................................................... 352 VN386 VN_CUR_CN_LANG.................................................................................................. 354 VN387 VN_DISAB_STD_VIEW............................................................................................ 354 VN388 VN_LAST_PRG_REC ................................................................................................ 354 VN389 VN_TIME_DATE_IDX .............................................................................................. 355 VN390 VN_DATA_BARC_NUM .......................................................................................... 355 VN391 VN_BARC_STATO.................................................................................................... 355 VN392 VN_COPY_VA ........................................................................................................... 356 VN393 VN_DATA_CN_MASTER_NUM............................................................................... 357 VN394 VN_CN_MASTER_STATO ........................................................................................ 357 VN395 VN_CN_MASTER_NUM_SENT................................................................................ 357 VN396 VN_FASE_AZZERAMENTO ..................................................................................... 357 VN397 VN_DISAB_NG_COP ................................................................................................. 357 VN398 VN_MODBUS_COM .................................................................................................. 358 VN399 VN_MODBUS_COM_MODE..................................................................................... 358 VN400 VN_STD_STATE_NUM ............................................................................................. 358 VN401 VN_OMNI_OPER........................................................................................................ 358 VN402 VN_OM_PRG_NUM ................................................................................................... 359 VN403 VN_OM_TSTVEL_AX_NUM .................................................................................... 359 VN404 VN_EDIT2 ................................................................................................................... 359 VN405 VN_PRG_NUM_TO_EDIT ......................................................................................... 359 M0000464

Page 39

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

VN406 VN_FIRST_PRG_LIST................................................................................................ 359 VN407 VN_LAST_PRG_LIST ................................................................................................ 360 VN408 VN_PRG_BASE_LIST ................................................................................................ 360 VN409 VN_COP_WARN_ERR ............................................................................................... 360 VN410 VN_OBJ_DATA_LIST ................................................................................................ 360 VN411 VN_PAGE_MODE ...................................................................................................... 361 VN412 VN_PALM_PUT_KEY................................................................................................ 361 VN413 VN_CONF_ISTR ......................................................................................................... 362 VN414 VN_EMRG_ERR_COD �......................................................................................... 362 VN415 VN_EMRG_ERR_AX � ........................................................................................... 362 VN416 VN_CONF_EDIT......................................................................................................... 363 VN417 VN_DATA_EDIT_NUM ............................................................................................. 363 VN418 VN_MENU_FUN_CODE ............................................................................................ 363 VN419 VN_PRESET_CN_PASSW ......................................................................................... 364 VN420 VN_CNT_RTC_FULL................................................................................................. 364 VN421 VN_FLOPPY_STATE ................................................................................................. 364 VQ97 VQ_VAL_RACCORDO ................................................................................................ 366 VQ98 366 VQ99 366 VQ256 VQ_MENU_LEVEL .................................................................................................... 366 VQ257 VQ_MENU_LEVEL_PALM ....................................................................................... 366

NC DESCRIPTION ISTRUCTION Instruction

(14)

NC Keyboard Editor Format n m

AN OUT n = m 14 AN OUT n = m



Sets a voltage of m volts on analog output n. (from -10 volts to +10 volts). Example: #prog 1 #name Test : : :

VQ = 1.54 AN OUT 1 = VQ END

A voltage of 1.54 volts is set on analog output 1.

� NOTE Page 40

In the case where the analog output whose value you wish to set is associated to an axis, instruction 14 AN OUT n=m has no effect.

M0000464

Manuale di programmazione

Instruction

Capitolo 8: Origini7: Parametri utensili

(77)

ANT AX n TP t VAL q

NC Keyboard Editor Format 77 ANT AX TP VAL n t q



This instruction, combined in the same step with an axis movement instruction, allows going to the next step when the specified axis is found at distance q from the objective position and, thus, before the arrival of the axis in position. n indicates the number of the axis whose movement is to be checked t indicates the type of advance and can assume the following values: value of t 0 1 2

Meaning execution passes to the next step when the axis is found at distance q from the objective position execution passes to the next step when the axis is found at distance q from the position of departure execution passes to the next step when the axis exceeds the absolute position q

It is possible to program the advance for a maximum of 2 axes per step; if this number is exceeded, the loop automatically interrupts with the error 257

Advance instruction error

If a STOP is given when the execution has already passed to the next step but the advance axis is still in motion, at the next START (so long as the program has not been reset), the advance axis is made to restart to reach the original objective position

� NOTE

If the advance is of the type "distance from the objective position" (type 0) and the value of advance is 0, the advance is not activated

Example: : :

AX 1 TO 10000 ANT AX 1 TP 0 VAL 200 AX 2 TO 2000

In the example shown, axis 1 starts from position 0 and reaches position 1000. The advance instruction allows the program to pass to the next step when the axis reaches the position 800(1000-200). The result is that axis 2 starts when axis 1 is at the position 800, i.e., when it still is finishing the (advance) motion. N.B. Instruction available beginning with firmware version 4.35 and CSX compiler version 5.02.

M0000464

Page 41

Capitolo 8: Origini7: Parametri utensili

Instruction

Manuale di programmazione

( 94 ) AX n INCR m

NC Keyboard E Instructions for the management of the parameters of CN ditor Format 94 AX n INCR m n m



Incremental movement of axis n, i.e., to the actual position of axis n it adds the value m. Example: : : : :

AX 1 TO 100 TIME 2 AX 1 INCR 50 END

//axis in position = 100 //waits 2 seconds //axis in position = previous position + 50

In the example shown, axis 1 is initially brought to position 100 (step 1). After a wait of 2 seconds (step 2), axis 1 is brought to a position equal to the current position incremented by 50, i.e., the position 150 (step 3). During the execution of the NC program is necessary to set at least one time at the program start the speed of the axis you want to move

Page 42

M0000464

Manuale di programmazione

Instruction

Capitolo 8: Origini7: Parametri utensili

( 80 ) AX n TO m

N1C Keyboard Editor Format n m

80 AX n TO m



Brings axis n to position m. Example: #prog 9800 #name Test : : : :

AX 1 TO 100 TIME 2 AX 1 TO 0 END

The example shows a possible movement of axis 1 using the instruction 80 AX n TO m. At the first step, axis 1 is brought to position 100. After waiting 2 seconds (TIME instruction), the axis is brought to position 0. During the execution of the NC program is necessary to set at least one time at the program start the speed of the axis you want to move.

M0000464

Page 43

Capitolo 8: Origini7: Parametri utensili

Instruction

( 85 ) AX n VEL v QUOTE m

NC Keyboard Editor Format n v m

Manuale di programmazione

85 AX n VEL v QUOTE m



Brings the speed of axis n (as a % of maximum speed) to v when it reaches position m. The instruction 85 AX n VEL v QUOTE m allows changing the speed of the axis in motion when it has reached a determined position. According to the VN413 value it is possible to configure the behavior of this instruction. The possible configurations are: Value 0 1 2 3

Meaning usual behavior: QuoAx = begin speed change position if NewVel < CurVel => QuoAx = position of end speed change if NewVel < CurVel => QuoAx = position of end speed change QuoAx = begin speed change position

Example 1: Single change of speed with standard behavior VN413=0) :

VN413 = 0

:

AX 1 TO 100 // axis 1 to position 100 AX 1 VEL 50 QUOTE 50 //The speed change to 50% of the maximum STARTS //when axis 1 reaches position 50

Example 2: If the NewVelActVel (VN413=1) the new specified position.

speed is already changed at the

:

VN413 = 2

: :

VEL AX 1 = 50 % AX 1 TO 1000 // axis 1 to position 1000 AX 1 VEL 100 QUOTE 50 //The speed change from the actual 50 % to 100% ENDS //when axis 1 reaches position 50

Example 4: In this case is not important if the NewVel is bigger or smaller than the ActualVel (VN413=3), because in both cases the speed change ENDS at the position specified. Page 44

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

:

VN413 = 3

: :

VEL AX 1 = 100 % AX 1 TO 1000 // axis 1 to position 1000 AX 1 VEL 50 QUOTE 50 //The speed change to 50% of the maximum ENDS //when axis 1 reaches position 50

…Or: : :

VEL AX 1 = 50 % AX 1 TO 1000 // axis 1 to position 1000 AX 1 VEL 100 QUOTE 50 //The speed change from the actual 50% to 100% ENDS //when axis 1 reaches position 50

N. B. The change of speed of an axis does not occur instantaneously, but follows a ramp (of deceleration, if the speed decreases, of acceleration if the speed increases).

M0000464

Page 45

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format or

Manuale di programmazione

(38)

CONT MOVE



38 CONT MOVE G60

Enables continuous interpolated movements. In programming with systems that support interpolation, it is also possible to set the linear advance speed and avoid the stopping of the axes in the intermediate point between two consecutive interpolations. This can be achieved with the CONT MOVE instruction. CONT MOVE NO CONT MOVE

(code 38) Enables continuous interpolated movements (code 39) Disables continuous interpolated movements

Let's look at an example Suppose we want to realize the movement in fig. 1 and find ourselves at point A.

Figure 1

To perform this work, it is possible to use the instruction 38 CONT MOVE obtaining continuous interpolated movements, while continuing to execute the program in step-by-step mode. In order to give this instruction, you must be in normal mode (waiting for axes in position) and to obtain continuous movements it is necessary that, in the current step, there are no time wait instructions and that, in the next step, there are no operations on variables (because they are evaluated before the movement). In fact, after having given this instruction, if the program encounters an interpolated movement instruction it checks if there is another one at the next step. In this case, it places it in the buffer and waits for the first movement to finish and then executes the next step. If you wish to associate an action to a certain movement, you must enter the relative instruction in the step of that movement, without creating a new step. In fact, if there is another step between the two movement steps, you will not achieve continuity.

Page 46

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

When you use the CONT MOVE instruction, the program becomes: : : : : :

FXY 20 CONT MOVE G1 X 200 Y 100 G2 X 300 Y 0 I 200 J 0 NO CONT MOVE

� NOTE

// Set working speed // Continuous interpolated movements enabled // I am taken to point B // I am taken to point C // Continuous interpolated movements disabled

It is important to note that continuous interpolated movements can only be obtained with circular connections.

Instruction NC Keyboard Editor Format

(34)

END



34 END

End of the program: returns to the beginning and waits for a new start. If it finds itself at the end of a subroutine, it returns control to the program that called it. This instruction is required at the end of every program.

M0000464

Page 47

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format m

Manuale di programmazione

(57)

Fm

57 F m



Sets the interpolation speed to m [mm/min]. Example: … : : : : …

Page 48

F 10 G1 X=40 Y=70

// I set the working speed: 10 mm/min // Linear interpolation with position X=40 and // Y=70 G2 X 40 Y 70 I 70 J 80 //circular interpolation in a clockwise direction with // center I=70 J=80 and final point X=40 Y=70 TOOL 2 // Use tool no. 2

M0000464



Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

Instruction

(120) FORK PROG n

NC Keyboard Editor Format n

120 FORK PROG n



Allows executing several programs simultaneously in Automatic mode: the main and, at most, 2 secondaries. The instruction: : FORK PROG n enables the execution of program n simultaneously with others already executing. Program n can, in its turn, launch another program. A parallel program is stopped with: : KILL PROG n Or when the program comes to the END instruction. The KILL and FORK instructions can be executed by any program (even from a subroutine called from the main program). The FORK instruction fails if it tries to launch a non-existent program or one already executing, or if it exceeds the maximum number of secondary programs allowed. A failure of the FORK and KILL instructions generates the message "AUTOMATIC CYCLE INTERRUPTED." Let's look at an example: Main

100

200

5

20

350

10

35

In this case, the main program and 2 parallel programs (100 and 200) are running. Each program can, in its turn, call one or more subroutines. There are several limitations on the use of parallel programs. The TIME instruction can be used within only one of the parallel programs. N.B.: The instructions WAIT AX / NO WAIT AX and CONT MOVE / NO CONT MOVE are global, i.e., at the moment in which a program or a subroutine gives these instructions, they are valid for all executing programs.

M0000464

Page 49

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format m

Manuale di programmazione

(60)

FXY m



60 FXY m



Sets the interpolation speed to m [mm/sec]. Example: : :

FXY 10 G1 X=40 Y=70

// Set working speed: 10 mm/sec // Linear interpolation with position X=40 and // Y=70 G2 X 40 Y 70 I 70 J 80 //circular interpolation in a clockwise direction with // center I=70 J=80 and final point X=40 Y=70 TOOL 2 // Use tool no. 2

: :

Instruction NC Keyboard Editor Format xf yf

(61)

G1 X xf Y yf



61 G1XY xf, yf



Executes a linear interpolation in positions xf, yf. The instruction 61 G1 X xf Y yf allows performing a rectilinear movement of the tool. Unlike the linear interpolation instructions from 50 to 55, the instruction 61 G1 X xf Y yf provides tool compensation. This is to say, by using instruction 61 G1 X xf Y yf, the control takes into account the dimensions of the tool using instructions 41 and 42. Example: … : G1 X1500 Y540 //linear interpolation with final positions X=1500 Y=540 : G2 X873 Y220 I873 J210 //clockwise circumference center in 873 210 and end 873 220 … N.B. See paragraph Linear and circular interpolation in the Programming Manual.

Page 50

M0000464

Manuale di programmazione

Instruction

(56)

NC Keyboard Editor Format n i

Capitolo 8: Origini7: Parametri utensili

G103 P n VQi



56 G103 P n VQi



Enables the calculation of the angle of attack between two interpolated, non-tangential, movements: n is the number of the program called (between two interpolations) and i is the index of the Position Variable containing the angle.

B

C A In the case where I have two non-tangential movements (for example, see straight line figure AB and B-C) the control cannot perform a brusque continuous movement, otherwise there is a risk of breaking the tool or executing work that is not perfect. So, in these cases, we decided to introduce instruction 56 G103 P n Vqi. This instruction allows interrupting the movement of the axes and recalling program n, in which the programmer can enter instructions for the correct positioning of the tool. For the correct positioning of the tool, the program uses the information provided by VQi, which contains the angle between the two non-tangential curves (for example, in the figure the angle ) calculated by the NC. The instruction is placed at the beginning of the work and every time that a case of nontangentiality occures, program n is invoked and the angle between the two curves is saved in VQi. The following example illustrates the use of instruction G103. Example: %1 TEST1 G103P1000VQ0

G60 G0 X0.000 Y100.000

{ISO program number 1} {enabled at the stop of work and jump to {program 1000. VQ0} {contains the number that identifies the angle of direction } {of the next movement} {enabling continuous movements} {positioning axes before the work } M0000464

Page 51

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

G42 {Tool to the left with respect to the direction of advancement} F2000 {setting working speed} G1 X150.000 Y100.000 {linear interpolation. Moving axes to the positions} {X=150 Y=100} G3 X220.000 Y170.000 I150.000 J170.000 {circular interpolation.} {Arc of circumference in counter-clockwise direction {with center I=150 Y=170 and } {final point X=220 Y=170} G1 X245.000 Y170.000 {linear interpolation. Moving axes to the positions} {X=245 Y=170} G2 X260.000 Y150.000 I245.000 J154.375 {circular interpolation.} {Arc of circumference in a clockwise direction} {with center I=245 Y=154.375 and } {final point X=260 Y=150} G1 X225.000 Y18.750 {linear interpolation. Moving axes to the positions} {X=225 Y=18.750} G40 G61 M02

{disables tool correction} {disables continuous movements} {end of program}

The ISO program in the example performs cointinuous movements since it contains a G60 instruction. The instruction G103 P100 VQ0 is also present. This instruction enables control of the angle of tangency between two contiguous movements. At the moment in which the angle between the two continguous movements is greater than the value specified in the machine parameter Tangency tolerance the NC performs the following operations: • •

Stops the continuous movement at the end of the section being executed. Jumps to program 1000 in which NC instructions can be written for the correct positioning of the tool. • The number that represents the angle of direction, in degrees, of the movement after the stop is placed in VQ0 In the ISO file example shown above, program 1000 is called after the execution of the G3 instruction and, after it has been executed, the work continues with the next G1 instruction.

Page 52

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

The following work is performed: Stop on the point and execution of program 1000 because the angle formed by the directions of the sections of the profile made by G3 and the next G1 ( ) is greater than the value of the machine parameter Tangency tolerance

C D A

The problem of stopping on the point doesn't exist in the passage from the rectilinear profile (first G1 instruction) to the arc of circumference (G3 instruction) which is represented by point A in the figure. In fact, in this case, the angle of tangency does not exceed the value of the machine parameter Tangency tolerance. The same is also true for the points of tangency C and D. N.B. ISO files must end with at least two empty lines. N.B. The action of instruction G103 is cancelled by instruction G102. Below, we show two examples of NC program 1000. Example: 1: working without tangential axis. #prog 1000 #name Program 1000 :

TOOL ANGLE=VQ0

:

END

M0000464

Page 53

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

Example: 2: working with tangential axis #prog 1000 #name Program 1000 :

AX 3 TO VQ0

:

END

Page 54

M0000464

Manuale di programmazione

Instruction

Capitolo 8: Origini7: Parametri utensili

(66)

G1XYN xf, yf, n, nf



N.B. The following syntax refers to programming directly on the NC keyboard. There is no editor instruction that is recognized by the CSX compiler. 66 G1XYN xf, yf, n, nf xf yf n nf



It performs a linear interpolation with additional axis (n). xf and yf indicate the final positions for axes 1 and 2, n indicates the number of the axis that one wishes to add in the interpolation and nf indicates the final position for axis n. The instruction 66 G1XYN xf, yf, n, nf allows performing interpolated movements in the space. If, for example, we want to execute a rectilinear trajectory that reaches a certain height, we use the X and Y axes for movement in the plane and, in addition, add a third axis, Z, that allows moving in height. The following is an example of programming directly on the NC keyboard: Example: … 66 G1XYN 50, 70, 3, 60 //rectilinear interpolation with additional axis n. 3 and final //position nf=60 … Z P Y O

X If axis 3 corresponds to axis Z, the movement is that shown in the figure. P has coordinates (50,70,60)

M0000464

Page 55

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format xc yc xf yf

Manuale di programmazione

(62)

G2 X xf Y yf I xc J yc



62 G2XY xc, yc, xf, yf



Executes an arc of circumference in a clockwise direction. xc, yc are the coordinates of the center of circumference; xf, yf are the coordinates of the final point. Example: … : : 220 …

G1 X1500 Y540 //linear interpolation with final positions X=1500 Y=540 G2 X873 Y220 I873 J210 //circumference Clockwise, center at 873 210 and end 873

N.B. See paragraph Linear and circular interpolation in the Programming Manual.

Page 56

M0000464

Manuale di programmazione

Instruction NC Keyboard Editor Format r e xf yf

Capitolo 8: Origini7: Parametri utensili

(72)

G2R r e xf yf



72 G2R r, e, xf, yf



Executes an arc of circumference in a clockwise direction given the radius r, xf, yf are the coordinates of the final point. e (±1) uniquely defines the circumference.

Given 2 points and the radius, you can construct two arcs of circumference in a clockwise direction. Making reference to the figure, the circumferences in a clockwise direction are those of center c1 and center c2. The first, c1, has an angle greater than 180°, the second, c2, has an angle less than 180° . To specify which of the two semi-circumferences I wish to execute, I use the parameter e. If I want to perform an arc of circumference with angle greater than 180°, I set the parameter e=+1; otherwise, if I want to make an arc of circumference with angle less than 180°, I set the parameter e=-1. The figure shows initial point I and final point F. Example … : PASSO G2R 10 –1 20 40 //executes the arc of circumference with final point X=20, Y=40 // and radius 10. The parameter e=-1 says the arc of //circumference is that with angle less than 180° .(see figure) …. N.B. Always place a label before the instruction (in the example, PASSO)

M0000464

Page 57

Capitolo 8: Origini7: Parametri utensili

Instruction

Manuale di programmazione

(67)

G2XYN xc yc xf yf n qf



N.B. The following syntax refers to programming directly on the NC keyboard. There is no editor instruction that is recognized by the CSX compiler. 67 G2XYN xc, yc, xf, yf, n, qf xc yc xf yf n qf Executes a circular interpolation XY, clockwise, with an additional axis (n). The instruction 67 G2XYN xc, yc, xf, yf, n, qf allows performing interpolated movements in the space. If, for example, we wish to execute a helical trajectory that reaches a certain height, we use the X and Y axes for the movement in the plane and then add a third axis, Z, that allows movement in height. The following is an example of programming directly on the NC keyboard: Example: 61 G1XY 13 15 //linear interpolation with final positions x=13 and y=15 point I 67 G2XYN 30 40 10 40 3 60 //interpolated curvilinear movement with curve center //xc=30 yc=50 , final point xf=50 yf=70 and final axis position 3 //additional nf=60 Z P

Y I

Center of coordinates xc=30 yc=40 X The final point P has coordinates (10,40,60), while the initial I (13,15,0) If axis 3 correspsonds to axis Z, the movement is that in the figure

Page 58

M0000464

Manuale di programmazione

Instruction NC Keyboard Editor Format xc yc xf yf

Capitolo 8: Origini7: Parametri utensili

(63)

G3 X xf Y yf i xc J yc



63 G3XY xc, yc, xf, yf



Executes an arc of circumference counter-clockwise. xc, yc are the coordinates of the center of circumference; xf, yf are the coordinates of the final point. Example: … : G1 X1500 Y540 //linear interpolation with final positions X=1500 Y=540 : G3 X873 Y220 I873 J210 //circumference Counter-clockwise center at 873 210 and end 873 220 … N.B. See paragraph Linear and circular interpolation in the Programming Manual.

M0000464

Page 59

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format r e xf yf

Manuale di programmazione

(73) 73

G3R r e xf yf



G3R r, e, xf, yf



Executes an arc of circumference counter-clockwise given the radius r, xf, yf are the coordinates of the final point. e (±1) uniquely defines the circumference.

Given the 2 points and the radius, one can construct 2 arcs of circumference counter-clockwise. Referring to the figure, the counter-clockwise circumferences are those with center c1 and center c2. The first, c2, has an angle greater than 180°, the second, c1, has an angle less than 180° . To specify which of the two semi-circumferences I want to execute, I use the parameter e. If I want to execute the arc of circumference with angle greater than 180°, I use the parameter e=+1; otherwise, if I want to execute the arc of circumference with angle less than 180°, I use the parameter e=-1. The figure shows initial point I and final point F. Example: … :

G3R 10,-1,20,40

//executes the arc of circumference with final point X=20, Y=40 // and radius 10. The parameter e=-1 says the arc of //circumference is that with angle less than 180° .(see figure)

….

Page 60

M0000464

Manuale di programmazione

Instruction

Capitolo 8: Origini7: Parametri utensili

(68)

G3XYN xc, yc, xf, yf, n, qf



N.B. The following syntax refers to programming directly on the NC keyboard. There is no editor instruction that is recognized by the CSX compiler. 68 G3XYN xc, yc, xf, yf, n Executes a circular interpolation XY, counter-clockwise, with an additional axis (n). The instruction 68 G3XYN xc, yc, xf, yf, n, qf allows performing interpolated movements in the space. If, for example, we wish to execute a helical trajectory that reaches a certain height, we use the X and Y axes for the movement in the plane and then add a third axis, Z, that allows movement in height. The following is an example of programming directly on the NC keyboard: Example … 61 G1 X13 Y15 //linear interpolation with finale positions x=13 and y=15 point I 68 G3XYN 30, 40, 40, 20, 3, 60 //interpolated curvilinear movement with curve center //xc=30 yc=50 , final point xf=50 yf=70 and final axis position 3 //additional nf=60 … Z

P

Y I

Center of coordinates xc=30 yc=40 X The final point P has coordinates (40,20,60), while the initial I (13,15,0) If axis 3 correspsonds to axis Z, the movement is that in the figure

M0000464

Page 61

Capitolo 8: Origini7: Parametri utensili

Instruction

Manuale di programmazione

(40)

NC Keyboard Editor Format

G40



40 TOOL DISABLE

Instruction for special applicatios, for use call Sipro technical office. Disables tool correction, i.e., sets the work point equal to the center of the tool. With the use of the interpolated instructiions, the work point of the tool must be the center of the tool (C) or the point of working contact (D). This is to say that, as a reference for making the movement calculations, the control takes the center of the tool, or the external working point, that takes into account the dimnensions of the tool. The control uses this information to perform the correct positioning of the tool during the working phase. C D

Positioning axes with respect to the center

Positioning axes with respect to outside point

Suppose we want to execute the following work:

Figure 1 The tool must be positioned so as to perform the work. To instruct the control, we must specify the position in which the tool is located with respect to the trajectory to execute and if the Page 62

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

movement must be performed with respect to the center of the tool or with respect to the working point (thus taking into account the dimensions of the tool). In the case in which we want to specify to the control that the point of reference for performing the movements must take the dimensions into account, we use the instructions 41 G41 or 42 G42. In this case, the movement of the tool will refer to the working point (D). For example, if the work programming is as follows: : : : : : : :

AX 1 TO 1150 AX 2 TO 900 FXY 10 TOOL 2 TOOL ANGLE = 90 G41 G1 X 1150 Y 1200

// Set working speed: 10 mm/sec // Use tool no. 2 // Tool angle = 90 degrees // Tool to the left of the path //Brings tool to point A

we see that, after instruction 41 G41, the positioning of the tool is performed with instruction 61 G1, keeping in mind that the reference point is that of the working point that takes into account the dimensions of the tool. The effect of these instructions is that of bringing the tool to the position in Figure 1. If, in the place of the last two instructions, we had put: : :

G40 G1 X 1150 Y 1200

// Work point at center of tool //Brings tool to point A

The effect would be the following: With erroneous positioning. Moreover, the effect of instruction 40 G40 cancels instruction 41 G41 and 42 G42 M0000464

Page 63

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format

Manuale di programmazione

(41)

G41



41 TOOL SN

Instruction for special applicatios, for use call Sipro technical office. Sets the position of the tool to the left with respect to the direction of advancement. The instruction 41 G41 serves to communicate to the control in what position the tool is found with respect to the trajectory and the direction of advancement of the tool. If, for example, we had to perform the following work

and the direction of advancement is that towards the left (as specified by the arrow) the instructioins to perform the work would be the following : : : : : : : : : : : : Page 64

AX 1 TO 1150 AX 2 TO 900 FXY 10 TOOL 2 TOOL ANGLE = 90 G41 G1 X 1150 Y 1200 NO WAIT AX G1 X 450 Y 1200 G3 X 150 Y 900 I 450 J 900 G1 X 150 Y 500.000 G3 X 450 Y 200 I 450 J 500

// Set working speed: 10 mm/sec // Use tool no. 2 // Tool angle = 90 degrees // Tool to the left of the path //Brings tool to point A //Disables waiting for axes in position //Brings the tool to point B

M0000464

Manuale di programmazione

: : : : : : : : :

G1 X 1150 Y 200 G3 X 1450 Y 500 I 1150 J 500 G1 X 1450 Y 900 G3 X 1150 Y 1200 I 1150 J 900 WAIT AX WAIT AX 1 IN QUOTE WAIT AX 2 IN QUOTE G1 X 1150 Y 1100 AX 1 TO 0.000 AX 2 TO 0.000

Capitolo 8: Origini7: Parametri utensili

//Enables waiting for axes in position //Wait for completion of the work //Distance the tool //Brings the axes to 0

As you will see, at step 6 I specify the position of the left tool with respect to the direction and trajectory of work.

M0000464

Page 65

Capitolo 8: Origini7: Parametri utensili

Instruction

Manuale di programmazione

(42)

NC Keyboard Editor Format

G42



42 TOOL DX

Instruction for special applicatios, for use call Sipro technical office. Sets the position of the tool to the right with respect to the direction of advancement. The operation of instruction 42 G42 is like instruction 41 G41. In this case, we specify that the tool is found to the right with respect to the direction and trajectory of the work. If, for example, we must perform the following work (equal to the example for instruction 41 G41):

the positioning instructions would be: : : : : : : :

AX 1 TO 1150 AX 2 TO 900 FXY 10 TOOL 2 TOOL ANGLE = 90 G42 G1 X 1150 Y 1200

// Set working speed: 10 mm/sec // Use tool no. 2 // Tool angle = 90 degrees //Tool the right of the path //Brings tool to point A

In this way, with instruction 42 G42, I specify that the tool is found to the right with respect to the direction and trajectory of the work.

Page 66

M0000464

Manuale di programmazione

Instruction

Capitolo 8: Origini7: Parametri utensili

(43)

NC Keyboard Editor Format

G43 (or TOOL EXT)



43 TOOL EXT

Instruction for special applicatios, for use call Sipro technical office. Tool outside with respect to the circumference. While working with the tool, we must specify if the latter is found inside the circumference, i.e., if I must create a round “hole” inside a piece of material or if it is located outside, i.e., that I have to create a “wheel” filled with material. In the second case, I use instruction 43 G43. If, for example, I have to create a piece of round marble, I will use the following instructions: Example: … : G1 X50 Y70 (beginning : :

//rectilinear interpolatioin with final position X=50 and Y=70

//of work) G43 //tool outside the circumference G2 X 50 Y 70 I 70 J 80 //executes a circular movement, clockwise //with center I=70 J=80 and final point X=50 Y=70

… Y Piece to create

Tool direction always tangential to the circumference

Center of coordinates xc=70 yc=80

Tool center Tool X As you can see from the figure, the tool is located on the outside of the circumference.

M0000464

Page 67

Capitolo 8: Origini7: Parametri utensili

Instruction

Manuale di programmazione

(44)

NC Keyboard Editor Format

G44 (or TOOL INT)



44 TOOL INT

Instruction for special applicatios, for use call Sipro technical office. Tool inside with respect to the circumference. While working with the tool, we must specify if the latter is found inside the circumference, i.e., if I must create a round “hole” insdide a piece of material or if it is located outside, i.e., that I have to create a “wheel” filled with material. In the first case, I use instruction 44 G44. For example, if I have to create a piece of marble with an inside round “hole,” I will use the following instruction: Example: … : :

G44 //tool inside the circumference G2 X 50 Y 70 I 70 J 80 //executes a circular movement, clockwise with //center I=70 J=80 and final point X=50 Y=70

… Y Piece to create

Tool direction always tangential to the circumference

Center of coordinates xc=70 yc=80

Tool center Tool X As you can see from the figure, the tool is located on the outside of the circumference.

Page 68

M0000464

Manuale di programmazione

Instruction NC Keyboard Editor Format

Capitolo 8: Origini7: Parametri utensili

(45)

G45



45 TOOL PATH DIR G45

Instruction for special applicatios, for use call Sipro technical office. In the applications with third axis of interpolation, the angle of orientation is parallel to the direction of advancement. The position of the tool, in the plane, is defined, in addition to the positions X and Y relative to the system of reference, also by the angle that it forms with respect to the absolute reference system as shown in the figure. Y 90°

180°



X

-90°

To communicate the angular position to the tool, we must refer to the imaginary segment that approximates the real shape of the tool. Once the segment is defined, its orientation is fixed by the angle that it forms with the X axis of the system of reference (see figure). In some interpolations, the tool must always remain tangential to the trajectory. For example, if we have a blade that makes a cut following a shape, as in the figure,

Piece to cut Direction of advancement Blade before the axis interpolation, I insert instruction 45 G45. This latter position the tool always tangential to the direction of advancement.

M0000464

Page 69

Capitolo 8: Origini7: Parametri utensili

Instruction

(4)

NC Keyboard Editor Format n

Manuale di programmazione

GOSUB n



4 GOSUB n



Performs a jump to subroutine (subprogram) n (with return). Example: #prog 9800 #name Test : : : :

TIME 1 GOSUB 1 TIME 2 END

#prog 1 #name Zero : : :

AX1 TO 0 AX2 TO 0 END

//Brings AXIS X to 0 //Brings AXIS Y to 0

The example consists of two programs: the main program 9800 and program 1. Suppose we execute main program 9800. The first thing executed is step 1, which will wait for 1 second. After that, with step 2, we go to step of program 1. This step is then executed, which will bring the X axis to the origin position. Once also step 2 is executed (Y axis to the origin) with the next step (END), the control will return to program 9800, which will execute step 3, which waits for 2 seconds.

Page 70

M0000464

Manuale di programmazione

Instruction NC Keyboard Editor Format

Capitolo 8: Origini7: Parametri utensili

(8)

GOTO n



8 GOTO n

Jump to step number n. Example: #prog 9800 #name Test : : : : : :

EDIT M1 EDIT M2 GOTO 5 EDIT M4 TIME 5 END

The example shown above executes, in order, steps 1 and 2, after which, executing step 3, it goes to step 5, which will wait for 5 seconds. The program will end with the execution of step 6. Step 4 will not be executed since the GOTO instruction goes from step 3 to step 5, in fact jumping over the EDIT M4 instruction. Any additional step between steps 3 and 5 will lead to the automatic modification of the GOTO instruction index if made through the editor of the device, otherwise you need to keep track of this during the phase of writing on paper. N.B. When programming with a PC, VAlN could be a label associated to a step. Example: #prog 9800 #name Test : EDIT M1 : EDIT M2 : GOTO Message5 : EDIT M4 :Message5 TIME 5 : END The example has an effect equal to the preceding except that in this case, the GOTO is associated to a label. The programm turns out to be more flexible.

M0000464

Page 71

Capitolo 8: Origini7: Parametri utensili

Instruction

(142)

NC Keyboard Editor Format n m

Manuale di programmazione

IF AX n GOSUB m



142 IF AX n GOSUB m



If axis n is in position, control passes to subroutine m. Example: prog 9800 #name Main … : AX 1 TO 100 : IF AX 1 GOSUB Work

//if axis 1 is in position (100) it executes the //program Work

… prog 0001 #name Work :

… AX 2 TO 450 …

In the main program (9800) axis 1 is moved to position 100. When axis 1 has arrived in position, the numerical control executes the next step. Here it tests if axis 1 is in position with instruction 142 IF AX n GOSUB m and if the condition is true, the control passes to execute the program Work (0001). At the end of the execution of the program Work, the control returns to executing main program 9800 at the next step, which is the one containing instruction 142 IF AX n GOSUB.

Page 72

M0000464

Manuale di programmazione

Instruction

Capitolo 8: Origini7: Parametri utensili

(146) IF AX n GOTO m

NC Keyboard Editor Format n m



146 IF AX n GOTO m



If axis n is in position, it jumps to step m. Example: #prog 9800 #name Main … : AX 1 TO 100 : IF AX 1 GOTO Work

//if axis 1 is in position (100) it executes the //step work

… :Work AX 2 TO 400 … In the main program (9800) axis 1 is moved to position 100. When axis 1 has arrived in position, the numerical control executes the next step. Here, it tests if axis 1 is in position with instruction 146 IF AX n GOTO m and if the condition is true, the control passes to execute the step with label Work.

M0000464

Page 73

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format n m

Manuale di programmazione

(132) IF IN n GOSUB m



132 IF IN n GOSUB m



If input n is ON, the control goes to subroutine m. Example: Suppose we have a main program (prog. 9800) with the following instructions: prog 9800 #name Main …. :LOOP IF IN Input1 GOSUB Work1 : IF IN Input2 GOSUB Work2 : GOTO LOOP … and we have two working programs, Work1 (prog 0001) and Work2 (prog 0002): prog 0001 #name Work1 …. : AX 1 TO 100 … prog 0002 #name Work2 …. : AX 2 TO 200 … Upon the execution of program 9800, control remains inside the LOOP cycle until one of the two inputs associated with the labels Input1 and Input2 that are defined in the .h definition file (e.g., Defvar.h) goes to ON (logic level high). e.g., we have a Defvar.h with the following definitions: … #define Input1 1 #define Input2 2 … If input 1 goes ON, the control passes to the execuion of the program Work1 (prog 0001). At the end of execution, the numerical control returns to the main program (prog 9800). On the other hand, if digital input 2 goes ON, the control passes to the execution of program Work2 (prog 0002). At the end of execution, the numerical control returns to the main program (prog 9800).

Page 74

M0000464

Manuale di programmazione

Instruction NC Keyboard Editor Format n m

Capitolo 8: Origini7: Parametri utensili

(133) IF IN n JMPPRG m



133 IF IN n JMPPRG m



If input n is ON, it jumps to program m. Instruction 133 IF IN n JMPPRG m has the same function as instruction 132 IF IN ValN GOSUB m. The only difference is that instruction 133 IF IN n JMPPRG does not provide for the return to the calling program once execution of the called program n is finished. If, referring to the example for instruction 132 IF IN ValN GOSUB m, program 9800 is modified as follows: prog 9800 #name Main …. : LOOP IF IN Input1 JMPPRG Work1 : IF IN Input2 JMPPRG Work2 : GOTO LOOP … when input 1 goes ON, the numerical control goes to execute program Work1 (0001). When program Work1 is finished (instruction 34 END), the numerical control does not return to main program (9800).

M0000464

Page 75

Capitolo 8: Origini7: Parametri utensili

Instruction

(136) IF IN n GOTO m

NC Keyboard Editor Format n m

Manuale di programmazione



136 IF IN n GOTO m



If input n is ON, it jumps to step m. Example: prog 9800 #name Main …. :LOOP : : …

IF IN Input1 GOTO Air IF IN Input2 GOTO Water GOTO LOOP

:Air :

… GOTO LOOP

:Water :

… GOTO LOOP

Main program (9800) performs the LOOP cycle until one of the two inputs, Input1 or Input2 goes ON. The inputs associated to Input1 and Input2 are defined in the definition file .h which, for example, can have the following definitions: … #define Input1 1 #define Input2 2 … If digital input 1 of the control goes ON (Input1), the control passes to the execution of the part of the program at the step that contains the label Air. If, on the other hand, digital input 2 of the control goes ON (Input2) the control passes to the execution of the part of the program at the step that contains the label Water.

Page 76

M0000464

Manuale di programmazione

Instruction NC Keyboard Editor Format i x m

Capitolo 8: Origini7: Parametri utensili

(248) IF VBi = ValB GOTO m



248 IF VBi = x GOTO m



If the value of the binary variable i is equal to x (which can only assume values equal to 0 or 1) it jumps to step m. It is a conditional jump instruction associated to the value of VBi. Example: Suppose we have a main program with the following instructions: … :Loop : : : :Work …

IF VB2 = 1 GOTO Work AX 2 TO Quota 2 Quota 2 = Quota 2 + Quota 1 GOTO Loop

The main program executes the Loop cycle until VB2 is equal to 0. When VB2 becomes equal to 1 the control passes to the execution of the step Work ending the Loop cycle. VB2 can be set from a PLC program.

M0000464

Page 77

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format i m n

Manuale di programmazione

(230) IF VNi < n GOSUB m



230 IF VNi < n GOSUB m



If the value of Numeric Variable i is less than numeric value n, the control passes to subroutine m. It is a conditional jump instruction associated to the value of VNi. Example: Suppose we have a main program with the following instructions: … : :Loop : : : :

VN2 = 30 IF VN2 < 10 GOSUB Work AX 2 TO Quota 2 Quota 2 = Quota 2 + Quota 1 VN2 = VN2 - 1 GOTO Loop

and a program Work: prog 0002 #name Work … … The main program executes the Loop cycle until VN2 is greater than 10. When VN2 becomes less than 10, the control passes to the execution of the program Work (Prog 0002). When the execution of program Work is finished, the control passes again to main program 9800.

Page 78

M0000464

Manuale di programmazione

Instruction NC Keyboard Editor Format i m n

Capitolo 8: Origini7: Parametri utensili

(231) IF VNi = n GOSUB m



231 IF VNi = n GOSUB m



If the value of Numeric Variable i is equal to numeric value n, the control passes to subroutine m. Like instruction 230 IF VNi < ValN GOSUB n except that the jump to subroutine n occurs when VNi is equal to a precise value specified by ValN.

Instruction NC Keyboard Editor Format i m n

(232) IF VNi > n GOSUB m



232 IF VNi > n GOSUB m



If the value of Numeric Variable i is greater than numeric value n, the control passes to subroutine m. Like instruction 230 IF VNi < ValN GOSUB n except that the jump to subroutine n occurs when VNi is greater than a precise value specified by ValN.

M0000464

Page 79

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format i m n

Manuale di programmazione

(233) IF VNi < n GOTO m



233 IF VNi < n GOTO m



If the value of Numeric Variable i is less than numeric value n, it jumps to step m. It is a conditional jump instruction associated to the value of VNi. Example: Suppose we have a main program with the following instructions: … : :Loop : : : : :Work

VN2 = 20 IF VN2 < 10 GOTO Work AX 2 TO Quota 2 Quota 2 = Quota 2 + Quota 1 VN2 = VN2 - 1 GOTO Loop

The main program executes the Loop cycle until VN2 is greater than 10. When VN2 becomes less than 10, the control passes to the execution of the step Work, ending the Loop cycle.

Page 80

M0000464

Manuale di programmazione

Instruction NC Keyboard Editor Format i m n

Capitolo 8: Origini7: Parametri utensili

(234) IF VNi = n GOTO m



234 IF VNi = n GOTO m



If the value of Numeric Variable i is equal to numeric value n, it jumps to step m. Like instruction 233 IF VNi < m GOTO n, except that the jump to step n occurs when VNi is equal to a precise value specified by m.

Instruction NC Keyboard Editor Format i m n

(235) IF VNi > n GOTO m



235 IF VNi > n GOTO m



If the value of Numeric Variable i is greater than numeric value n, it jumps to step m. Like instruction 233 IF VNi < m GOTO n, except that the jump to step n occurs when VNi is greater than a precise value specified by m.

M0000464

Page 81

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format i m n

Manuale di programmazione

(210) IF VQi < m GOSUB n



210 IF VQi < m GOSUB n



If the value of Position Variable i is less than position value m, the control passes to subroutine n. It is a conditional jump instruction associated to the value of Vqi. Example: Suppose we have a main program with the following instructions: … : :Loop : : : :

VQ2 = 20 IF VQ2 < 10 GOSUB Work AX 2 TO Quota 2 Quota 2 = Quota 2 + Quota 1 VQ2 = VQ2 - 1 GOTO Loop

and a program Work: prog 0002 #name Work … … The main program executes the Loop cycle until VQ2 is greater than 10. When VQ2 becomes less than 10, the control passes to the execution of program Work (prog 0002). When the execution of program Work is finished, the control passes again to main program 9800.

Page 82

M0000464

Manuale di programmazione

Instruction NC Keyboard Editor Format i m n

Capitolo 8: Origini7: Parametri utensili

(211) IF VQi = m GOSUB n



211 IF VQi = m GOSUB n



If the value of Position Variable i is equal to position value m, the control passes to subroutine n. Like instruction 210 IF VQi < ValQ GOSUB n except that the jump to subroutine n occurs when VQi is equal to a precise value specified by ValQ.

Instruction NC Keyboard Editor Format i m n

(212) IF VQi > m GOSUB n



212 IF VQi > m GOSUB n



If the value of Position Variable i is greater than position value m, the control passes to subroutine n. Like instruction 210 IF VQi < ValQ GOSUB n except that the jump to subroutine n occurs when VQi is greater than a precise value specified by ValQ.

M0000464

Page 83

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format i m n

Manuale di programmazione

(213) IF VQi < m GOTO n



213 IF VQi < m GOTO n



If the value of Position Variable i is less than position value m, it jumps to step n. It is a conditional jump instruction associated to the value of VQi. Example: Suppose we have a main program with the following instructions: … : :Loop : : : : :Work

VQ2 = 20 IF VQ2 < 10 GOTO Work AX 2 TO Quota 2 Quota 2 = Quota 2 + Quota 1 VQ2 = VQ2 - 1 GOTO Loop

The main program executes the Loop cycle until VQ2 is greater than 10. When VQ2 becomes less than 10, the control passes to the execution of step Work, ending the Loop cycle.

Page 84

M0000464

Manuale di programmazione

Instruction NC Keyboard Editor Format i m n

Capitolo 8: Origini7: Parametri utensili

(214) IF VQi = m GOTO n



214 IF VQi = m GOTO n



If the value of Position Variable i is equal to position value m, it jumps to step n. Like instruction 213 IF VQi < m GOTO n, except that the jump to step n occurs when VQi is equal to a precise value specified by m.

Instruction NC Keyboard Editor Format i m n

(215) IF VQi > m GOTO n



215 IF VQi > m GOTO n



If the value of Position Variable i is greater than position value m, it jumps to step n. Like instruction 213 IF VQi < m GOTO n, except that the jump to step n occurs when VQi is greater than a precise value specified by m.

M0000464

Page 85

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format m n i

Manuale di programmazione

(49)

INCR ORG m AX n VAL i



49 INCR ORG m AX n VAL i



Allows increasing the value of the origin, keeping track of the angle of the origin. To modify the origin of an axis, you can use instruction 49 INCR ORG m AX n VAL i. Example: … : INCR ORG 3 AX 2 VAL 40 //increase the origin of axis 2 by 40 relative … //to origin 3 N.B. For further explanations, see paragraph Origins in the programming manual and instruction 55 ORG n

Page 86

M0000464

Manuale di programmazione

Instruction NC Keyboard Editor Format n

Capitolo 8: Origini7: Parametri utensili

(3)

INPUT n 3 INPUT n



Conditions the execution of the step in the presence of the input with number n. That is, it waits for input n to be set before proceding to the next step. Example: #prog 1000 #name Name #include "Defvar.h" : Start : AX Axis1 TO PieceEnd : INPUT InEnable : AX Axis1 TO PieceBeginning :END End In the example shown, Axis1 goes to position PieceEnd (defined in definition file Defvar.h). Then it executes instruction INPUT InEnable. The control waits for digital input n, where n is defined by InEnable, is set to logical value 1. In our case, n = the value specified in VN1; i.e., if VN1 is 4, the control waits for input 4 to be set to logical value 1, then it passes to the next instruction, which in the example, sets axis 1 to position PieceBeginning (see file Defvar.h). File Defvar.h //VN Definition #define InEnable VN1 Other defintions #define Axis1 1 #define PieceEnd 100 #define PieceBeginning 0

M0000464

Page 87

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format n

Manuale di programmazione

(37)

INTP MODE = n

37 INTP MODE = n



Sets the number of interpolated axes to n. Example: … : …

Page 88

INTP MODE = 3

//number 3 axes interpolated

M0000464



Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

Instruction

(31)

NC Keyboard Editor Format n m p

INTP PAR n AX m P p



31 INTP PAR n AX m P p



Sets interpolation parameter p (it can only assume the values 0 and 1) for axis m. This parameter indicates whether axis m makes a contribution (with p = 1) or not (with p = 0) to the calculation of the speed of interpolation. With parameter n,we can modify the table that places the axis in relation with the relative parameter. Parameter n indicates the line on which it is going to act. The standard table provides axis 1 at line 1, axis 2 at line 2 and so on, with parameter p set to 1 (all axes contributing to the calculation of the interpolation speed). It is used to perform special interpolations between axis 1 and axis 4. Example: Suppose we have a 4-axis system and set instruction 37: :

INTP MODE = 3

The interpolation will be performed on 3 axes and, thus, only the first three lines of the table will be meaningful. If we set instruction 31: : INTP PAR 2 AX 4 P 0 AX 1 2 3 4 5

P 1 1 1 1 1

becomes

AX 1 4 3 4 5

P 1 0 1 1 1

i.e., we act on the seocnd line, setting axis 4 as belonging to the interpolation group and parameter p to 0. To understand how an axis contributes to the speed calculation, let's consider the following example in which we assume we have 3 interpolated axes (X, Y, Z). : F 200 : AX1 TO 0 : AX2 TO 0 : AX3 TO 0 : INTP PAR 3 AX 3 P 0 //axis Z does not contribute to the interpolation speed : LINE 100, 100, 1000

M0000464

Page 89

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

Since only the X and Y axes contribute to the calculation of the speed, it will be considered to have to cross a space equal to (1002+1002) = 141.42 mm and since the speed set is equal to 200 mm/min, the motion will be accomplished in 141.42 / 200 = 0.7071 minutes. In this time, axis Z will cross the space set (1000). If, on the other hand, axis Z contributes to the interpolation speed, the space to cross will be

100 2 + 100 2 + 1000 2 = 1009.95 mm and, as a consequence, the movement would be executed in a time equal to 1009.95/200 = 5.0498 minutes.

Page 90

M0000464

Manuale di programmazione

Instruction

Capitolo 8: Origini7: Parametri utensili

(5)

NC Keyboard Editor Format

JMPRG n



5 JMPPRG n

n It performs a jump to program n (without return). Execution will begin from the first instruction Example: #prog 9800 #name Test : TIME 1 : JMPPRG 1 : TIME 2 :END #prog 1 #name Zero : : :

AX1 TO 0 AX2 TO 0 END

//ZERO AXIS X //ZERO AXIS Y

The example consists of two programs: the main program 9800 and program 1. Suppose we execute main program 9800. First, step 1 will be executed, which waits 1 second, then, with step 2, it will jump to step 1 of program 1. Step 1 will then be executed which will bring the X axis to the origin position. Once step 2 is also executed (axis Y to the origin), with the next step (END), program 1 will end as well as program 9800. Step 3 of program 9800 is never executed. Unlike the GOSUB instructioin, the control does not return to the original program. 5

Instruction NC Keyboard Editor Format n

(121) KILL PROG n 121 KILL PROG n



Stops the execution of parallel program n. For a more detailed explanation, see instruction (120 ) FORK PROG n

M0000464

Page 91

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format n m n m

Manuale di programmazione

(84)

LINE n1 m1 n2 m2

84 LINE n1 m1 n2 m2



Brings axis n1 to position m1 and axis n2 to position m2, i.e., it executes a linear interpolation. The speed of the axis that must travel the longest section is assumed as the interpolation movement speed. Example: #prog 9800 #name Test : : : : : : :

AX 1 TO 100 INPUT 4 SKIP WAIT AX 1 AX 1 TO 0 INPUT 3 STOP AX 1 TIME 2 LINE 1 200 2 300

:

END

//axis in position = 100 //waits for digital input 4 to become active (logical value 1) //the movement of axis 1 is executed and the control passes // to the next instruction without waiting for the axis in position (0) //waits for digital input 3 to become active (logical value 1) //stopps axis 1 //I wait 2 seconds before executing the next instruction //I execute a linear interpolation with final position axis1 = 200 and //final position axis2 = 300

The example shows a series of movements of axis 1. In step 7, a linear interpolation is executed using instruction 84 LINE n1 m1 n2 m2. Axis 1 is brought to position 200, while axis 2 is brought to position 300.

Page 92

M0000464

Manuale di programmazione

Instruction NC Keyboard Editor Format q1 q2

Capitolo 8: Origini7: Parametri utensili

(50)

LINE2 q1 q2



50 LINE2 q1 q2



Executes a 2-axis interpolation in positions q1 and q2. Instruction 50 LINE2 q1 q2 allows performing a rectilinear movement of the tool. Unlike the linear interpolation instructions 61 G1 X xf Y yf, instruction 50 LINE2 q1 q2 does not provide for tool compensation. Example: … : …

LINE2 100 200

//linear interpolation with final position X=100 Y=200

N.B. See also instruction 61 G1 X xf Y yf

Instruction NC Keyboard Editor Format q1 q2 q3

(51)

LINE3 q1 q2 q3



51 LINE3 q1 q2 q3



Executes a 3-axis interpolatioin in positions q1, q2 and q3. Like instruction 50 LINE2 q1 q2 except that it takes 3 axes into consideration.

Instruction NC Keyboard Editor Format q1 q2 q3 q4

(52)

LINE4 q1 q2 q3 q4



52 LINE4 q1 q2 q3 q4



Executes a 4-axis interpolation in positions q1, q2, q3 and q4. Like instruction 50 LINE2 q1 q2 except that it takes 4 axes into consideration.

M0000464

Page 93

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format q1 q2 q3 q4 q5

Manuale di programmazione

(53)

LINE5 q1 q2 q3 q4 q5



53 LINE5 q1 q2 q3 q4 q5



Executes a 5-axis interpolation in positions q1, q2, q3, q4 and q5. Like instruction 50 LINE2 q1 q2 except that it takes 5 axes into consideration.

Instruction NC Keyboard Editor Format q1 q2 q3 q4 q5 q6

(54)

LINE6 q1 q2 q3 q4 q5 q6

54 LINE6 q1 q2 q3 q4 q5 q6



Executes a 6-axis interpolatioin in positions q1, q2, q3, q4, q5 and q6. Like instruction 50 LINE2 q1 q2 except that it takes 6 axes into consideration.

Page 94

M0000464



Manuale di programmazione

Instruction

Capitolo 8: Origini7: Parametri utensili

(102) MEM STEP VNi

NC Keyboard Editor Format i

102 MEM STEP VNi



From the step after the instruction on, the number of the current step is automatically stored in the Numerical Variable of index i. From the step after the instruction on, the number of the current step is automatically stored in the Numerical Variable of index i. This instruction turns out to be particularly useful for restarting in the case of a power failure. In fact, with this instruction, it is possible to store which step the program is executing at the time of the power failure. Let's consider the following example: suppose we set VB45 to 1 when we want to execute the automatic cycle starting from the beginning of the program: Example: :

MEM STEP VN210 SET VN50 = VN210

:

IF VB45 = 0 GOTO VN50

//I set the current step (step 1) in VN210 //I assign to VN50 the step previously //stored //I jump to the step stored in VN50 (step 1) //in fact, VN210 contains the value 2 (we are, //in fact, at step 2).

M0000464

Page 95

Capitolo 8: Origini7: Parametri utensili

Instruction

(70)

NC Keyboard Editor Format xf yf tf

Manuale di programmazione

MOVEXYT xf yf tf



70 MOVEXYT xf, yf, tf



Executes a linear interpolation with tool. xf, yf are the coordinates of the final point, tf is the final position of the tool. In addition to positions X and Y relative to the system of reference, the position of the tool in the plane is also defined by the angle that it forms with the X axis of the absolute system of reference as shown in the figure Y 90°

180°



X

-90°

To position the tool with the correct angular position tf, you must refer to the imaginary segment that approximates the real shape of the tool. Once the segment and its orientation are defined, the angle that it forms with the X axis of the system of reference (see figure) deforms the angular coordinate of the tool. Given the initial position from which the tool starts, and thus, the X axis position, Y axis position and the angle that the tool forms with the X axis, the instruction 70 MOVEXYT xf, yf, tf permits the tool to reach a final position with axis X position equal to xf, axis Y position equal to yf and orientation angle equal to tf. Y F

I

X

Page 96

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

Initial point I (xi=20 yi=15 ti=0) with coordinates representative of the tools center of gravity. Final point F (xf=65 yi=35 ti=45) with coordinates representative of the tools center of gravity. For example, if the tool is approximated from the segment (arrow) in the figure, it moves from an initial position I (in which it is found before instruction 70) to a final position F with the following instruction: … : MOVEXYT 65, 35, 45 respect

//final position with xf=65 yf=35 tf=45. Coordinates with //to the absolute X-Y reference system



Instruction NC Keyboard Editor Format or

(39)

NO CONT MOVE



39 NO CONT MOVE G61

Disables continuous interpolated movements. Functions in normal mode (without having given instruction 35 NO WAIT AX). See, the example of instruction 38 CONT MOVE

M0000464

Page 97

Capitolo 8: Origini7: Parametri utensili

Instruction

Manuale di programmazione

(35)

NC Keyboard Editor Format

NO WAIT AX

35 NO WAIT AX

Disables wait for axis in position; the execution of the program continues without waiting for the axes in motion to arrive in position. If you try to execute a movement instruction relative to an axis that is already in motion, the program will stop with an error. It is valid from the program step in which it is found on. I.e., it has no "retroactive" effect: for the movement of axes moved in previous steps, the method relative to the moment of their activation will be valid (until reaching their position). In the program's normal operating mode, after an axis movement instruction (such as 80 AX n TO m), program 9800 waits for the axis to arrive in position before executing the subsequent instructions. For example, let's consider the following program: … : SET VQ1 = 100.000 : AX 1 TO VQ1 : IF IN 3 GOSUB 7 ... Step 3 is executed only after axis 1 has arrived in position 100 mm. Nevertheless, there are cases in which it becomes necessary to change this mode, such as when you must use counters to trigger actions that cannot wait for the completion of movements or when you want to obtain continuous movements in working or, in some way, synchronize the movements of the various axes (see Example 2). To disengage from the Waiting for Axes in position mode, there is instruction 35 (NO WAIT AX). This instruction allows pursuing the execution of the program without waiting for the axes in motion to arrive in position. However, if you attempt, in this mode, to execute a movement instruction relative to an axis that is already in motion, the program will stop with an error. The programmer must, therefore, be careful to verify that an axis has arrived in position before imparting another movement instruction relative to the same axis. To this end, there are several instructions available: :

WAIT AX n IN QUOTE

: :

IF AX n GOSUB mm IF AX n GOTO mm

// Stops the execution of the program until //axis n arrives in position //If axis n is in position, it executes program m //If axis n is in position, it jumps to step m

To restore Waiting for Axes in position mode, there is instruction 36 WAIT AX.

Page 98

M0000464

Manuale di programmazione

� NOTA

Capitolo 8: Origini7: Parametri utensili

It is important to note that the WAIT AX/NO WAIT AX instructions are valid from the program step in which they are found on, i.e., they change mode only from that step on. For the movement of axes moved in previous steps, the mode relative to the moment of their activation will continue to be valid (until they reach their position). It may, therefore, be necessary to use the instructions that control their reaching position.

In addition, there is also an instruction that changes the program method in local mode: :

SKIP WAIT AX n

//It pursues the execution of the program //without axis n being in position

With this instruction, it is possible to activate the No Wait Ax mode, which will only be valid for the current step and relative to axis n, which must be moved in the same step. Example: Now, let's take a look at a simple little program that attempts to clarify the problems just explained. : : :Wait

NO WAIT AX AX 1 TO 1000.000 VQ10 = POS AX 1

:

IF VQ10 < 300.000 GOTO Wait

: : : :

AX 2 TO 700.000 WAIT AX 1 IN QUOTE AX 1 TO 800 END

//We want axis 1 to reach //position 300 before //starting axis 2

After having disabled Wait for Axis in position, the program drives axis 1 to position 1000 mm and assigns the position of the first axis to Position Variable VQ10. In steps 3 and 4, the program waits for axis 1 to reach the position of 300 mm, before starting axis 2 to the position of 700 mm (at step 5). Having disabled the Wait Axis, you can thus realize a synchronism between the movements of the axes that would otherwise not be feasible. In fact, if step 1 did not exist, the program would stop at step 2 and would evaluate the third step only after the first axis reached position 1000. Before once again driving axis 1 (to position 800 mm) with step 7, the program blocks execution waiting for axis 1 to finish its movement through the instruction WAIT AX 1 IN QUOTE. It is important to note that if this instruction were not present, the program would be wrong since it would have to move axis 1 when it could still moving, without having reached the position set.

M0000464

Page 99

Capitolo 8: Origini7: Parametri utensili

� NOTA

Manuale di programmazione

It should be noted that if step 6 was: :

WAIT AX

The program would be wrong anyway because step 6 would change the mode for the subsequent steps, while axis 1 is being driven to step 2 with a different mode (No Wait Axis).

Example: Let's look at another example of synchronizing axes movements possible with the use of WAIT/NO WAIT AX. :

NO WAIT AX

: :

AX 1 TO 100.000 //Final position axis 1 VEL AX 3 45.0 //Suitable speed AX 3 TO 60.000 //Intermediate position axis 3 WAIT AX 3 IN QUOTE //Wait for arrival of axis 3 in position VQ10 = POS AX 1 //Read the position of axis 1 //If position < 90 return to step 5 IF VQ10 < 90.000 GOTO 5 AX 3 TO 100.000 //Final position axis 3 WAIT AX 1 IN QUOTE //Wait for arrival of axis 1 in position WAIT AX 3 IN QUOTE //Wait for arrival of axis 3 in position

: : : : :

//Disables axes in position

In this example, it is assumed that axis 1 is found in position 80 and must be moved to position 100; axis 3 is in position 70; when axis 1 reaches the middle of travel (90), axis 3 must be in position 60 to avoid the obstacle. The speed of axis 3 must be calculated so as to cross the section from position 70 to position 60 in the time it takes for axis 1 to complete half the path (from position 80 to position 90). For safety, axis 3 doesn't begin to move to the initial position before axis 1 has reached half the path (position 90).

Page 100

M0000464

Manuale di programmazione

Instruction

Capitolo 8: Origini7: Parametri utensili

(55)

NC Keyboard Editor Format n

ORG n (or G55 n)



55 ORG n



Sets origin n as active. To return to absolute positions set the value to 0. The positions used during working with tools are calculated on the basis of the system of reference used. The absolute system of reference takes as the origin of the axes, the zeros calculated with zero axes in the calibration phase of the machine. In addition to this origin of the axes, the Sipro s.r.l. controls provide the possibility of setting 20 of them that can be used during the execution of a program. I.e., it creates a list of different origins numbered from 1 to 20 and, by specifying the number associated to the origin, the control takes as the system of reference, from that step on, the one that has those specified as positions. For example, we want to perform the following work:

Y’ Y

X’ BEGIN WORK (X =70 Y=80)

X ORIGIN ABSOLUTE SYSTEM OF REFERENCE (X=0, Y=0)

We want to cut a slab of marble of rectangular shape, whose length (X axis) and height (Y axis) are known. Suppose we have height = 70 and length =140 and that the work begins in positions X =70 and Y = 80, with respect to the “absolute” system of reference. Initially, the “absolute” system of reference has its origin at (0,0) which corresponds to the zero axis positions calculated with the calibration of the machine. For programming convenience, the origin of reference can be brought to the begin work point by setting a new origin with identification number 2 and assigning the positions X =70 Y = 80. In this way, the program will make reference, as zero axes, to the new origin specified. Working the square shown above will use the following instructions. Example: …. : : : : :

ORG 0 //system of reference with absolute axes origin (0.0) G1 X70 Y80 //positioning tool at the begin work point (70,80) ORG 1 //system of reference with axes origin at (70, 80), from this moment on //all the axis movement positions will refer to this origin //as zero G1 X140 Y0 //work equal to the rectangular length X=140 lower side G1 X140 Y70 //work equal to the rectangular height Y=70 right side M0000464

Page 101

Capitolo 8: Origini7: Parametri utensili

: : : : ….

G1 X0 Y70 G1 X0 Y0 ORG 0 G1 X0 Y0

Manuale di programmazione

//work equal to the rectangular length X=140 upper side //work equal to the rectangular height Y=70 left side //return to the absolute system of reference //positioning axes at the absolute origin

To create the list of origins, one must proceed in three ways: •

By creating the list using the numerical control keyboard (item Origins on the Main Menu of the NC) • Self-learning • Using the instructions provided (58 and 59) inside the program.

N.B. For further explanations, see paragraph Origins in the programming manual

Page 102

M0000464

Manuale di programmazione

Instruction

Capitolo 8: Origini7: Parametri utensili

(18)

NC Keyboard Editor Format n

OUTON n

18 OUTON n



Enables the indicated output. The output remains active until an OUTOFF instruction. Example: #prog 1 #name Test : : : : : :

AX 1 TO 100 OUTON 4 TIME 2 OUTOFF 4 AX 1 TO 0 END

Output 4 (OUTON instruction) is set and reset after a wait of 2 seconds (OUTOFF)

Instruction

(19)

NC Keyboard Editor Format n

OUTOFF n

19 OUTOFF n



Disables the indicated output. Example: See example for instruction 18 OUTON

M0000464

Page 103

Capitolo 8: Origini7: Parametri utensili

Instruction

(15)

NC Keyboard Editor Format n

Manuale di programmazione

PULSE n

15 PULSE n



Sets output n to ON for 200 msec. Example: #prog 1 #name Test : : : : : : : :

VN = 0 IF IN 1 GOTO 4 GOTO 2 VN = VN + 1 IF VN > 10 GOTO 7 GOTO 2 PULSE 2 END

The above example realizes the count of the ONs that arrive at input 1. When this count reaches 10, output nr1 is set to ON for an interval equal to 200 msec (a pulse is set on output).

Page 104

M0000464

Manuale di programmazione

Instruction NC Keyboard Editor Format n m

Capitolo 8: Origini7: Parametri utensili

(93)

QUOTE AX n = m

93 QUOTE AX n = m



Like instruction 86 (SET POS AX n = m), but cancels the instantaneous error. Example: : :

AX 1 TO 100 QUOTE AX 1 = 30

The program, which features the two specified instructions inside it, performs a change of position of axis 1. Before instruction 93 QUOTE AX n = m, the axis is found in position 100. The execution of instruction 93 QUOTE AX n = m has the effect of forcing the position of axis 1 to 30. I.e., the position at which axis 1 is found is no longer 100, but 30. In practice, only the reference of the axis is changed; the latter undergoes no physical movement. Unlike instruction 86 SET POS AX n = m, instruction 93 QUOTE AX n = m cancels the instantaneous error relative to the preceding position. I.e., with reference to the previous example, if I had a positioning error of 0.0001 in position 100, this error is cancelled also in position of reference 30.

M0000464

Page 105

Capitolo 8: Origini7: Parametri utensili

Instruction

(47)

NC Keyboard Editor Format n i

Manuale di programmazione

SET ANGLE ORG n VAL i



47 SET ANGLE ORG n VAL i



N.B.

Instruction only enabled for dedicated firmware. Rotation and translation is enabled by VB412. Sets the angle of the origin. The movement of the axis is carried out with respect to the origin of the system of reference with the instruction 55 ORG n. In addition to the translation of the origin of the axes, carried out with respect to the origin of the absolute system of reference (origin in the machine zero), you can set the rotation of the new system of reference with the instruction 47 SET ANGLE ORG n VAL i. This instruction sets the angle between the axes of the new system of reference and the old one. For example, if we want a new system of reference with origin translation (60,40) and rotation of the angle by 30 degrees, the instructions will be: … : :

ORG 2 //origin translated to origin 2 SET ANGLE ORG 2 VAL 30 //angle of new system of reference rotated by 30 //degrees

… Logically, I should have first set origin 2 with the values 60 axis1(X) and 40 axis2(Y) The system of reference is modified as in the figure Y’ Y X’ = 30° P = 30° O X The new system of reference has origin at P (X=60,Y= 40) (X’=0,Y’=0) with respect to absolute origin O. Moreover, the new system of reference is rotated by an angle = 30° with respect to the axes of the absolute system of reference O.

Page 106

M0000464

Manuale di programmazione

Instruction NC Keyboard Editor Format m n i

Capitolo 8: Origini7: Parametri utensili

(59)

SET ORG m AX n VAL i

59 SET ORG m AX n VAL i



Sets the value i of the axis n in origin m. One of the methods for setting the positions of an origin is to use instruction 59 SET ORG m AX n VAL i Example: … : SET ORG 2 AX 3 VAL 50 //sets axis 3 of origin 2 to 50 … N.B. For further explanations, see paragraph Origins in the programming manual and instruction 55 ORG n

M0000464

Page 107

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format n m

Manuale di programmazione

(86)

SET POS AX n = m

86 SET POS AX n = m



Forces the position of axis n to position m, ie., it assumes as m the position at which axis n is found in that moment and no movement is effected. As consequence, the zero of reference of axis n is changed. The instantaneous error is maintained. Example: : :

AX 1 TO 100 SET POS AX 1 = 0

The program, which features the two specified instructions inside it, performs a change of position of axis 1. Before instruction 86 SET POS AX n = m, the axis is located in position 100. The execution of instruction 86 SET POS AX n = m has the effect of forcing the position of axis 1 to 0. I.e., the position at which axis 1 is found is no longer 100, but 0. In practice, only the reference of the axis is changed; the latter undergoes no physical movement. Unlike instruction 93 QUOTE AX n = m, instruction 86 SET POS AX n = m does not cancel the instantaneous error relative to the preceding position. I.e., with reference to the preceding example, if I have a positioning error of 0.0001 in position 100, this error is maintained even in position of reference 0.

Page 108

M0000464

Manuale di programmazione

Instruction NC Keyboard Editor Format n

Capitolo 8: Origini7: Parametri utensili

(87)

SKIP WAIT AX n

87 SKIP WAIT AX n



Continues without axis n being in position. It has a local character, i.e., it is only valid within the current step. In the axis movement instructions, the control waits for the axis to arrive in position before going to the next instruction, i.e., it waits for the movement relative to the instruction in progress to finish. For example, if the program has this instructions in it: : : :

AX 1 TO 100 OUTON 2 AX 2 TO 30

the instruction setting output 2 (OUTON ) and the instruction AX 2 TO 30 are only executed after the axis has reached position 100, i.e., only after the instruction 80 AX 1 TO 100 has been executed by the control. Instruction 87 SKIP WAIT AX n allows executing the instruction following the current one without waiting for its completion. For example, if, before the instructions shown above, we have: : : :

SKIP WAIT AX 1 AX 1 TO 100 OUTON 2 AX 2 TO 30

Unlike before, the instruction 87 SKIP WAIT AX 1, has been added in the step that has the instruction moving axis 1. The effect of this insertion is to execute the instruction OUTON 2 and the instruction AX 2 TO 30 belonging to the subsequent steps without waiting for the axis 1 movement instruction, with the instruction 80 AX 1 TO 100, to be completed. It should be emphasized that the effect has a local character, unlike the instruction 35 NO WAIT AX. I.e., instruction 87 SKIP WAIT AX only has effect inside the step in which it is inserted. N.B. For further explanations, see instruction 35 NO WAIT AX and relative examples.

M0000464

Page 109

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format n

Manuale di programmazione

(83)

STOP AX n

83 STOP AX n



Stops axis n with a ramp, i.e., the axis is not immediately blocked but decelerates. When the axis is stopped, it is assumed in position. Example: #prog 9800 #name Test : : : : : :

AX 1 TO 100 INPUT 4 SKIP WAIT AX 1 AX 1 TO 0 INPUT 3 STOP AX 1 END

//axis in position = 100 //waits for digital input 4 to become active (logical value 1) //the movement of axis 1 is executed and the control passes // to the next instruction without waiting for the axis in position (0) //waits for digital input 3 to become active (logical value 1) //stops axis 1

Instruction 83 STOP AX n at step 5 interrupts the movement of axis1, which is being brought to position 0.

Page 110

M0000464

Manuale di programmazione

Instruction NC Keyboard Editor Format or m

Capitolo 8: Origini7: Parametri utensili

(17)

TIME m

17 TIME m Hm



Waits m seconds at the end of the step. Example: #prog 1 #name Test : : : :

AX 1 TO 100 TIME 2 AX 1 TO 0 END

The example shows a possible use of the TIME instruction. At the initial step, axis1 goes to position 100. It then waits 2 seconds (instruction TIME 2) and finally executes the last step and the axis goes to position 0.

M0000464

Page 111

Capitolo 8: Origini7: Parametri utensili

Instruction

Manuale di programmazione

(75)

NC Keyboard Editor Format

TOOL ANGLE = m



75 TOOL ANGLE = m

Instruction for special applicatios, for use call Sipro technical office. m



In linear interpolation, set the tool angle (calculated with respect to the system of reference) to identify its working point. The angle is expressed in degrees. In linear interpolation, it is necessary to specify the angle of the tool to identify its working point (instruction 75). In circular interpolation, the angle is calculated and updated automatically to allow the tool to remain tangential to the curve. The angle is calculated with respect to the system of reference (see figure 2). Starting from the edge or center of the tool, it considers the ideal vector that go towards the working point: for the angle, it takes the one that forms this vector, oriented in the system of reference. For example, the first tool in the figure forms an angle of 0° and the secondo of -90°. Y 90°

180°



X

Figure 2 Y

Y -90°

-90° 0° X

X

For an example of work, see the example for instruction 41 G41.

Page 112

M0000464

Manuale di programmazione

Instruction

Capitolo 8: Origini7: Parametri utensili

(74)

NC Keyboard Editor Format

TOOL n



74 TOOL n

Instruction for special applicatios, for use call Sipro technical office. n



Sets tool number n. The use of this instruction allows choosing the tool for the work. Example: : : : : :

AX 1 TO 1150 AX 2 TO 900 FXY 10 TOOL 2 TOOL ANGLE = 90

Instruction NC Keyboard Editor Format i n

// Set working speed: 10 mm/sec // Use tool no. 2 // Tool angle = 90 degrees

(195) VB [VNi] = n 195 VB [Vni] = n



Example: : :

VN1 = 5 VB[VN1] = 0

//I assign the whole numeric value 5 to VN1 //To the VB of index specified by VN1 (5), I assign the //value 0

…. The program assigns the value 0 to VN5

M0000464

Page 113

Capitolo 8: Origini7: Parametri utensili

Instruction

(190) VBi = EQ2D v1 v2 v3 n

NC Keyboard Editor Format i v1 v2 v3 n

Manuale di programmazione

190 VBi = EQ2D v1 v2 v3 n



Calculates the roots of a second degree equation of the type ax² + bx + c = 0. In which: VBi = 0 indicates that the instruction was correctly executed; VBi = 1 indicates that there is a negative discriminant or that the coefficient a = 0; v1 = coefficent a v2 = coefficent b v3 = coefficent c n = index of the 1st VQ that contains the results: VQ[n] = 1st solution (the minor); VQ[n + 1] = 2nd solution (the major). Example: : : : : :

SET VQ1 = 1 //I set Position Variable VQ1 to 2.828 SET VQ2 = -14 //I set Position Variable VQ2 to 2 SET VQ3 = 45 //I set Position Variable VQ3 to 45 VB1 = EQ2D ValQ1 ValQ2 ValQ3 4 IF VB1 = 1 GOTO AxesStopped //If the equation is not correctly resolved //it avoids moving axes 1 and 2 : AX 1 TO VQ4 : AX 2 TO VQ5 :AxesStopped …. The program calculates the roots of the equation: x2 – 14x + 45 = 0

root 1 =5

root 2 = 9

The root with the smallest value is saved in VQ4 (parameter n), while the larger one is salved in VQ5 (n + 1). The axes are brought to the positions that correspond to the two roots only if the equation is correctly resolved (solutions acceptable if VB1 = 0).

Page 114

M0000464

Manuale di programmazione

Instruction NC Keyboard Editor Format i n m

Capitolo 8: Origini7: Parametri utensili

( 176 ) VBi = SETMAC PAR n VAL m 176 VBi = SETMAC PAR n VAL m



Sets a machine parameter. The respective codes (n) are the following: 1 Interpolation acceleration factor xx.x 2 Maximum radius error (mm × 1000) 3 Number tangential axes (in interpolation) 4 Tangency tolerance (degrees × 1000) 5 Acceleration factor in arcs xx.x 6 Acceleration factor between two entities xx.x 7 Virutal axes proximity threshold Example: … :

VB1 = SETMAC PAR 2 VAL 0.1 //I set the machine parameter to the value 0.1 //Maximum radius error. VB1 receives the return //code.

… N.B. The values modified with the SETMAC instruction are not stored in FLASH EPROM, so they are lost at power-off. We recommend reading the chapter Parameters in the installation manual of the numerical control.

M0000464

Page 115

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format i n j m

Manuale di programmazione

(178) VBi = SETP AX n PAR j VAL m 178 VBi = SETP AX n PAR j VAL m



Sets a parameter. The respective codes (j) are the following: 1 Acceleration time 2 Deceleration time 3 Movement of reference 4 Impulses of reference 5 Speed of reference 6 End travel minimum 7 End travel maximum 8 Home position 9 Encoder zero 10 Proportional Gain (Kp) 11 Integral Gain (Ki) 12 Derivative Gain (Kd) 13 Maximum Integral Action (%) 14 Tracking Alarm 15 Enabling/Disabling Feed Forward 16 Maximum Speed (%) 17 Manual Speed (%) 18 Resetting Speed (%) 19 Resetting Direction 20 Axes proximity threshold 21 Encoder and Analog Inversion 22 Dead Time Value 23 Axis Type 24 Axis band in position (impulses) 25 Acceleration space (mm) (axes on/off) 26 Deceleration space (mm) (axes on/off) 27 Inertia (mm) (axes on/off) 28 Play recovery (mm) (axes on/off) 29 Number of decimal places 30 Analog output number (from 1) 31 Encoder number (from 1) N.B. Values modified through the SETP instruction are not stored in FLASH EPROM and are thus lost at power-off. VBi will contain the value 0 if the operation had a successful outcome.

Page 116

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

Example: If a program contains the instruction: … : …

178 VB95 = SETP AX 3 PAR 10 VAL 300

this sets the Proportional Gain to the value 300 for axis 3.

Instruction NC Keyboard Editor Format i j

(246) VBi = VB[VNj ] 246 VBi = VB[VNj ]



Indexed acces to variable. Assigns the value of binary variable VB[VNj] to binary variable i. Example: : :

VN1 = 5 VB2 = VB[VN1]

Instruction NC Keyboard Editor Format i x

//I assign the binary value 5 to VN1 //I assign the value of the VB of index specified by VN1 (5) //to VB2

(240) VBi = x 240 VBi = x



Sets the binary variable i to the value 0 or 1; x (in addition to 0 or 1) it can also be another binary variable). Example: … : …

VB2 = 0

M0000464

Page 117

Capitolo 8: Origini7: Parametri utensili

Instruction NC Keyboard Editor Format i x

Manuale di programmazione

(189) VBi = x 189 VBi = x



Sets the binary variable i to the value 0 or 1; x (in addition to or ) it can also be another binary variable). Unlike the instruction with the same name (240) Vbi = x, instruction (189) Vbi = x allows the use of the extended index Binary Variables (i > 255). Example: VB1 = VB300 N.B. The instructions that use the extended index (i > 255) are those of assignment (such as Vqi = m or Vni = n) while those of movement (type ax 1 to Vqi) always use indexes 255). Example: VN1 = VN300 N.B. The instructions that use the extended index (i > 255) are those of assignment (such as Vqi = m or Vbi = x) while those of movement (type ax 1 to Vqi) always use indexes 255). Example: VQ1 = VQ3000 N.B. The instructions that use the extended index (i > 255) are only those of assignment (such as Vbi = x or Vni = n) while those of movement (type ax 1 to Vqi) always use indexes TotAssi) unexpected mode new mode of the advance (bit 6 = 1) and cams not space new mode of the advance (bit 6 = 1) and cams mono-directional

� NOTA

before using function 62, it is necessary to have initialized digital cam management through a call to function 61 – digital cams initialization and reset. M0000464

Page 145

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

� NOTA

for digital cams to be operation, the enabling Binary Variable (VB) must be 1; the enabling VB is assigned through function 61.

� NOTA

The VQ from 6^ to 10^ are taken into consideration only if the bit 6 of VQ 1^ are equal to 1. If this bit is 0 VQ from 6^ to 10^ are ignored. (feature active from firmware version 5.59 of 31/08/2007 )

OPERATING PECULIARITIES

1. A call to function 62 with output equal to an already active cam (equal as number and as type - i.e., digital output or VB) leads to the MODIFICATION of the parameters of the already existing cam rather than the insertion of a new cam 2. A space cam (Mode 1) with the Start value equal to the Stop value will NOT be activated; if a cam is already present with an equal output, it will be DEACTIVATED 3. From firmware version 5.59 of 31.08.2007 is active a new mode setting of the advance, available only for space cams bidirectional. It set two thresholds speed: minimum threshold and maximum threshold [beats / min] (beats means 1 cycle or 360 degrees or more generally 1 module). It set an advance in degrees reported at the maximum speed. For speeds lower than the minimum speed the advance is null. For speeds higher than the maximum speed the advance is equal to the maximum advance set. For speed values between the minimum and the maximum speed the advance is proportional to the speed. The calculation of the advance is made between a start threshold and a stop threshold which are programmable: outside of this range is considered the last advance calculated. Example: Activation of a digital space cam that activates digital output 12 in the interval [30 – 145] degrees of axis 1; return value in VQ1, parameters in VQ51 – VQ55 :

VQ51 = 1 VQ52 = 30 VQ53 = 145 VQ54 = 0 VQ55 = 0

:

VQ1 = FUN 62 1 12 51

Page 146

// space cam // Start value // Stop value // advance // modulo. 0 = uses ImpRif of the master axis

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

FUN 63 INITIATION MANAGEMENT ACTION CAM WITH AXIS ASSOCIATED Feature available on request.. The function initializes the management of the cam with Associated axis. Must be the carried out before the first call to the function 64 (programming Associated cam shaft), a Subsequent calls to the function 63 reset all the cams may be active SYNOPSIS Vq = FUN 63 0 0 0 j

the VQ index that will contain 'the return value of the function

RETURN VALUE 0 Operation successful example Initialization of the cam controller with associated axis. : VQ1 = FUN 63 0 0 0 After the execution of the function 63 ia possible program a cam axis associated with. .

M0000464

Page 147

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

FUN 64 PROGRAMMING OF A CAM SHAFT ASSOCIATED WITH Feature available on request.. The function 64 allows the programming of a cam shaft associated with. SYNOPSIS Vq = FUN 64 i

the VQ index that will contain the return value of the function

N. Master

Number of the Master [1, 2, ...]

N. Slave

Number of a slave [1, 2, ...]

N. Mov

number of movements of the slave axis for each revolution of the master. It's 'possible to program up to 8 movements per revolution.

Idx vq_par

Index of the first VQ vq par with other configuration parameters:

First VQ

Index of the Vb enabling the cam.

Second VQ

speed 'of the master [%]

Third Vq

Module of scanning of the axis Master 0 = parameter is used ImpRif Master axis other than 0 = form [mm]

Fourth VQ

mode of use of the cam. It 'a bit variable. Bit 0: = 0 is used to speed 'theory of the master. = 1 is used to speed 'real master. Bit 1: = 0 Use the speed 'snapshot of the master. = 1 is used to speed 'of the media masters. The average is computed on four samples. Bit 2: = 0 The encoder of the master it is incremental. = 1 The encoder of the master is is an 'absolute single-turn.

� NOTE

Fifth VQ Page 148

From version 5.19 fw the decimal part of the fourth and Vq 'the number of samples on which you are average. If the decimal part, and '0 the number of samples and the average' 4 (for compatibility 'with earlier versions of fw.))

Base Placinq [mm] M0000464

Manuale di programmazione

Sixth VQ

Capitolo 8: Origini7: Parametri utensili

Start position of the first movement of the cam [mm].

Seventh VQ Position stop of the first movement of the cam [mm]. Eighth VQ

Movement of the slave during the first movement of the cam [mm].

Ninth VQ

start position of the second movement of the cam [mm].

Tenth VQ

position stop of the second movement of the cam [mm].

Eleventh VQ Movement of the slave during the second movement of the cam [mm]. RETURN VALUE: >=0 -1,000 -2,000 -3,000 -4,000 -5,000 -6,000 -7.yxx-

Operation successful programming of the cam. The number and 'the identification of the cam. Error in the number of the master. Error in the number of the slave. Number of master axis equal to the number of the slave. Maximum number of cams allowed. Not enouph memory space for the cams. Error in the number of moves to master around. error in the calculation of the table. and y is the number of movements that generated the error. xx it is the error code 01 = Overflow in the calculation of cycle time. 02 = Overflow in the calculation of the movement time. 03 = Movement time was too short. 04 = Speed 'slave of greater speed. maximum 05 = Overflow in the calculation of the initial cam. 06 = Overflow in calculating the instant of end cam.

Example: -7,204 Error in the movement. 2: the speed 'of the slave is higher than the velocita'ammessa. -8,000 Error in the parameter MODE OF USE of the cam. -9,000 Error in the parameter SPEED 'THE MASTER.

� NOTE

Before using the function 64 you must initialize the management of the cam shaft associated with the call to the function 63.

It's possible to program up to 2 cam shaft associated with: the master axis can be the same for both cams, the slave axis must necessarily be different. The positions of the slave shall be planned and calculated with mode 'incremental: in fact for each movement indicates the position of start and stop of the master while the slave axis indicates the incremental movement, not the final installment The slave axis motion is calculated using both the input data provided by the function 64 and the following parameters of the master and slave axes: 1 2

Mm reference of the master. Pulses of reference of the master. In the case of single-turn absolute encoder parameter M0000464

Page 149

Capitolo 8: Origini7: Parametri utensili

3

Manuale di programmazione

value represents information per revolution of the encoder. Can 'be used, if programmed as a module of the cam (see third parameter VQ) Speed 'reference of the master axis: along with the speed parameter' of the master [%] (second VQ) is used to determine the time required for movement of the slave. Number of master axis encoder. Mm reference of the slave. pulses of reference of the slave Speed 'reference of the slave. Number of the slave encoder. Acceleration time of the slave. Deceleration time of the slave.

4 5 6 7 8 9 10 . Even when the master and 'just an encoder, you must define a master axis with the gains of the PID and the parameter tracking error to zero. In this case the speed parameter 'assumes the meaning of the reference frequency of the encoder [pulses / sec] at the maximum speed'. It's'possible to program a constant speed to overlap with other placements, such as to ensure that, while the master travels through space 0 - module, the slave performs positioning of the positioning of the basic parameter (fifth Vq). EXAMPLES Example 1 Programming a cam shaft associated with. Axis 1 = Master; axis 2 = Slave For each revolution of the master axis (0 - 360 degrees), the slave axis follows the following three movements: cam 1: pos. master from 90 to 120 degrees, the slave advances of 1800 mm; Cam 2: Pos. master from 150 to 240 degrees, the slave recedes to -300 mm; Cam 3: pos. master from 320 to 30 degrees, the slave retreats -1500 mm. It uses the speed 'theoretical mean of the master. The master axis and 'equipped with incremental encoders. No positioning of the base. The movements of the slave master are calculated considering the move to 60% of its speed 'maximum. The cam is activated when Vb57 = 1. : Vq1 = FUN 63 0 0 0 / / Init. Management cams ax : Vq10 = 57 / / Enable = Vb57 cam : Vq11 = 60 / / Vel. master axis = 60% : Vq12 = 360 / / unit = 360 degrees : Vq13 = 2 / / Speed 'theory of the master / / Speed 'media / / Incremental encoders : Vq14 = 0 / / Position the base : Vq15 = 90 / / Start 1 ^ cam Page 150

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

: Vq16 = 120 / / ^ 1 Stop Cam : Vq17 = 1800 / / Move slave axis : Vq18 = 150 / / Start 2 ^ cam : Vq19 = 240 / / Stop 2 ^ cam : Vq20 = -300 / / move the slave axis : Vq21 = 320 / / Start 3 ^ cam : Vq22 = 30 / / Stop 3 ^ cam : Vq23 = -1500 / / move the slave axis : Vq1 = FUN 64 1 2 3 10 Example 2 Programming a cam shaft associated with. Axis 1 = Master; axis 2 = Slave For each revolution of the master axis (0 - 360 degrees), the slave axis follows the following two motions: cam 1: pos. master from 90 to 120 degrees, the slave advances of 1000 mm; Cam 2: Pos. master from 150 to 240 degrees, the slave advances by 500 mm. Placement of base = 300 mm. The module of recirculation for the slave axis is taken by the parameter of reference pulses. It uses the speed 'average real master axis. The master axis and 'with a single-turn absolute encoder pulses per revolution, many of which must match the parameter of the master reference pulses. The movements of the slave master are calculated considering the move to 30% of its speed 'maximum. The cam is activated when Vb57 = 1. : Vq1 = FUN 63 0 0 0 / / Init. Management cams ax : Vq10 = 57 / / Enable = Vb57 cam : Vq11 = 30 / / Vel. master axis = 30% : Vq12 = 0 / / Set Form = Ref : Vq13 = 7 / / Speed 'real master / / Speed 'media / / Single-turn absolute encoder : Vq14 = 300 / / Position the base : Vq15 = 90 / / Start 1 ^ cam : Vq16 = 120 / / ^ 1 Stop Cam : Vq17 = 1000 / / Move slave axis : Vq18 = 150 / / Start 2 ^ cam : Vq19 = 240 / / Stop 2 ^ cam : Vq20 = 500 / / move the slave axis : Vq1 = FUN 64 1 2 2 10 M0000464

Page 151

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

FUN 65 DETERMINATION OF A POSITION OF AXIS SLAVE CORRESPONDING TO A POSITION OF AXIS MASTER Feature available on request. The function 65 allows to determine the position of the slave axis corresponding to a position of the master axis. SYNOPSIS Vq = FUN

the VQ index that will contain 'the return value of the function

Cam. Iden

ID cam (function return value 64) Master Index Idx Vq which contains the location of the master. If you set -1 the function considers the current position of the master.

Slave Idx

Index Vq where the slave stores the position of the slave read in the table.

RETURN VALUE: Correct result. -1 Error setting the identifier of the cam. -2 Error in the share index of the master. -3 Error in the share index of the slave. -4 Cam uninitialized.

� NOTA

Before using the function 65 must: be initialized with the management of the cam shaft associated with the call to the function 63 program at least a cam through the function.64

EXAMPLES Example 1 Determination of the position of the slave. After initializing a cam, is stored in the position of the slave Vq30 associated with the current share of the master. : Vq1 = FUN 63 0 0 0 / / Init. Management cams ax

Page 152

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

: Vq10 = 57 / / Enable = Vb57 cam : Vq11 = 60 / / Vel. master axis = 60% : Vq12 = 360 / / unit = 360 degrees : Vq13 = 2 / / Speed 'theory of the master / / Speed 'media / / Incremental encoders : Vq14 = 0 / / Position the base : Vq15 = 90 / / Start 1 ^ cam : Vq16 = 120 / / ^ 1 Stop Cam : Vq17 = 1800 / / Move slave axis : Vq18 = 150 / / Start 2 ^ cam : Vq19 = 240 / / Stop 2 ^ cam : Vq20 = -300 / / move the slave axis : Vq21 = 320 / / Start 3 ^ cam : Vq22 = 30 / / Stop 3 ^ cam : Vq23 = -1500 / / move the slave axis : Vq1 = FUN 64 1 2 3 10 / / Prog. cam

: VQ50 = Vq1 / / VQ50 Iden. cam : VQ1 = FUN 65 VQ50 -1 30 / / Det. Pos slave Example 2 Determination of the position of the slave. After initializing a cam, is stored in the position of the slave Vq30 associated with the value of the VQ40, regarded as the share of the master. : Vq1 = FUN 63 0 0 0 / / Init. Management cams ax : Vq10 = 57 / / Enable = Vb57 cam : Vq11 = 60 / / Vel. master axis = 60% : Vq12 = 360 / / unit = 360 degrees : Vq13 = 2 / / Speed 'theory of the master / / Speed 'media / / Incremental encoders : Vq14 = 0 / / Position the base : Vq15 = 90 / / Start 1 ^ cam : Vq16 = 120 / / ^ 1 Stop Cam : Vq17 = 1800 / / Move slave axis : Vq18 = 150 / / Start 2 ^ cam M0000464

Page 153

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

: Vq19 = 240 / / Stop 2 ^ cam : Vq20 = -300 / / move the slave axis : Vq21 = 320 / / Start 3 ^ cam : Vq22 = 30 / / Stop 3 ^ cam : Vq23 = -1500 / / move the slave axis : Vq1 = FUN 64 1 2 3 10 / / Prog. cam

: VQ50 = Vq1 / / VQ50 Iden. cam : Vq1 = FUN 65 VQ50 40 30 / / Det. Pos slave

Page 154

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

FUN 66 SETTING THE STAGE Feature available on request. The function 66 allows you to set an offset to access the table placements. SINTAX Vq = FUN 66 < Master phase > 0 0 i

the VQ index that will contain 'the return value of the function

Cam. Iden

ID cam (function return value 64)

Master phase

the master position is subtracted from the phase and then enter the Table Placements.

RETURN VALUE: Correct result. -1 Error setting the identifier of the cam. -2 Cam uninitialized.

� NOTA

Before using the function 66 you'must initialize the management of the cam shaft associated with the call to the function 63 and to program a cam through the function. 64 The function 65 takes account of the phase. If not called the FUN66, phase, is nothing. .

EXAMPLE: EXAMPLE 1 : Vq1 = FUN 63 0 0 0 / / Init. Management cams ax : Vq10 = 57 / / Enable = Vb57 cam : Vq11 = 60 / / Vel. master axis = 60% : Vq12 = 360 / / unit = 360 degrees : Vq13 = 2 / / Speed 'theory of the master / / Speed 'media / / Incremental encoders : Vq14 = 0 / / Position the base : Vq15 = 90 / / Start 1 ^ cam : Vq16 = 120 / / ^ 1 Stop Cam : Vq17 = 1800 / / Move slave axis : Vq18 = 150 / / Start 2 ^ cam : Vq19 = 240 / / Stop 2 ^ cam : Vq20 = -300 / / move the slave axis M0000464

Page 155

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

: Vq21 = 320 / / Start 3 ^ cam : Vq22 = 30 / / Stop 3 ^ cam : Vq23 = -1500 / / move the slave axis : Vq1 = FUN 64 1 2 3 10 / / Prog. cam : VQ50 = Vq1 / / VQ50 Iden. cam : VQ1 = FUN 66 VQ50 180 0 0 / / Step Master = 180 degrees : Vq1 = FUN 65 VQ50 -1 30 / / Det. Pos slave

Page 156

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

FUN 71 ACQUISITION OF AXIS LEVEL FROM INTERRUPT OF THE ENCODER ZERO NOTCH Rev. 1.2 – 23.06.2004 Function 71 allows activating the acquisition of the level of an axis in a Level Variable (VQ) at each interrupt generated by the zero notch of an encoder. The functioning described is valid beginning from NC firmware Ver. 3.64a. N.B. The function can also be used for axes controlled through the CANopen protocol, but before the call it is necessary to define the management variables (IRQ count VN + IRQenabling VB), using FUN 72 (Firmware Ver. 5.03 and higher). The FlgUsr parameter is active beginning with firmware version 4.39. SYNTAX VQ = FUN 71 i

Index of the VQ that will contain the return value of the function

Num IRQ

[1-4] Channel number of the encoder whose zero notch is being used.

The decimal part of the parameter allows specifying the acquisition mode according to the following layout: bit 0 0 = level acquisition 1 = level acquisition in ImpRif modulo bit 2 1 = acquisition with increment of destination VQ index bit 3 (from Ver. 5.09) 1 = level acquisition in pulses in the next VQ (or VQs, if the level of more than one axis is being acquired) after the one that contains level in millimeters (or degrees) this mode is incompatible with "acquisition with increment" (bit 2)

� NOTA

In the event that you wish to use the function for an axis controlled through the CANopen protocol, the whole part of the Num IRQ parameter must be set to 0. Num Axis

Number of the axis whose level is to be acquired

The decimal part of the parameter allows specifying the number of a second axis; the level will be written in the VQ after that of the first axis specified.

� NOTA

by setting Num Axis = 0 the function is DISABLED

Idx level VQ Index of the VQ where the axis level is stored. M0000464

Page 157

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

FlgUsr If set to a value other than zero, it is possible to concatenate the operations of FUN71 with those of another function previously set, relative to the same IRQ. RETURN VALUE 0 operation executed correctly 1 specified interrupt error number (allowed values: [1 – 4]) 2 error index of the destination VQ 3 first axis error number 4 second axis error number 5 error axis not CANopen type and Num IRQ = 0 6 encoder error associated with CANopen axis not CANopen type and Num IRQ = 0 7 error missing definition of interrupt management variable (IRQ count VN + IRQenabling VB).

� NOTA

it is necessary to enable the generation of the interrupt through the standard VBs: � � � �

VB352 VB353 VB354 VB355

IRQ1 – zero notch of encoder 1 IRQ2 – zero notch of encoder 2 IRQ3 – zero notch of encoder 3 IRQ4 – zero notch of encoder 4

At each interrupt, the relative interrupt count VN is incremented: VN268 Interrupt counter IRQ1 � VN269 Interrupt counter IRQ2 � VN270 Interrupt counter IRQ3 VN271 Interrupt counter IRQ4 �

� NOTA

in acquisition with increment mode (bit 2 of acquisition mode set to 1), if the index of the destination VQ exceeds that allowed (255) the levels are written in the VQ specified by the parameter Idx level VQ. If the level of a single axis is acquired, VQ255 is not used.

Example 1: Acquisition of the level of axis 2 in VQ110 at each interrupt of the zero notch of encoder 3; return value in VQ1. VQ1 = FUN 71 3 2 110 0 Example 2: Acquisition of the levels of axes 1 and 2, in modulo, in VQ110 at each interrupt of the zero notch of encoder 3; return value in VQ1. Page 158

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

VQ1 = FUN 71 3.001 1.002 110 0 First parameter = 3.001 whole part =3 encoder 3 decimal part = 1 acquisition mode – bit 0 to 1 => acquisition in modulo second parameter = 1.002 whole part =1 acquisition level axis 1 decimal part = 2 acquisition level axis 2, also Example 3: Acquisition of the level of axis 1, with increment, in VQ110 at each interrupt of the zero notch of encoder 3; return value in VQ1. VQ1 = FUN 71 3.004 1 110 0 First parameter = 3.004 whole part =3 encoder 3 decimal part = 4 acquisition mode – bit 2 to 1 => acquisition with increment at each interrupt generated by the zero notch of encoder 3, the level of axis 1 is written in the index VQ (110 + VN270 - 1): 110 is the index of the first VQ to be used, specified by the third parameter of the function; to this is added the value contained in VN270, which is the counter of the interrupts associated to encoder 3; one is subtracted precisely from VQ110 to initiate the acquisitions (at the first interrupt, VN270 assumes the value 1 for which the level would be written in VQ111).

M0000464

Page 159

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

FUN 72 INITIALIZATION VARIABLES FOR IRQ MANAGEMENT ON CANopen Function 72 allows defining the variables for managing the interrupts on drives controlled through the CANopen protocol (VN for counting the of IRQs and IRQ-enabling VB). SYNTAX VQ = FUN 72 i Index of the VQ that will contain the return value of the function Num Axis Number of the axis controlled by CANopen whose management variables you want to define. VN Idx

Index VN for counting interrupts.

VB Idx

VB index for enabling interrupts.

RETURN VALUE 0 1 2 3

operation executed correctly Axis Number Definition error VN index error (less than 0, greater than the maximum number of VNs) VB index error (less than 0, greater than the maximum number of VBs)

Example: Definition of VN80 and VB40 as interrupt management variables for axis 2 VQ1 = FUN 72 2 80 40

Page 160

M0000464

Manuale di programmazione

FUN 76 – 77

Capitolo 8: Origini7: Parametri utensili

POSITION ROLLOVER

FUN76 returns the axis level in the range [ 0 .. Modulo], by taking away a whole number of revolutions (1 revolution = modulo). FUN77 returns the axis level in the rage [-Modulo/2 .. +Modulo/2 ], by taking away a whole number of revolutions (1 revolution = modulo). SYNTAX VQ = FUN 76 VQ = FUN 77 i

Index of the VQ that will contain the return value of the function

AxNum

Number of the axis

VQModulo

Modulo on which the rollover is performed. If set to 0, the rollover considers as modulo, the axis parameter Pulses of Reference.

VQMode

Operating mode: 0 = Modulo in pulses 1 = Modulo in mm 2 = Modulo in axis pulses not controlled 3 = Modulo in axis mm not controlled

RETURN VALUE The level set is returned.

M0000464

Page 161

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

FUN78 SET MODES FOR COUPLING AND UNCOUPLING TRACKING This function is only available by request. Function 78 allows setting the mode for coupling and uncoupling a tracking axis. Tracking is coupled and uncoupled using the VB that enables tracking and the operation is executed based on what was previously programmed with FUN78; the mode set remains unchanged until a new call to FUN78. At start-up, before FUN78 is called, the numerical control sets the mode for coupling and uncoupling without ramp. SYNTAX Vq = FUN78 < Num Axis > i

Index of the VQ that will contain the return value of the function

Num Axis

Number of the axis

Mode

Mode of coupling and uncoupling tracking

VqIdx

Vq index, the absolute or increment uncoupling level.

VqParIdx

First VQ index for other parameters. 1st VQ = Modulo 2nd VQ = VB index that enabled coupling in position

MODE OF UNCOUPLING TRACKING: Bits 0, 1, 2 and 3 of the mode parameter identify the mode of uncoupling tracking: 0 = Uncouple without deceleration ramp 1 = Uncouple with deceleration ramp 2 = Uncouple with ramp, setting the incremental stop level stop level = uncoupling level + increment (VQ of index VqIdx) 3 = Uncouple with ramp, setting the absolute stop level stop level = level programmed in the VQ of index VqIdx MODE OF COUPLING TRACKING: Bits 4, 5, 6 and 7 of the mode parameter identify the mode of coupling tracking: 0 = Couple without acceleration ramp 16 = Couple with acceleration ramp 48 = Couple in position with acceleration ramp AXIS OF ROTATION: Page 162

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

Bit 8 of the mode parameter indicates if the axis is the axis of rotation. This mode is only used in tracking uncoupling mode 3 and mode 48 of coupling tracking. If the 8 bit is high, the Modulo parameter (1st VQ, additional parameters) is taken into consideration and indicates the modulo of the axis of rotation. If Modulo = 0, the axis's Impulses of Reference parameter is taken into consideration.

� NOTA

The VB that enables coupling in position (2nd VQ, additional parameters) is used if tracking mode 48 is active: if the VB is TRUE, coupling in position is active; if the VB is FALSE, coupling in position is not active: in this case the active mode is 16.

RETURN VALUE: 0 1

operation executed correctly operation did not execute correctly

� NOTA

Mode 3, together with mode 48, is used for the packing function NO PRODUCT NO BAG. (See example 2).

EXAMPLES Example 1 Axis 2: coupling and uncoupling tracking with ramp. :

VQ1 = FUN78 2 17 0 0

Example 2 – (No product no bag) : : :

VQ1 = 180 VQ20 = 360 VQ21 = 3

// Stop level = 180 degrees // Slave axis modulo = 360 degrees // VB3 = enable coupling in position

:

VB3 = 0

// Disables coupling in position // Will be enabled by PLC

:

VQ0 = FUN78 2 307 1 20

// Axis 2 // Absolute stop level // Start with coupling in pos. // Axis of rotation

: : : : : :

VB361 = 0 VN285 = 1 VN325 = 1 VN277 = 1000 VN317 = 1000 VB361 = 1

// Disables axis 2 tracking // Axis 2 follows encoder 1 // Tracking mode = 1 // Tracking ratio numerator // Tracking ratio denominator // Enables axis 2 tracking M0000464

Page 163

Capitolo 8: Origini7: Parametri utensili

:

Manuale di programmazione

vel ax 1 = 50 % ax 1 to 36000

When VB361 is set to 0, the slave axis will decelerate until the level set (180 degrees). If VB3 is 0: when VB361 is set to 1, the slave axis starts with ramp and couples only at speed. If VB3 is 1: when VB361 is set to 1, the slave axis waits for the right moment to start in ramp and couple at speed and in position. Coupling in position works with the following limitations: The Master axis must be a controlled axis. The two axes must have the same Impulses of Reference and Mm of Reference parameters. The slave axis must be of rotation (bit 8, Mode parameter). The direction must be FORWARD. When the slave axis is decelerating to stop, coupling doesn't start until it is stopped.

Page 164

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

FUN 79 MODIFY THE OBJECTIVE LEVEL OF AN AXIS IN MOTION Function 79 allows changing the Objective Level of an axis in motion. SYNTAX VQ = FUN 79 < Num Axis > i

Index of the VQ that will contain the return value of the function

Num Axis

Number of the axis whose objective level is to be modified

QuoObjMm New objective level [mm] Modulo

Modulo of recirculation (for circular axes) 0 = uses the ImpRif parameter of the axis

Mode Programming mode (for circular axes) bit 2-0 (values from 0 to 7) units of measurement for Modulo (when 0): 0 = Module in pulses [imp] 1 = Modulo in millimeters [mm] bit 3-5 (values: 0, 8, 16, 24 etc.) 0 = normal axes 8 = circular axes RETURN VALUE: 0 1

operation executed correctly objective level change not executed

� NOTA

If the new objective level is not compatible with the position and speed of the axis, the level change is not executed: if the current level of the axis added to the space traveled in deceleration exceeds the objective level that you wish to set, this turns out to be incompatible. By setting the mode for circular axes, if the objective level turns out to be incompatible, it is recalculated for the next revolution. An objective level change for circular axes is only allowed for the FORWARD direction.

Example Change the objective level of axis 2; the value of the new objective level is contained in VQ50. :

AX 2 to 10000 SKIP WAIT AX 2 M0000464

Page 165

Capitolo 8: Origini7: Parametri utensili

:

VQ50 = 625

:

VQ1 = FUN 79 2 VQ50 0

Page 166

Manuale di programmazione

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

FUN 80 MODIFY AXIS POSITION WITH AXIS IN MOTION Function 80 allows activating a level change of an axis upon the arrival of an external interrupt. The functioning described is valid beginning from NC firmware Ver. 3.65e. The decimal part of NUM_ASSE and RICHIESTA_CAMBIO_QUO_OBJ is available beginning from firmware version 4.37. N.B. The function can also be used for axes controlled through the CANopen protocol, but before the call it is necessary to define the management variables (IRQ count VN + IRQenabling VB), using FUN 72 (Firmware Ver. 5.03 and higher). SYNTAX VQ = FUN 80 i Index of the VQ that will contain the return value of the function Num Axis: The whole part is the number of the axis whose level you wish to set The decimal part is the minimum time, in msec, between one IRQ and the next: if two IRQs arrive within the time set, only the first is taken into consideration and the second is discarded. Num IRQ: The whole part [1-4] is the channel number of the encoder whose zero notch is being used. The decimal part, if other than 0, is the index of the VQ where the level of the axis at the moment of the interrupt is stored. In the event that you wish to use the function for an axis controlled through the CANopen protocol, the whole part of the Num IRQ parameter must be set to 0. New level: New level to be set for the axis upon the arrival of the interrupt. Request Change Obj Lev: The whole part [0-1] allows changing the objective level (0: it does not change the objective level; 1: the level of the axis at the moment of the interrupt is subtracted from the objective level). The decimal part, if other than 0, is the index of the VN that is increased by 1 for each IRQ that is too close. RETURN VALUE 1 2 3

operation executed correctly error axis not CANopen type and Num IRQ = 0 encoder error associated with CANopen axis not CANopen type and Num IRQ = 0

M0000464

Page 167

Capitolo 8: Origini7: Parametri utensili

� NOTA

Manuale di programmazione

: it is necessary to enable the generation of the interrupt through the standard VBs: � � � �

VB352 VB353 VB354 VB355

IRQ1 – zero notch of encoder 1 IRQ2 – zero notch of encoder 2 IRQ3 – zero notch of encoder 3 IRQ4 – zero notch of encoder 4

At each interrupt, the relative interrupt count VN is incremented: � � � �

VN268 VN269 VN270 VN271

Interrupt counter IRQ1 Interrupt counter IRQ2 Interrupt counter IRQ3 Interrupt counter IRQ4

Example 1 Upon the arrival of an interrupt on the zero notch of encoder 2 of axis 3, the level is set to 0 and the objective level is not changed. VQ1 = FUN 80 3 2 0 0 Example 2 Upon the arrival of an interrupt on the zero notch of encoder 2 of axis 3, the level is set to 150 and the objective level is not changed. VQ1 = FUN 80 3 2 150 0 Example 3 Upon the arrival of an interrupt on the zero notch of encoder 2 of axis 3, the level is set to 235 and the objective level is modified by removing or adding the delta between the arrival position of the interrupt and the new position. VQ1 = FUN 80 3 2 235 1

Page 168

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

FUN 81 RESET IN AUTOMATIC CYCLE Function 81 allows resetting an axis during the automatic cycle: upon the arrival of the first zero notch of the encoder associated to the axis, a value is set in the current level of the axis. The end of the operation is signaled through a VB. Function 81 is a “one shot” type: once the operation is finished, the function is disabled. If, while waiting for the interrupt, the automatic cycle is interrupted due to a stop or an emergency, function 81 is disabled. Function 81 is available in suitably compiled firmware beginning from version 3.75d. It is possible to reset one axis at a time. Function 81 cannot be used simultaneously with function 80. SYNTAX VQ = FUN 81 i

Index of the VQ that will contain the return value of the function VQ = 0 All OK = 1 Error: another reset is already in progress. = 2 Wrong axis number definition. = 3 Wrong VB index definition. = 4 Error: the encoder associated to the axis does not support the function (such as: absolute encoder, potentiometer, simulated encoder).

Num Axis:

Number of the axis whose level you wish to set

Level to set: New level to be set for the axis upon the arrival of the interrupt. VB Index: Upon the arrival of the interrupt, the corresponding VB is set to 1. Example 1 Upon the arrival of an interrupt on the zero notch of axis 2, the value 2500 is set in the axis position; at the end of the operation, VB27 is set to the logical value 1. : : :

VB27 = 0 VQ1 = FUN 81 2 2500 27 IF VQ1 = 0 GOTO OK

// Reset the VB at the end of the operation // VQ1 = 0 all OK

GOSUB ERRORE GOTO fine

// error management subroutine // operation terminated due to an error

:Err : :OK

M0000464

Page 169

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

VEL AX 2 = 10% AX 2 TO 10000 SKIP WAIT AX 2

// Set speed // Axis movement // Do not wait for axis at level

IF VB27 = 0 GOTO loop

// Wait for interrupt

STOP AX 2 WAIT AX 2 IN QUOTE

// Axis stop command // Wait for axes at level after stop

:loop : : :fine END

Page 170

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

FUN 82 FUNCTION OF CHANGE SPEED AT FINAL LEVEL Feature available on request. Function 82 allows changing the speed of an axis in motion: the axis arrives at the final level with the new speed set. SYNTAX VQ = FUN 82 i

Index of the VQ that will contain the return value of the function VQ = 0 All OK = 1 Wrong axis number definition. = -1 Another speed change already in progress

Num Axis:

Number of the axis [ 1, 2 … ]

Speed: New speed [%] Final level: Final level [mm] of the speed change Example 1: Single change of speed Movement of axis 1 to level 1000 mm at speed 60%; at level 500 mm the speed of the axis becomes 30%. : :

vel ax 1 = 60 % // Set speed 60% ax 1 to 1000 // Axis1 to level 1000 mm skip wait ax 1 // continue without waiting for axis at level vq0 = fun 82 1 30 500 // change speed: vel = 30 % a quota 500 mm

:L1 if ax 1 goto FINE : goto L1

// Loop wait for axis at level

:FINE end Example 1: Multiple speed change Movement of axis 1 to level 1000 mm at speed 60%; at level 500 mm the speed of the axis becomes 30%. At level 700 mm the speed of the axis becomes 90% : :

vel ax 1 = 60 % // Set speed 60% ax 1 to 1000 // Axis1 to level 1000 mm skip wait ax 1 // continue without waiting for axis at level vq0 = fun 82 1 30 500 // change speed: vel = 30 % a quota 500 mm M0000464

Page 171

Capitolo 8: Origini7: Parametri utensili

:Loop1 vq2 = pos ax 1 : if vq2 > 500 goto Step2 : goto Loop1 :Step2 vq0 = fun 82 1 90 700 :L1 if ax 1 goto FINE : goto L1

Manuale di programmazione

// Acquisition level axis 1 // check if level 500 exceeded

// change speed: vel = 90 % a quota 700 mm // Loop wait for axis at level

:FINE end

Page 172

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

FUN 104 AUTOMATIC RECOVERY QUOTA Feature available on request. The FUN104 is used in packaging systems that use films with the reference mark. A photocell detects the notch and acquires the position of the Master; this position is then compared with a reference position and then calculated the position error. The position is detected dall'interrupt reported within the range [0 - 360]. The correction, by calling the function recovery position, occurs when the master axis is "on cam" correction. The correction is accomplished by modifying the actual axis. We define the following functions: - Detecting the position of Master of Vq to interrupt (FUN 71) Activation of a digital cam which acts on VB to define the area permitted for the correction of the position of the FILM (FUN 61 and 62) SYNOPSIS Vq = FUN 104 i

the VQ index that will contain 'the return value of the function

Num Asse

Number of the axis on which the recovery occurs

Vq_Par_Idx

Index of the first VQ that contains parameters.

Indx +0 Indx +1 Indx +2 indx +3 Indx +4 Indx +5 Indx +6 Indx +7 Indx +8

1^ Vq ^ Interrupt index (from 1) 2 ^ Vq share index of the acquis. from irq [degrees] 3^ Vq index of pos setpoint. [degrees] 4 ^q Vq Pitch [mm] 5 ^ Vq index SPEED. recovery [mm / s] 6^ Vq maximum correction index [mm] 7 ^ Vb index which disables the recovery 8 ^ Vb index of "axis cam" 9^ Vq index pos. recovery calculated [mm] Vq index error [degrees] Vq index return code InitOneRecPos Vq index number of tick-blow.

Indx +9 RETURN VALUE

No return value.

M0000464

Page 173

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

FUN 106 AUTOMATIC RECOVERY QUOTA Feature available on request. The FUN106 is used in packaging systems that use films with the reference mark. A photocell detects the notch and acquires the position of the Master; this position is then compared with a reference position and then calculated the position error. The position is detected dall'interrupt reported within the range set in the 10^ of parameters The correction, by calling the function recovery position, occurs when the master axis is "on cam" correction. The correction is accomplished by modifying the actual axis. We define the following functions: - Detecting the position of Master of Vq to interrupt (FUN 71) Activation of a digital cam which acts on VB to define the area permitted for the correction of the position of the FILM (FUN 61 and 62) SYNOPSIS Vq = FUN 106 i

the VQ index that will contain 'the return value of the function

Num Asse

Number of the axis on which the recovery occurs

Vq_Par_Idx

Index of the first VQ that contains parameters.

Indx +0 Indx +1 Indx +2 indx +3 Indx +4 Indx +5 Indx +6 Indx +7 Indx +8

1^ Vq ^ Interrupt index (from 1) 2 ^ Vq share index of the acquis. from irq [degrees] 3^ Vq index of pos setpoint. [degrees] 4 ^q Vq Pitch [mm] 5 ^ Vq index SPEED. recovery [mm / s] 6^ Vq maximum correction index [mm] 7 ^ Vb index which disables the recovery 8 ^ Vb index of "axis cam" 9^ Vq index pos. recovery calculated [mm] Vq index error [degrees] Vq index return code InitOneRecPos Vq index number of tick-blow. 11^ Vq index Vq reference range of measured quota

Indx +9 Indx+10 RETURN VALUE

No return value.

Page 174

M0000464

Manuale di programmazione

� NOTA

Capitolo 8: Origini7: Parametri utensili

The FUN106 differs from FUN104 for the additional parameter INDX +10.

FUN 107 AUTOMATIC RECOVERY QUOTA Feature available on request. The FUN107 is used in packaging systems that use films with the reference mark. A photocell detects the notch and acquires the position of the Master; this position is then compared with a reference position and then calculated the position error. The correction, by calling the function recovery position, occurs when the master axis is "on cam" correction. The correction is accomplished by modifying the actual axis. From 4:44 fw version of 11.07.2003 the 'Flg_Inv_Corr parameter was introduced which allows to reverse the direction of correction. We define the following functions: - Detecting the position of Master of Vq to interrupt (FUN 71) Activation of a digital cam which acts on VB to define the area permitted for the correction of the position of the FILM (FUN 61 and 62) SYNOPSIS Vq = FUN 107 i Num Asse

the VQ index that will contain 'the return value of the function Number of the axis on which the recovery occurs

Flg_Inv_Corr

Flag of reversing the direction of correction: 0 = normal correction 1 = inverted correction

Vq_Par_Idx

Index of the first VQ that contains parameters.

Since fw version 5.05 (02/18/04) the fractional part has the meaning of the number of active parameters. If the decimal part iszero, are taken into account 10 parameters. Indx +0 Indx +1 Indx +2 indx +3 Indx +4 Indx +5 Indx +6 Indx +7

1^ Vq ^ Interrupt index (from 1) 2 ^ Vq share index of the acquis. from irq [degrees] 3^ Vq index of pos setpoint. [degrees] 4 ^q Vq Pitch [mm] 5 ^ Vq index SPEED. recovery [mm / s] 6^ Vq maximum correction index [mm] 7 ^ Vb index which disables the recovery 8 ^ Vb index of "axis cam" M0000464

Page 175

Capitolo 8: Origini7: Parametri utensili

Indx +8 Indx +9 Indx+10

Manuale di programmazione

9^ Vq index pos. recovery calculated [mm] Vq index error [degrees] Vq index return code InitOneRecPos Vq index number of tick-blow. 11^ Vq index Vq reference range of measured quota

Indx +11

12 ^ Vq Mode 'correction: (Ver.5.05) 0 = always corrects between -180 and +180 degrees = -1 Corrects errors only positive (acceleration) = -2 Corrects errors only negative (deceleration) > = 0 always corrects -360 + Val and Val

Indx +12

13 ^ Vq speed 'correction: (Ver.5.06) 0 = always with the correct speed. recovery set 1 = correct proportion with the speed. snapshot

RETURN VALUE No return value. VALUES OF RETURN: THE DEBUGGER VQ (return code InitOneRecPos) 0 Operation completed successfully. 1. Axis number not lawful. 2. Recovery already 'active (new recovery run) 3. The axis is not 'in hot pursuit 4. Recovery [imp]> 0x7fffff 5. Speed 'recovery the first containing the parameters VQ = Vq100. `Will result: Vq100 = 360 / / Step Vq101 = 0 / / Vq102 = 350 / / Package Vq103 = 90 / / Diameter Vq104 = 30 / / Zone linear after cutting Vq105 = 330 / / linear zone before cutting Vq106 = 360 / / Step Master Vq107 = 0 / / Step Master Vq108 = 0 / / Step Slave Vq109 = 1 / / Report Master / Slave linear phase Vq110 = 100 / / Start banda for Swap Vq111 = 200 / / End Banda for Swap Vq112 = 50 / / Space path from the slave output from the cutting area. Vq113 = 50 / / Space path from the slave input from the cutting area. Vq114 = 30 / / Space path from the master output from the cutting area. Vq115 = 30 / / Space path from the master input from the cutting area. VQ1 = Fun 130 1 2 100

Page 186

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

14000

12000

10000

8000 Serie1 6000

4000

2000

249

241

233

225

217

209

201

193

185

177

169

161

153

145

137

129

121

113

97

105

89

81

73

65

57

49

41

33

25

9

17

1

0

Andamento della velocita` dell slave utilizzando la funzione 130

M0000464

Page 187

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

FUN131 INITIALIZES PALLET MANAGEMENT This function is only available by request starting from Firmware version 5.18. Function 131 initializes pallet management. The standard number of pallets that can be managed is 2.

� NOTA

Pallet management functions are not available on all firmware versions.

C

3 rows

D

11

12

13

14

15

6

7

8

9

10

1

2

3

4

5

5 columns

A

B Figure 1

SYNTAX FUN131 VnIdx

Index of the first VN that contains the parameters

VnResIdx

Index of the VN that contains the outcome of the operation

Page 188

M0000464

Manuale di programmazione

VN index VnIndx VnIndx+1 VnIndx+2 VnIndx+3 VnIndx+4

Capitolo 8: Origini7: Parametri utensili

parameter pallet number [1-2] Index of first VQ with coordinates of points A, B, C and D number of ROWS [1-1000] number of COLUMNS [1-1000] Operating Mode

� NOTA

VQ index VqIndx VqIndx+1 VqIndx+2 VqIndx+3 VqIndx+4 VqIndx+5 VqIndx+6 VqIndx+7

coordinate XA YA XB YB XC YC XD YD

Operating Mode must be set to 1; it is to be used for future enhancements

The outcome code of the operation returned in the VN of the index VnResIdx: Value 10001 10002 10003 10004 10005 10006 10007

Meaning Initialization correctly executed VN index parameters wrong pallet number wrong VQ index coordinates wrong number of rows wrong number of columns wrong operating mode wrong

M0000464

Page 189

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

FUN132 CALCULATE THE COORDINATE OF A PALLET'S CURRENT POSITION This function is only available by request starting from Firmware version 5.18. Function 132 returns the coordinates of the current position of the pallet specified in the VQs (automatic sequence); the current position will be incremented. The pallet position index follows the order shown in Figure 1 of Function 131 (pallet initialization) SYNTAX FUN132 VnIdx VN index VnIndx VnIndx+1 VnResIdx Value [1 – N] 10002 10003 10004 10009 10012

Page 190

Index of the first VN that contains the parameters: parameter pallet number index first VQ with coordinates of the current position (X,Y) Index of the VN that contains the outcome of the operation Meaning position index returned VN index parameters wrong pallet number wrong VQ index coordinates wrong pallet not initialized pallet finished (last pallet position exceeded)

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

FUN133 CALCULATE THE COORDINATE OF A PALLET'S SPECIFIED POSITION This function is only available by request starting from Firmware version 5.18. Function 133 returns the coordinates of the specified position of the specified pallet. SYNTAX FUN133 VnIdx Index of the first VN that contains the parameters: VN index VnIndx VnIndx+1 VnIndx+2 VnIndx+3 VnResIdx Value [1 – N] 10002 10003 10004 10009 10010 10011

parameter pallet number index first VQ with coordinates of the requested position (X,Y) number of ROWS of the requested position [1 - NR] number of COLUMNS of the requested position [1 - NC] Index of the VN that contains the outcome of the operation Meaning position index returned (N = num. Rows * num. Columns) VN index parameters wrong pallet number wrong VQ index coordinates wrong pallet not initialized row number wrong column number wrong

M0000464

Page 191

Capitolo 8: Origini7: Parametri utensili

FUN134 A PALLET

Manuale di programmazione

RESET AUTOMATIC SEQUENCE OF

This function is only available by request starting from Firmware version 5.18. Function 134 brings a pallet's current position back to the initial position; this function is used in conjunction with Function 132. SYNTAX FUN134 VnIdx Index of the first VN that contains the parameters: VN index VnIndx VnResIdx Value 10002 10003 10009 10021

Page 192

parameter pallet number Index of the VN that contains the outcome of the operation Meaning VN index parameters wrong pallet number wrong pallet not initialized reset executed

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

FUN196 FUNCTION TO SET/RESET VB ON ZERO ENCODER NOTCH This function is only available by request. Function 196 allows enabling the set or reset (depending on the mode) of a VB when the specified encoder reaches the zero notch SYNTAX Vq = FUN196 0 i

Index of the VQ that will contain the return value of the function VQ = 0 All OK = -1 Error: there is already another wait for zero notch in progress (FUN196 has already been called and the zero notch has yet to be reached). = -2 Error encoder n. (encoder num not valid) = -3 Error VbIdx parameter (index not valid) = -4 Error: encoder doesn't support the function Valid encoders: TPU GPC XLNX = -5 Error: execution of FUN196 with Mode -1 when no wait for zero notch is pending

Num Enc

Encoder number on which the zero notch is awaited when FUN196 is launched. To determine which encoder is used, do an encoder

VB Index

VB index that is set or reset (depending on the mode)

Mode

Mode = 0 when the encoder's zero notch is reached the specified VB is reset (VB = 0) Mode = 1 when the encoder's zero notch is reached the specified VB is set (VB = 1) Mode = -1 if FUN196 was called everything is reset (waiting for zero notch is reset in the event that a wait for encoder zero notch is still pending)

test.

Example : : :

VQ31 =5 VQ32 = 5 VQ33 = 1

// encoder 5 on which encoder zero notch is awaited // VB5 that is set upon reaching zero notch // set VB5

:

VQ30 = FUN 196 VQ31 VQ32 VQ33 0

//

After the execution of the above instructions, the NC waits until the zero notch of encoder 5 is reached. Upon reaching the zero notch of this encoder (5), the VB is set to 1.

M0000464

Page 193

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

FUN 200 INITIALIZATION RESET ENCODER THROUGH ZERO NOTCH Function 200 activates the setting of the Zero Encoder value in the encoder of the axis specified at each interrupt generated by the zero notch of the specified encoder.

� NOTA

this function can only be used for uncontrolled axes, i.e., for axes of which only the encoder is read

SYNTAX VQ = FUN 200 < Num Axis > 0 i

Index of the VQ that will contain the return value of the function

Num IRQ

[1-4] Channel number of the interrupt input whose zero notch is being

Num Axis

Number of the axis whose level is to be reset (the level of the Zero Encoder of the axis parameters will be set)

used.

RETURN VALUE: 0

operation executed correctly

� NOTA

it is necessary to enable the generation of the interrupt through the standard VBs: � � � �

VB352 VB353 VB354 VB355

IRQ1 – zero notch of encoder 1 IRQ2 – zero notch of encoder 2 IRQ3 – zero notch of encoder 3 IRQ4 – zero notch of encoder 4

At each interrupt, the relative interrupt count VN is incremented: VN268 Interrupt counter IRQ1 VN269 Interrupt counter IRQ2 � VN270 Interrupt counter IRQ3 VN271Interrupt counter IRQ4 � �

Example 1 Enabling the level reset of axis 1 on the interrupt of the zero notch of encoder 2; :

VQ1 = FUN 200 2 1 0

Page 194

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

FUN 216 CALCULATION COORDINATES FOR LEANING MOVEMENT 3 AXES Function 216 calculates the target level for an interpolated movement of the 3 axes X, Y and Z with verification of the sofware End of Travel for the axes. The target level are calculated by applying the move along the coordinate with the direction starting from the current level of the axes (if the parameter Mode is 0) or from the levels contained in the VQ specified by the parameter (if the parameter Mode is 0.001 or 0.002). The calculated target levels will be returned in VQ specified by parameter so any initial level are overwritten. NOTE: For the verification of End of Travels and the recalculation of the target level is necessary that all 3 axes (X, Y and Z) have the End of Travels software active. NOTE: It’s necessary that leaning movement is already activated by FUN 116 of PLC. SYNTAX Vq = FUN 216 i

Index of the VQ that will contain the return value of the function

Dir

Direction of movement Dir -1 1

Coord

Direction of movement BACK FORWARD

Coordinate of movement Coord 1 2 3

� NOTE

Coordinate of movement X Y Z

The coordinate movement is considered in the reference system of the tool coordinates – see the documentation of the function WPlc FUN116.

The decimal part of the parameter Coord is the parameter Mode with the following meanings: Mode 0.000 0.001 0.002

Acquisition axes level Captures the current axis level Absolute axes level contained in VQ Axes level with current origin contained in the VQ M0000464

Page 195

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

CorsaMm

Race desired, if the race specified is excessive as would exceed some software End of Travel, is automatically reduced

VqIndx

index of the first of 3 consecutive VQ with the target level of the axes X, Y e Z; calculated so as not to exceed End of Travel software NOTE: the levels calculated are with ORIGIN (current origin)

RETURN VALUE: Vq 0 1 2 3 4 5 6

Description Calculation executed respecting the race specified Levels recalculated to respect the software End of Travel Movement null because of software End of Travel Management not initialized (FUN116 PLC not executed) Coordinated wrong (parameter ) Function call with axes on the move Parameter wrong

EXAMPLES EXAMPLE 1 // // // // // // :

The angles of rotation Alpha and Beta are acquired depending on the mode specified in the initialization of the FUN116 PLC Dir = 1 = FORWARD, Coord = 1 = X, Race = 500 mm coord calculated on VQ31 (axe 1), VQ32 (axe 2) and VQ33 (axe 3) compared with the current position of the axes (parameter Mode = 0) VQ10 = FUN 216 1 1 500 31

:

IF VQ10 > 1 GOTO FINE

:

G1 X VQ31 Y VQ32 // interpolated movement to levels calculated

:FINE end

EXAMPLE 2 // coord calculated on VQ31 (axe 1), VQ32 (axe 2) and VQ33 (axe 3) : VQ10 = FUN 216 1 1 500 31 :

VQ41 = VQ31 VQ42 = VQ32 VQ43 = VQ33

// Calculates the drop in Z of 60 mm respect to the levels calculated // from the previous call of FUN 216 // coord calculated on VQ41 (axe 1), VQ42 (axe 2) and VQ43 (axe 3)

:

VQ11 = FUN 216

Page 196

-1

3.002

60

M0000464

41

Manuale di programmazione

FUN 251

Capitolo 8: Origini7: Parametri utensili

MODIFY FIRMWARE PARAMETERS

Function 251 allows setting the value of several internal firmware values that modify the behavior of several functions. SYNTAX VQ = FUN 251 < ValQ > 0 0 i

Index of the VQ that will contain the return value of the function

ParIndx index of the firmware parameter to modify ValQ

value to set in the parameter (constant or VQ)

RETURN VALUE: 0 operation executed correctly 1 error (parameter not managed or wrong value) The same function is also accessible from ISO language programs with the following syntax: M801 P= INDICES OF THE FIRMWARE PARAMETERS MANAGED Index 10 20 25

Description sets the code of the linear function selects the axis of reference for the speed value enables the verification of the additional axes

Value 2/3 0/NumAxes 0/1

Ver: 5.12 5.12 5.12

The default value is highlighted in bold. PARAMETER DESCRIPTION PARAMETER 10 In NC instructions of type LINEx, setting the parameter to 3 activates the execution of synchronized movements (i.e., with the simultaneous departure and arrival of the axes involved in the movement) in axis coordinates with connection of adjacent movements. If the connection is not applicable because, for example, the section is too short or the speed too high, a stop is forced on the point.

� NOTA

Coordinated movements are only available with specific firmware.

M0000464

Page 197

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

PARAMETER 20 When connected movements are active (see parameter 10), the speed of executing movements is calculated so as not to exceed the speed percentage set on the axes involved in the movement and this can lead to accelerations or decelerations between one movement and another to adapt the resulting speed; when the number of one specific axis is set in the parameter, the speed is calculated only on the basis of the speed percentage set on that axis. PARAMETER 25 In G1/G2/G3 type interpolations, it enables the verification of the acceleration of the added axes (i.e., the axes that do not belong to the main interpolation group); if the acceleration applied exceeds that of the axis, a recalculation is performed to make it compatible. Setting the value 0 in the parameter disables verification (default).

Page 198

M0000464

Manuale di programmazione

FUN 255 PROGRAM

Capitolo 8: Origini7: Parametri utensili

RUN FUNCTION WPLC FROM NC

Function 255 allows you to run functions WPlc (plc type “windows”) from a program NC. SYNTAX Vq = FUN 255 < Par1 > < Par2 > 0 i

Index of the VQ that will contain the return value of the function

FunIndx

Index of the Wplc function to run

Par1

first parameter of the Wplc function (constant or VQ)

Par2

second parameter of the Wplc function (constant or VQ)

NOTE: it’s used the integer value of the parameters Par1 and Par2 RETURN VALUE: 0 1

operation executed correctly Wplc function not present

EXAMPLE: Vq3 = FUN 255 128 31 30 0 Run the Wplc function FUN128 with parameters 31 and 30.

M0000464

Page 199

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

Loops To manage loops, we can make recourse to conditional instructions that test the input or outpout condition of the loop, such as, for example, if a certain input is high, if an axis is in position, etc. In this case, the loop can be set in two distinct ways depending on whether you want to enter the loop at least once and test the condition at the end or if you want to test the condition at the beginning and then, in the case of failure, never enter the loop (what in many programming languages are called DO - UNTIL and WHILE - DO loops). The opportunity of using one or the other method is dictated by the needs of the specific problem. Let's look at the appearance of a loop in the two cases: 1)

DO-UNTIL LOOP

(Enters the loop at least once)

:Loop : : : :

VQ5 = POS AX 1 //Assigns the axis 1 position to VQ5 .. .. //Body of the loop .. IF VQ5 < 300 GOTO Loop //As long as axis 1 doesn't exceed position 300, //it returns to the step indicated by the Loop label

:

..

2)

WHILE-DO LOOP

//Continuation of the program (Verify the condition before entering)

:Start

IF IN 2 GOTO Loop

: : : :

.. .. .. GOTO Start

:Loop

..

//So long as input 2 is not high, it repeats //otherwise, it jumps to the step indicated // by the loop label //Body of the loop //Returns to the step indicated by Start //to repeat the loop //Continuation of the program

In the list of instructions, there are also 20 FOR's and 21 NEXT's that allow managing a loop in which the number of times that the loop must be repeated is known. In practice, all the instructions between a FOR and NEXT are repeated n times. The use of this type of cycle is not available in programming on the PC. However, it is also discouraged when programming from the keyboard.

Page 200

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

Management of variables The Numeric Variables (VN) allow the management of whole numbers such as, for example, indexes of loops and numbers of inputs and outputs. They occupy 2 Bytes. The Position Variables (VQ) manage numbers with 3 decimal places and are used for the positioning positions of the axes and the setting of movement speeds. They occupy 4 Bytes. The Binary Variables (VB) can only assume values of 0 and 1 and, in view of their nature, they lend themselves well to managing the truthfullnes, or lack, of a determined condition and can, therefore, be used to access loops or not. They occupy 1 Bytes. The Binary Variables (from 101 to 255) can be associated to alarms and are, therefore, useful in the case that you want to set a precise alarm in correspondence to the verification of a certain action. Usually, variables of all types are zeroed upon powering-up the machine but, if the program is launched afer the execution of others, it is not know what value they may have assumed and, so, it is the programmer's responsibility to initialize them to the correct value for the specific application. The exeception are the battery buffered variables (retentive), which allow preserving their value even when the machine is powered-off. For a complete summary of all the variables, see the chapter Variables. Except in a few cases, the instruction parameters can be specified as constants or variables. Per example the instruction: AX 1 TO 100.000 positions axis 1 to position 100.000 mm, while: AX 1 TO VQ35 positions axis 1 to the position contained in the VQ of index 35; thus, the instructions: VQ35 = 100.000 AX 1 TO VQ35 produce the same effect as the instruction: AX 1 TO 100.000 N.B.: In the Instruction list all the values that can be recalled by variables are indicated as ValB, ValN and ValQ. In programming from the keyboard, at the time of setting a variable, you press the key sequence [SHIFT] + [VAR] and VQ0, VN0 or VB0 will automatically appear, depending on the type of instructions requested. Thus, one can set the number of the desired variable.

M0000464

Page 201

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

Examples of operations on variables with instructions Below, we provide several examples of the use of instructions for the management of variables. VQ72 = 45.520 VQ80 = VQ72 VQ72 = 45.520 + 12.200

Assigns the value 45.52 to VQ number 72. Assigns the value contained in VQ number 72 to VQ number 80. Performs the sum 45.520 + 12.200 and assigns the result to VQ number 72.

The two parameters of the addition or subtraction instructioins can be variables (as previously said); it is therefore possible to write: VQ72 = VQ80 + 12.200 VQ72 = 45.520 + VQ80 VQ72 = VQ80 + VQ53 VQ72 = VQ80 - 34.600 To increase the value of a variable, it is possible to write: VQ72 = VQ72 + 1 These rules are also valid for instructions operating on VNs: SET VN32 = 45 Assigns the value 45 to VN32. Similarly, for addition and subtraction operations, you could have: VN32 = 45 + 22 VN32 = VN25 + 2 VN32 = VN25 + VN40 VN32 = 45 - 22 VN32 = VN25 - 18 VN32 = VN25 - VN40 And to increase or decrease the value of a variable, it is possible to write: VN32 = VN32 + 1 VN32 = VN32 - 1 N.B: It is not possible to assign values with decimal places to VNs. It is not possible to perform addition and subtraction of mixed variables (i.e., VQs and VNs in the same instruction).

Conditional instructions with variables Instructions are available that perform a jump to the step or program specified conditioned by the value contained in a variable: IF VN32 < 5 GOTO 12

If the value contained in VN 32 is less than 5, jump to step 12.

IF VN32 < VN40 GOSUB 14 If the value contained in VN 32 is less than the value of VN 40, jump to program 14, it executes it, so execution resumes from the step following the one that contains the conditional instruction.

Page 202

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

Tracking management Tracking consists in forcing the impulses of the slave axis (encoder impulses × 4) in relation to the impulses of a master axis. In other words, the impulses of the slave must be equal to those of the master, multiplied by a constant called Tracking factor. In practice, we have: Slave impulses = Master impulses × Tracking factor N.B.: when an axis is enabled or disabled for tracking an axis in motion, it performs starts and stops with a ramp.

Variables for managing tracking VB360 VB361 VB362 VB363

Enables axis 1 for tracking Enables axis 2 for tracking Enables axis 3 for tracking Enables axis 4 for tracking

VN276

Mode 0 Mode 1 and 4 Mode 2 and 3 Mode 0 Mode 1 and 4 Mode 2 and 3 Mode 0 Mode 1 and 4 Mode 2 and 3 Mode 0 Mode 1 and 4 Mode 2 and 3

VN277

VN278

VN279

: axis 1 tracking factor × 1000 : axis 1 numerator tracking factor : not used : axis 2 tracking factor × 1000 : axis 2 numerator tracking factor : not used : axis 3 tracking factor × 1000 : axis 3 numerator tracking factor : not used : axis 4 tracking factor × 1000 : axis 4 numerator tracking factor : not used

VN284 VN285 VN286 VN287

axis 1 tracking encoder number axis 2 tracking encoder number axis 3 tracking encoder number axis 4 tracking encoder number

VN316

Mode 0, 2 and 3 : not used Mode 1 and 4 : axis 1 denominator tracking factor Mode 0, 2 and 3 : not used Mode 1 and 4 : axis 2 denominator tracking factor Mode 0, 2 and 3 : not used Mode 1 and 4 : axis 3 denominator tracking factor Mode 0, 2 and 3 : not used Mode 1 and 4 : axis 4 denominator tracking factor

VN317 VN318 VN319 VN324 VN325 VN326 VN327

Axis 1: tracking mode [from 0 to 4] Axis 2: tracking mode [from 0 to 4] Axis 3: tracking mode [from 0 to 4] Axis 4: tracking mode [from 0 to 4] M0000464

Page 203

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

Tracking mode 0 Mode 0 is selected by setting VN324 to VN327 to 0. VN276 to VN283 assume the meaning of Tracking factor to 3 fixed decimal places (Tracking factor × 1000). N.B.: It is possible to vary the tracking ratio, even with axes in motion.

Tracking mode 1 Mode 1 is selected by setting VN324 to VN331 to 1. The tracking factor is set in the form of numerator/denominator (32-bit value and, thus, more precise with respect to mode 0). The numerator, in whole number format, is set in VN276 to VN283. The denominator, in whole number format, is set in VN316 to VN323. N.B.: With axes in movement, it is possible to vary only the numerator of the tracking ratio; if the denominator is changed, the Slave axis could lose synchronism with the Master axis. If the denominator is set to 0, the control does not execute the division: it is as if you set denominator = 1. Desired slave impulses Slave impulses = Master impulses ×———————————— Master impulses of reference

Tracking mode 2 Mode 2 is personalized.

Tracking mode 3 Mode 3 allows the management of Twin Axes.

Tracking mode 4 Mode 4 is called thread guide. It uses the VBs and VNs from mode 1 (NUM/DEN). In addition, a VB and two VQs have been introduced with the following meaning: VB91 - Flag of axis 1 movement reversal (1 = movement reversed) VB92 - Flag of axis 2 movement reversal (1 = movement reversed) ................................. VQ191 - forward reversal position axis 1 [mm] VQ192 - backward reversal position axis 1 [mm] VQ193 - forward reversal position axis 2 [mm] VQ194 - backward reversal position axis 2 [mm] ...............................

Tracking mode 5 Mode 5 is similar to mode 4 but with feed forward calculated as encoder position difference. N.B. Available beginning from firmware version 3.77a with library version 2.24

Page 204

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

Tracking mode 6 Mode 6 is similar to mode 0, but does not add the contribution of Feed Forward.

Tracking mode 7 Mode 7 is similar to mode 1, but does not add the contribution of Feed Forward.

Tracking mode 8 Mode 8 is similar to mode 0, but Feed Forward is always calculated as if the encoder to track was not associated to an axis.

Tracking mode 9 Mode 9 is similar to mode 1, but Feed Forward is always calculated as if the encoder to track was not associated to an axis.

Tracking mode 10 Mode 9 is similar to mode 1, but the tracking works following the teoric position of the MASTER (only for real axis) and not the real one.

Tracking modes 12 and 13 The tracking modes 12 and 13 are similar to the tracking modes 14 and 15 of the winding machine. The inversion follows the following rules: - If the Slave it is outside from the thresholds then the axes is forced to return inside the thresholds, whether the master turns clockwise or counterclockwise sense. - If the Slave it is inside of the thresholds and, because of the motion of the master, its new quote is calculated outside from the thresholds, then it is inverted the direction and ricalculates the new quote taking into account than the inversion takes place precisely to the threshold. It is confronted besides that the new threshold is not different from the precedent more of the delta position of the Slave.

Tracking modes 14 and 15 The tracking modes 14 and 15 are similar to the modes 4 and 5, but do not do the control of the threshold emergency. The management of the inversion was completely remaked. NOTE: If the tracking is enabled and the Slave axes has an outside position to the flange, the motion is always towards the nearly flange, independently from the direction of the master.

Tracking mode 101 (available from version 5.31 of 3 March 2006) Mode 101 is selected by setting VN324 to VN331 to 101. M0000464

Page 205

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

The tracking factor is set in numerator/denominator form (32-bit values) The numerator is a whole number set in a VQ whose index must be set in VN276 to VN283. The denominator is a whole number set in a VQ whose index must be set in VN316 to VN323. Note: With axes in movement, it is only possible to vary the numerator of the tracking ratio; if the denominator is changed, the Slave axis could lose synchronism with the Master axis. If the denominator is set to 0, the control does not execute the division: it is as if the denominator were set = 1. Desired slave impulses Slave impulses = Master impulses ×———————————— Master impulses of reference

Tracking modes 104, 105, 112, 113, 114 and 115 The tracking modes 104, 105, 112, 113, 114 and 115 are similar to the modes 4, 5, 12, 13, 14 and 15 but are using VQ instead VN for nominator and denominator.

Tracking modes 107 and 109 The tracking modes 107 and 109 are similar to the modes 7 and 9 but are using VQ instead VN for nominator and denominator.

Page 206

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

Resetting for Twin Axes When you use twin axes, you must provide for resetting of axes following very precise procedures. Below, we list the sets and settings to make for resetting in modes: • •

A) Resetting without recovery of the position B) Resetting with recovery of the position

A) Settings: Parameter Resetting direction Type of tracking Encoder zero Reference mm Reference Imp

Master 0-1 ------Equal Equal Equal

Slave 3 3 Equal Equal Equal

Steps: •

Perform the resetting of the master axis: the slave axis is automatically zeroed

B) Settings: Parameter Resetting direction Home position Reference mm Reference Imp

Master Equal Equal Equal Equal

Slave Equal Equal Equal Equal

Steps: • • • • • •

At the beginning of resetting, set the VB of the zeroed slave axis to 0 Set the tracking mode for the slave axis to 0 with tracking factor 1:1 Zero the master Disable the tracking of the slave axis Zero the slave axis When the axes are zeroed, enable tracking mode 3 for the slave axis

N.B. During the resetting of the slave axis, you can place the master axis to track the slave with tracking factor 1:1 and tracking mode 0.

M0000464

Page 207

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

Barcode management The Numerical Control manages reading barcodes if it is enabled in the firmware. The elements to manage for the correct use of barcodes are: • •

A) Numeric Variables VN390 and VN391 B) A user program

A) Variables VN390 and VN391 have the following meaning: • •

VN390 indicates the user program to use (User program number) and any errors during the initialization phase VN391 indicates the serial port used in the initialization phase and the status of the reading of the string in the barcode operation phase.

N.B. For further explanations of VN390 and VN391, see the chapter explaining Variables in this manual. B) The user program has the task of specifying which characters of the barcode string it is interested in and how these characters are used. . The maximum anticipated length is 60 characters, of which the last two characters must be '\r' '\n' (carriage return - 13 and line feed (10). The base matrix of the user program has a fixed structure. In fact, it must consist of 4 consecutive VNs. Example: #prog 7000 #name Base Barcode Matrix #include "Defvar.h" :Start VN70 VN71 VN72 VN73 :End End

=0 =0 =0 =0

The user program must be created with this base matrix. Once the user program is created, you go on to adding steps. The user program can have a maximum of 20 steps. Following the structure of the base matrix, each step must contain the following information: VN First VN Second VN Third VN Fourth VN Page 208

Meaning Specifies the index of the first character of the string read from the barcode (from 0) Specifies the number of characters to take Specifies the destination variable type Specifies the index of the destination M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

variable So, each step of the user program indicates which characters of the string coming from the barcode are considered (the information of the first two VNs of the step) and how to use these characters (the information of the last two VNs of the step). The third VN indicates the type of destination variable depending on this coding: Third VN Value 1 2 3 20

Destination variable Position Variable (VQ) Numeric Variable (VN) Binary Variable (VB) Alphanumeric Variable (VA)

In the case in which the destination variable is a: • VA the part of the string read is copied unaltered • VN or VQ the part of the string is converted and copied (in the case of a VQ, the value copied is in the standard 3 decimal format) • VB it assumes the value 0 if the characteri indicated as the first character is ‘0’ ( 0 ASCII), !0 in all other cases. Example: The barcode reads a string of 30 characters. Of these 30 characters, we are interested in the 5 characters starting from the 4th character placed in VQ100 and the 6 characters starting from the 15th character placed in VA10. So, the program will consist of two steps: • First step with VNs with the following values:



VN First VN

Value 3

Second VN

5

Third VN Fourth VN

1 100

Comment The numbering of the characters of the string starts from 0. So, if I want to read from the 4th character, I must put 3 The number of consecutive characters read is 5 The destination variable is a VQ The index of the VQ is 100

Second step with VNs with the following values: VN First VN

Value 14

Second VN

6

Third VN Fourth VN

20 10

Comment The numbering of the characters of the string starts from 0. So, if i want to read from the 15th character, I must put 14 The number of consecutive characters read is 6 The destination variable is a VN The index of the VQ is 10

After the creation of the user program, we must prepare the numeric control for managing the barcode. We must, therefore, initialize the NC using VN390 and VN391. The initialization procedure is the following: M0000464

Page 209

Capitolo 8: Origini7: Parametri utensili

• •

Manuale di programmazione

In VN391 enter the number that specifies the serial (COM) port of the NC used by the barcode. In VN390, enter the number of the user program used for the interpretation of the string coming from the barcode (user program whose creation was explained above)

If the initialization is successful, VN391 assumes the value 8192. From this moment on, every time that a string is read, this information is used with the barcode and VN391 provides information on the status of the management of the barcode. Each string read is managed on the basis of the information given by the user program. N.B. For further explanations of VN390 and VN391, see the chapter explaining Variables in this manual.

Page 210

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

Dedicated password management On all the instruments from firmware version 4.18 on, it is possible to define a personalized password to access all the menus/functions of the control, which it is necessary to type for accessing it. In addition, this function is only available in firmware in which user program management is enabled and must be activated by the following VB: • • •

VB 424 for firmware up to 8 axes. VB 468 for firmware up to 12 axes. VB 534 for firmware up to 18 axes.

If these conditions are not satisfied, the old password management continues in effect (456258). In the case in which all the requirements are satisfied for defining a new password, you must execute the following procedure: Two programs must be created, 1 matrix program number 9880 and 1 user program 9881, in which a VA is defined whose value will be the new password. N.B. The password can only consist of numeric characters. To create these two programs, it is possible to use SiaxED version 2.0.5 or higher. In this case, it will be necessary to go to tools on the Siax pull-down menu and select Password CN,

at this point, the following notice will appear on the screen:

M0000464

Page 211

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

After reading the notice, click OK; at this point a window will appear in which it will be possible to type the desired password (N.B. the program does not accept non-numeric characters)

After typing the password, click on the Send key or press Enter and the files will be created with the desired password. At this point, it will be sufficient to send the files to the control and the new password will be active. In the case in which all the conditions for password management are active on the numerical control (User programs enabled, version equal to, or higher than, 4.18 and enabling VB TRUE), but the programs are not present for defining the password when you attempt to access the functions of the control limited by password, the words will appear, password not enabled press a key and access will remain inhibited. If you wish to create the management programs manually, it will be necessary to respect the following conditions; 1. The user program must contain 1 single variable and this must be a VA, 2. The password, the value of the VA, must consist of only numeric characters.

Page 212

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

NC – Operating in Single State Firmware versions compiled in mode MULTITASKING = 4 (compilation mode available from firmware version 4.33 on) can work with the NC in Single State; in this state, the NC can execute all the principal operations that normally require a passage to several states. The enbling of SINGLE STATE occurs by setting VB433 to 1 The condition of the NC in SINGLE STATE is signaled by VB283 and by bit 1 of VN401. SINGLE STATE has a series of dedicated variables (VBs and VNs), listed below, for the enabling of operations that are different from those normally used; for example, to command the execution of an NC program, you normally set the NC in AUTOMATIC (after having zeroed the axes), you select the program to execute from the keyboard or by means of VN257 and VB265 and you order START by means of VB256; in SINGLE STATE an NC program can be executed (activated) even if the axes have NOT been zeroed; it is, therefore, the programmer's responsibility to inhibit the activation of those programs that require the resetting of the axes before this operation has been executed; the number of the program to be executed must be written in VN402 and VB428 executes the START; the NC provides for resetting VB428 after executing the START. In SINGLE STATE no standard displays are performed; only the user pages are displayed, even as regards the state of EMERGENCY; it is thus the programmers's responsibility to insert all the pages and information necessary to understanding the state and situation of the NC.

VBs and VNs for managing the SINGLE STATE The following table shows the VBs and VNs that are used in managing the SINGLE STATE. VARIABILE NAME

Index

VB_RESET_EMERG VB_INIT_ERR_MAIN VB_OM_EXIT VB_OM_START_AUTO VB_OM_START_TEST VB_OM_START_TSTVEL VB_OM_START_SEMI VB_OM_START_ZERO VB_OMNI_MODE VB_OM_DIS_MAN VB_OM_DIS_PAGE_STATE

VB425# VB426 VB427 VB428 VB429 VB430 VB431 VB432 VB433 VB434 VB435

VB_OM_INIT_QUOTE VN_STD_STATE_NUM VN_OMNI_OPER VN_OM_PRG_NUM VN_OM_TSTVEL_AX_NUM

VB436 VN400 VN401 VN402 VN403

Auto reset * * * * * *

*

Meaning Emergency Reset Initialization (with Main error) exits from Single State (if VB433 = 0) START Automatic cycle goes to TEST state enables axis Speed Test START semi-automatic START zero axes enables Single State disables jog (if no job active) disables change page on NC change state initializes objective position current state of NC program operations in progress in Single State program number to execute num. axes to execute speed test

#

Variable that has an effect even in normal functioning of the NC (functioning in standard states). If there is an asterisk (*) in the auto reset box, it means that the variable is automatically reset after its use by the firmware. All the VBs and VNs in the table are explained in the chapter VARIABLES M0000464

Page 213

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

Automatic Cycle To execute an NC program in Single State it is necessary to set the number of the program to be executed (main program) in VN402 and set VB428 to 1. As in traditional operation, the condition of "automatic cycle in execution" (RUN) is signaled by VB261 while execution is stopped by setting VB257 to 1 (VB_STOP).

� NOTA

to restart from program step 1 or each time that the number of the main program is changed in VN402, it is necessary to set VB395 to 1 (VB_PRG_RESET)

Manual Movement (JOG) The same JOG+ and JOG- variables are used as in the Multiple Manual state; when the JOG+ VB is active, the corresponding axis is moved in a positive direction until the VB returns to 0 or until the software travel limit is reached; the same is true for movement in a negative direction (JOG-). If more than one JOG variable are simultaneously active relative to different axes, all the corresponding axes will be moved (Multiple Manual Movement). Below, we list the variables dedicated to manual movement.

Axis 1 2 3 4 5 6 7 8

JOG+ VB296 VB297 VB298 VB299 VB300 VB301 VB302 VB303

JOGVB336 VB337 VB338 VB339 VB340 VB341 VB342 VB343

Speed Test To execute the axis speed test you must enable VB430 (VB_OM_START_TSTVEL); when VN403 contains a valid axis number, the speed test for the specified axis begins; at the end of the test, VN403 is returned to 0; to return to normal operation, set VB430 to 0.

Page 214

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

NC Master Protocol Note: “NC Master” protocol is available only on some firmware versions. It is possible to enable a communications port of the NC so that it operates in "Master" mode; usually the NC's communication ports operate in "Slave" mode, i.e., they receive commands from a master and provide responses; in "Master" mode, it is the NC that ends commands to read and write variables and receives responses fromthe NC's "slave." The "NC Master" protocol is managed with 3 VNs, always in the following order: In the initialization phase, it is necessary to specify the communications port that you wish to use in VN_CN_MASTER_STATO (VN394): VALUE 1 2 3

SERIAL PORT USED COM1 COM2 COM3 (IF ENABLED)

The correct initialization is signaled (when you insert the program number VN393) by the value 0x2000 (8192) + the Comand Number that will be exchanged between Master and Slave in VN_CN_MASTER_STATO. VN_DATA_CN_MASTER_NUM (VN393) specifies the data program number that manages the sending of commands by the NC Master. The steps must contain the following information, in the order: Variable Type VN VN

Name CnId Rw

VN

TypeVar

VN VN VN

VarIndx NumVar Reserved

Meaning NC Slave identifier (0 = do not consider) Operation Value Write 0 (from Master to Slave) Read 1 Type of variable to Valore Read/Write Binary (vb) 1 Numerical (vn) 2 Quote (vq) 3 Index of the first variable Number of variables to Read/Write { 1 - 8 } set to 0

M0000464

Page 215

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

In the case of error, the following codes are returned:

Command error codes set in VN393 (VN_DATA_CN_MASTER_NUM) Below, we provide a table of the values that VN393 can assume during the use of the NC Master Protocol. VALUE -1 -2 -3 -4 -101-i -151-i -201-i -251-i -301 -302

MEANING Data program number not valid (> 9999) Data program not present Is not a data program COM specified in VN_CN_MASTER_STATO (VN394) not valid Index variable error in step Unexpected variable type in step Wrong number of errors in step Wrong NC Identifier in step N.B. the NC idenifier must be other than 0 for all commands or equal to 0 for all commands Max number of anticipated controls exceeded (MAX_CN_CMD) Size of command buffer exceeded (BUF_CMD_SIZE)

Status codes set in VN394 (VN_CN_MASTER_STATO) Below, we provide a table of the values that VN393 can assume during the use of the NC Master Protocol. VALUE 0x2000+NumCmd 0x4000 -( 1 + (IdCn * 256) ) -( 2 + (IdCn * 256) ) -( 3 + (IdCn * 256) )

MEANING Initialization correctly executed The serial port is released and management disabled conversation timeout with NC IdCn Tx checksum error Rx checksum error

Returning the value of VN_DATA_CN_MASTER_NUM to 0, management is disabled and the serial port is released (standard protocol is restored); this situation is signaled by the value 0x4000 (16384) in VN_CN_MASTER_STATO (VN394). VN_CN_MASTER_NUM_SENT (VN395) contains the number of packets successfully transmitted (send request + return response). In the case of communication problems, the timeout is reported in VN_CN_MASTER_STATO (VN394), then transmission resumes and, if necessary, the timeout code is written again. It is, thus, possible, upon detecting the timeout condition, to increase a counter and zero VN_CN_MASTER_STATO to verify the number of failed transmissions.

Page 216

M0000464

Manuale di programmazione

� NOTE

Capitolo 8: Origini7: Parametri utensili

From firmware version 5.50 is possible to execute the change of user program run time, without disable the protocol, simply changing first the number of the serial port to use in the VN_CN_MASTER_STATO (VN394) and after that, the number of the program in the VN_DATA_CN_MASTER_NUM (VN393). The result of the operation is written, also in this case, in the VN_CN_MASTER_STATO. The firmware deals to terminate all the commands related to the initial program before exchanging data required by the new program.

NC-MASTER PROTOCOL with MULTI-CN The NC-MASTER protocol allows to the main NC, defined “Master” , to exchange variable with one or more NC, defined “Slave”. For the firmware versions before 5.69 in the case of connection with multiple Nc slave (multinc) it is necessary to use the COM1 of Nc Slave as it is the only port planned for the multi-point communication. The other communication ports ignore the command selection of the nc active; this allows single-point connection, for example debugging purposes or maintenance, even while is active multi-cn connection on port com1. A Slave Nc, connected via a port other than com1, always respond to commands of the master regardless of Nc active at that time thus creating conflict in the case of multi-cn.

ENTER INDIVIDUAL COMMANDS The functionality of individual commands is activated from firmware version 5.64 of 24.01.2008. During the scan cyclic exchange variables between master and slave it’s possible to enter protocol commands that run only once and with the highest priority. The individual commands are activated with FUN120 of WPLC. Syntax FUN120: FUN120 CmdVnIdx index of first VN that contains the parameters of command: VN Index VnIdx VnIdx+1 VnIdx+2 VnIdx+3

Parameter CnId = address of CN ( 0 = not consider the address) CmdCode = command code CmdPar1 = parameter 1 of the command CmdPar2 = parameter 2 of the command

M0000464

Page 217

Capitolo 8: Origini7: Parametri utensili

• • • •

Manuale di programmazione

CnId: is the address of NC which is sent to the command. 0 = not consider the address (where there is only one Slave). CmdCode: is the code of command protocol. Depending on the type of command there may be some parameters, which specify the command. CmdPar1: is the first parameter of the command CmdPar2: is the second parameter of the command

StatusVnIdx index of VN that contains the state and / or outcome of the operation:

Value 3 2 1 0 -1 -2 -3 -4 -5 -6 -7 -8 -9

Meaning Command successfully completed Command sent: awaiting response Request pending: awaiting sending command Protocol NC Master inactive Unrecognized command Reception error ( timeout and / or checksum error ) Command not executed ( COM BUSY or COM NOT READY ) Program nonexistent (deletions and / or send) Protocol error during response to a command Impossible to send the program because already exist in menu. COM BUSY during send a program Error during storage of a program sent

The VN state assumes the values of the table in the following situations: Vn stato = 1 State of preparedness packet to be transmitted and wait for command. Vn stato = 2 The transmission was made and is awaiting the response of the Slave. NOTE: In this phase is prohibited to send other commands with FUN120. Vn stato = 3 The command has been completed successfully. Vn stato = -1 The command requested could not be sent because the protocol CN MASTER is not active. Vn stato = -2 The command requested could not be sent because it is an unrecognized code. Vn stato = -3 Encountered a timeout or a checksum error.

Page 218

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

Vn stato = -4 The command requested could not be sent because the Slave is in a state of COM BUSY or COM NOT READY. Vn stato = -5 Has been requested to send a program that is not present in the memory of the master. Has been requested cancellation of a program that is not present in the memory of slave. Vn stato = -6 There was an error in the frame of the response sent by the slave. Vn stato = -7 You can not send the program because it's already in memory of slave. Vn stato = -8 During send packets of a program the slave was mistakenly placed in a state of COM BUSY. Vn stato = -9 An error occurred during storage program in the memory of slave. NOTE: Before you call FUN120 you must reset the VN status.

Commands implemented: SEND A PROGRAM CmdCode = 415 CmdPar1 = n. program to send

( Fw ver. 5.64 – 24.01.2008 )

CANCELLATION OF PROGRAM CmdCode = 419 CmdPar1 = n. program to delete

( Fw ver. 5.64 – 24.01.2008 )

PROTOCOL NC MASTER - ONLY INDIVIDUAL COMMANDS You can activate the protocol NC MASTER without the cyclical exchange of variables. In this mode on the transmission channel only transiting packets of individual commands. This mode is activated by writing in VN_DATA_CN_MASTER_NUM (VN393) the value 10000 and setting in VN_CN_MASTER_STATO (VN394) communication port you want to use: { 1 = COM1, 2 = COM2, 3 = COM3 (if available), etc. } There is no need for user program. M0000464

Page 219

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

Modbus Management Protocol The Modbus protocol managed is an RTU type and, for the firmware that provides for it, is enabled with VN398 in the following manner: VN398 = (10000 * D) + (1000 * C) + (100 * B) + A where: A = Com number; B = Device type; C = Slave register type; D = Protocol type;

can be 1, 2 or 3 0 = Slave, 1 = Master 2 = Slave Multi Point 0 = Registers not Inverted, 1 = Registers Inverted 0 = old, 1 = new

To have a SLAVE on com2 with new protocol without register inversion, set VN398 to: VN398 = (10000 * 1) + (1000 * 0) + (100 * 0) + 2 = 10002 A MASTER with the same characteristics will be: VN398 = (10000 * 1) + (1000 * 0) + (100 * 1) + 2 = 10102 Continuing with the last example, if you want to use the old protocol, the value to set in VN398 will be: VN398 = (10000 *0) + (1000 * 0) + (100 * 1) + 2 = 102

When management with the new protocol is enabled, it is possible to define a personalized mapping of the variables exchanged between the two systems to make the identification of the variables more intuitive. In fact, under the old protocol, the digital outputs immediately followed the VB's and, for this reason, if you wanted to set output 10, you needed to set: Maximum number of VB's managed by the NC + 10 In this mode, a PLC written for an NC with 1024 VB's would not be compatible with an NC with 4096 VB's and vice versa. The new protocol offers the option of establishing which is the first digital output with the new FUN115 so that it can correspond to the relative coil on the Master.

Page 220

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

The parameters of the serial line are set with VN 399 based on the following table: VN399 (VN_MODBUS_COM_MODE) 1 2 3 4 5 6 7 8 9 Others values

Baud rate 9600 19200 38400 9600 19200 38400 9600 19200 38400 9600

Communications mode N,8,1 N,8,1 N,8,1 E,8,1 E,8,1 E,8,1 O,8,1 O,8,1 O,8,1 N,8,1

IMPORTANT: VN 399 must be set before VN 398 so that the configuration of the serial line is determined before activating the Modbus protocol. Unlike the protocol SLAVE, the MASTER protocol activates with 1 second of delay by default when VN398 is set to give the SLAVE nodes time to initialize. If more time is needed, program the PLC to ensure that no Master transmission occurs before all the SLAVE nodes are active.

Modbus Protocol Functions Implemented Function Code

Function Description

01 02 03 04 05 06 16

Read Coils Read Discrete Inputs Read Holding Registers Read Input Register Write Single Coil Write Single Register Write Multiple Register

Firmware version MASTER 5.15 5.15 5.15 5.67 5.15 5.15 5.15

M0000464

Firmware version SLAVE 4.31 4.31 4.31 5.67 4.31 4.31 4.31

Page 221

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

Interface PLC LADDER MASTER The following PLC functions have been implemented for the use of the Modbus protocol: PLC LADDER Function Number 110 111 112 113 114

Function Description Protocol MASTER initialization Start Packet Set Parameters Closing packet and sending data Reading protocol state

Firmware version MASTER 5.15 5.15 5.15 5.15 5.15

The MASTER protocol is entirely managed by the PLC using the 5 functions described above. The PLC must call these functions in the following order: FUN 110 Master Protocol Initialization Must be executed with the PLC starts-up and whenever an error occurs. FUN 114 Read Protocol Status The protocol status must always be read before beginning a packet to be certain that transmission only occurs when the protocol is ready. 3 FUN 111 Begin Packet 4 FUN 112 Set Parameters 5 FUN 113 Close Packet and Send Data If the functions are executed in the wrong order, the transmission will stop with error code 1 in the VN indicated by FUN110 (see description of errors a little below).

Page 222

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

FUN110 Intialization ( MdbMasterInitProt ) FUN110 PAR1= VN Index Error Ex:

FUN110 40 0

; on the VN40 the protocol would write down the error code

o:

VN10 = 40 FUN110 VN10 0

; on the VN40 the protocol would write down the error code

Warning: The VN specified will be reset to zero The error codes provided are: Error Code 1 2 3 4 5 6

Description Order execution wrong Number node wrong Function unavailable Error Limit managed Bytes TimeOut ChkSum wrong

FUN111: Start Packet ( MdbMasterStartPack ) FUN111 PAR1 = Function Number 1: Read Coils 2: Read Inputs 3: Read Holding Registers 5: Write Single Coil 6: Write Single Register 16: Write Multiple Registers PAR2 = ID Node Slave Ex:

FUN111 2 1 ; Reading Dig. In from node 1

o:

VN30 = 2 VN31 = 1 FUN111 VN30 VN31 M0000464

Page 223

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

FUN112: Set Parameters ( MdbMasterInsPar ) FUN112 PAR1 = Variable Address SLAVE PAR2 = Quantity or Value

Es: o:

FUN112 5 2 ; Variabie Address SLAVE = 5, Variables = 2 VN20 = 5 VN21 = 2 FUN112 VN20 VN21

FUN113: Closing packet and sending data ( MdbMasterEndPack ) FUN113 PAR1 = Variable Address MASTER PAR2 = Type of variable: 0= No response (Writing Case) 1= VB 2= VN 3= VQ Ex:

FUN113 70 2

o:

VN 30 = 70 VN31 = 2 FUN113 VN30 VN31

The response is written starting from the specified variable

Page 224

M0000464

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

FUN114: Request protocol status FUN114 PAR1 = VN state index PAR2 = VB Protocol index Ready=1/Busy=0

State 0 1 2 3 4 5 6 7 8 9

Name

Description

PROT_M_DISABLE PROT_M_ENABLED PROT_M_READY PROT_M_BUILDING_P ACK PROT_M_SENDING_P ACK PROT_M_WAIT_ANS WER PROT_M_TIMEOUT PROT_M_RX_OK

Protocol Disabled Enabled Protocol and ready Protocol Initialized Construction packet

Ready=1 Busy=0 0 1 1 0

Sending packet

0

Waiting response from Node

0

Receiving end: Timeout Receiving completed and correct Receiving end: ChkSum wrong

1 1

PROT_M_CHKSUM_E RROR PROT_M_NODE_ERRO Receiving end: Error from Node R

1 1

The PLC software must be written so that no packet is begun before checking the protocol status to make sure that it is Ready. In the case of error, such as a TimeOut, the protocol status is set to 6 and the relative error code is written in the error VN initialized with FUN110; all send data requests will be blocked as long as the error VN is other than 0: this allows time to recognize the error and manage the reset function that must, of necessity, terminate with a call to FUN110 to reset the error VN. IMPORTANT: The functions described must be executed in the indicated order (from 110 to 113); an incorrect order of execution will set the error VN to the relative code and will block communication.

M0000464

Page 225

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

EXAMPLES PLC type LADDER VB Number = 1024 VN Number = 1454 VQ Number = 304 DO Number = 16 DI Number = 16 The VB from 1 to 1024 match coils from 1 to 1024 The outputs from 1 to 16 match to coils from 1042 to 1057 The VN 1 from the 1454 match to registers from 1 to 1454 The VQ from 1 to 304 match to register couples from 1456 a 2062 The inputs from 1 to 16 match to Input Bits from 1 to 16 WARNING: these examples assume the use of the old protocol. Read the VB100 from node 1 and write in the VB300 MASTER FUN110

10

0

: VN10 = Error

FUN111

1

1

: Function Number

Node Number

FUN112

100

1

: Variable Slave Index

Quantity

FUN113

300

1

: Variable Master Index

Variable Type

MASTER

VB300

VB301

Page 226

NODE 1

VB302

VB303

VB304

VB100

M0000464

VB101

VB102

VB103

VB104

Manuale di programmazione

Capitolo 8: Origini7: Parametri utensili

Read VB single

Read coil from NODE 1 Read vb100 from NODE 1 Write value on vb300 of the MASTER Jump to the next operation Read protocol state Vn8 => state of the operations Vb5 => Ready = 1 / Busy = 0

Read output 1 from the node 1 and write in the VB310 of the MASTER FUN110

10

0

: VN10 = Error

FUN111

1

1

: Function Number

Node Number

FUN112

1042 1

: Variable Slave Index

Quantity

FUN113

310

: Variable Master Index

Variable Type

1

MASTER

VB310

VB311

NODE 1

VB312

VB313

VB314

DI1

DI2

DI3

DI4

DI5

Read digital output 1 and write on VB310 of the MASTER

Read coil from NODE 1 Read digital output 1 from NODE 1 Write on vb300 of the MASTER Jump to the next operation Read protocol state Vn8 => state of the operations Vb5 => Ready = 1 / Busy = 0

M0000464

Page 227

Capitolo 8: Origini7: Parametri utensili

Manuale di programmazione

To read the output 2, the first parameter of the FUN112 should be 1043, for the output 3 will be 1044, etc..

Read the VB from 1 to 10 from the node 1 and write from the VB60 of the MASTER FUN110

10

0

: VN10 = Error

FUN111

1

1

: Function Number

Node Number

FUN112

1

10

: Variable Slave Index

Quantity

FUN113

60

1

: Variable Master Index

Variable Type

MASTER

VB60

VB61

NODE 1

..........

VB68

VB1

VB69

VB2

...........

VB9

VB10

Copy 10 VB of the SLAVE, starting from VB1, on MASTER, starting from VB60 (to 69)

Read coil from NODE 1 Read of the first 10 VB Write starting from VB60 (MASTER) Jump to the next operation Read protocol state Vn8 => state of the operations Vb5 => Ready = 1 / Busy = 0

Page 228

M0000464

Programming manual

Chapter 2: General programming notes

Read the inputs 5 and 6 from the node 1 and write them in the VB 75 and 76 of the MASTER FUN110

10

0

: VN10 = Error

FUN111

2

1

: Function Number

Node Number

FUN112

5

2

: Variable Slave Index

Quantity

FUN113

75

1

: Variable Master Index

Variable Type

MASTER

...........

VB75

NODE 1

VB76

VB77

………

………

DI5

DI6

DI7

………

Copy 2 digital inputs, starting from the input 5, on MASTER, starting from VB75 (to 76)

Read digital input from NODE 1 Read 2 digital inputs Write starting from VB75 of the MASTER Jump to the next operation Read protocol state Vn8 => state of the operations Vb5 => Ready = 1 / Busy = 0

M0000464

Page 229

Chapter 2: General programming notes

Programming manual

Force to 1 the VB 20 on the NODE 1 FUN110

10

0

: VN10 = Error

FUN111

5

1

: Function Number

Node Number

FUN112

20

1

: Variable Slave Index

Value

FUN113

0

0

: Irrelevant

Irrelevant

NODE 1

MASTER

...........

...........

...........

...........

………

………

VB20

VB21

VB22

………

1 Set only VB20 to ON and no writing on MASTER

Write Coil on NODE 1 Set VB20 to ON No response Jump to the next operation Read protocol state Vn8 => state of the operations Vb5 => Ready = 1 / Busy = 0

To reset the VB20 should execute FUN112 with the second parameter to 0.

Page 230

M0000464

Programming manual

Chapter 2: General programming notes

Set VB 21 of the node 1 depending on the value of the VN90 of the MASTER FUN110

10

0

: VN10 = Error

FUN111

5

1

: Function Number

FUN112

21

VN90 : Variable Slave Index

Var.Master (value)

FUN113

0

0

Irrelevant

: Irrelevant

MASTER

...........

VN89

Node Number

NODE 1

VN90 0/-1

VN91

………

………

VB21

VB22

VB23

………

Set VB21 of the SLAVEON depending on the value of VN90 of the MASTER

Write Coil on NODE 1 Write VB21 of the SLAVE No response Jump to the next operation Read protocol state Vn8 => state of the operations Vb5 => Ready = 1 / Busy = 0

IMPORTANT: VN needs to be set to –1 (65535) if you want to set the VB.

M0000464

Page 231

Chapter 2: General programming notes

Programming manual

Read the VN2 and VN3 from the SLAVE and write them on the VN70 and VN71 of the MASTER FUN110

10

0

: VN10 = Error

FUN111

3

1

: Function Number

Node Number

FUN112

2

2

: Variable Slave Index

Quantity

FUN113

70

2

: Variable Master Index

Variable Type

MASTER

...........

VN70

NODE 1

VN71

VN72

………

………

VN2

VN3

VN4

………

Copy 2 VN of the SLAVE, starting from VN2, and write them on the VN70 and 71 of the MASTER

Read VN/VQ from NODE 1 Read 2 VN starting from VN2 Write on VN70, Type VN Jump to the next operation Read protocol state Vn8 => state of the operations Vb5 => Ready = 1 / Busy = 0

Page 232

M0000464

Programming manual

Chapter 2: General programming notes

Write on the VN 200, 201, 202 of the SLAVE the value of the VN 100, 101, 102 of the MASTER FUN110

10

0

: VN10 = Error

FUN111

16

1

: Function Number

Node Number

FUN112

200

3

: Variable Slave Index

Quantity

FUN113

100

2

: Variable Master Index

Variable Type

MASTER

...........

VN100

NODE 1

VN101 VN102

………

………

of the of starting the VN 100 the MASTER CopySLAVE 3 VN of the the value MASTER, fromof VN100, on SLAVE, FUN110

10

0

6

1

FUN112

199

VN100:

FUN113

0

2

………

starting from VN200

:

Multiple writing regist. on NODE 1 Writing of 3 VN starting from VN200 Function Number Node Number Reading VN from MASTER (from VN100) Jump to the next operation Read protocolValue state Variable Slave Index Vn8 => state of the operations Vb5 => Ready = 1 / Busy = 0

: Irrelevant

MASTER

VN100

VN201 VN202

: VN10 = Error

FUN111

...........

VN200

Variable Type

NODE 1

VN101 VN102

………

………

M0000464

VN199

VN200 VN201

………

Page 233

Chapter 2: General programming notes

Programming manual

Write in VN199 of the SLAVE the value of VN100 of the MASTER

Writing single regist. on NODE 1 Writing of VN199 on SLAVE Reading VN from MASTER Jump to the next operation Read protocol state Vn8 => state of the operations Vb5 => Ready = 1 / Busy = 0

Page 234

M0000464

Programming manual

Chapter 2: General programming notes

Read the VQ3 and 4 of the SLAVE and write them on the VQ30 and 31 of the MASTER FUN110

10

0

: VN10 = Error

FUN111

3

1

: Function Number

Node Number

FUN112

1460 2

: Variable Slave Index

Number of VQ

FUN113

30

: Variable Master Index

Variable Type

3

MASTER

...........

VQ30

NODE 1

VQ31

VQ32

………

………

VQ3

VQ4

VQ5

………

Read VQ3 and 4 of the SLAVE and write them in VQ30 and 31of the MASTER

Reading VN/VQ from NODE 1 Reading VN/VQ (VQ3) for 2 variables Writing on VN70, type VQ Jump to the next operation Read protocol state Vn8 => state of the operations Vb5 => Ready = 1 / Busy = 0

In the SIPRO MODBUS SLAVE protocol the VQ starting from the address 1456: Address 1456 1458 1460 1462 1464 …..

VQ 1 2 3 4 5 …..

M0000464

Page 235

Chapter 2: General programming notes

Programming manual

Write on VQ10 and 11 of the SLAVE the value of VQ150 and 151 of the MASTER FUN110

10

0

: VN10 = Error

FUN111

16

1

: Function Number

Node Number

FUN112

1474 2

: Variable Slave Index

Number of VQ

FUN113

150

: Variable Master Index

Variable Type

3

MASTER

...........

VQ150

NODE 1

VQ151 VQ152

………

………

VQ10

VQ11

VQ12

………

Write on VQ10 a 11 of SLAVE the values of VQ150 and 151 of MASTER

Multiple writing regist. On NODE 1 Writing starting from VQ10 - SLAVE Read from VQ150 of MASTER Jump to the next operation Read protocol state Vn8 => state of the operations Vb5 => Ready = 1 / Busy = 0

In the SIPRO MODBUS SLAVE protocol the VQ starting from the address 1456: Address 1456 1458 1460 1462 1464 1466 1468 1470 1472 Page 236

VQ 1 2 3 4 5 6 7 8 9 M0000464

Programming manual

Chapter 2: General programming notes

1474 …..

10 …..

M0000464

Page 237

Chapter 2: General programming notes

Programming manual

Set to ON output 16 of the SLAVE FUN110

10

0

: VN10 = Error

FUN111

5

1

: Function Number

Node Number

FUN112

1057 1

: Variable Slave Index

Value (0=OFF,1=ON)

FUN113

0

: Irrelevant

Irrelevant

0

Force to ON the digital output 16 of the SLAVE

Writing coil on NODE 1 Set digital output 16 to ON No response End operations Read protocol state Vn8 => state of the operations Vb5 => Ready = 1 / Busy = 0

In the SIPRO MODBUS SLAVE protocol the digital output starting from the address 1042: Address 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057

Page 238

DIG OUT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

M0000464

Programming manual

Chapter 2: General programming notes

PLC LADDER SLAVE interface old protocol If in the VN398 is not enabled the new protocol (10000), the relation between the variables managed by the protocol and the variables managed by the control is as follows: Modbus Variables Coils (bit variables)

Input Bits (bit variables)

Holding Register (word variables)

Number Variables managed VB = 1024 Digital Outputs = (Parameter Number Groups Digital Outputs

Siax Variables The first 1024 are linked to our VBs, the next ones are linked to the digital outputs. The maximum number of digital outputs that can be managed is linked to the machine parameter number groups digital outputs and is equal to the value of the parameter multiplied by 16 Digital Inputs = (Parameter These are the control's digital inputs. Number Groups Digital Inputs) The maximum number of digital inputs *16 that can be managed is linked to the machine parameter number groups inputs and is equal to the value of the parameter multipled by 16 These variables require a different ISO PLC discussion depending on whether the VN = 464 ISO PLC or LADDER program is VQ = 256 active on the numerical control. ISO PLC: the first 464 are linked to the PLC LADDER VNs, while the next 512 are linked to VN = 1454 the VQs (there are 256 VQs available VQ = 304 and the value 512 is due to the fact that for every VQ, there is a need to read/write 2 Holding registers since they are 32-bit VQ variables (LONG, DWORD). We also need to take into account the distance between two VQs and two Holding registers). PLC LADDER: The first 1454 are linked to the VNs, the next 608 are linked to the VQs (in this case the discussion made previously on the relationship between VQs and Holding Registers is also valid).

M0000464

Page 239

Chapter 2: General programming notes

Programming manual

Examples: 1. Read VBs from 1 to 16. In this case, it will be necessary to use a function code 01 defining number 1 as first coil and 16 as the number of coils to read. 2. Read digital outputs from 19 to 25. In this case, it will be necessary to use a function code 01 defining the number 1043 at first coil and 7 as the number of coils to read. 3. Read inoputs from 5 to 12. In this case, it will be necessary to use a function code 02 defining the number 1 as first input and 16 as the number of coils to read. 4. Read the VNs from 5 to 18. Use a function code 03 with 5 as starting index and 3 as number of registers to read. 5. Read the VQs from 200 to 202. Use a function code 03, in this case, ISO PLC is used to define 864 as the starting index (464 + 200*2) and 6 as the number of registers to read. If PLC LADDER is used, the starting address will be 1854. 6. Writing VB260. Use function code 05, coil index = 260, then write the value 0 or 1. 7. Write output 25, Use function code 05, coil index = 1049 then write the value 0 or 1. 8. Write VN256. Use function code 6 or 16, holding register index = 256, then write a value between –32767 and 32767 9. Write VQ5. Use function 16, the holding register index varies depending on whether you are using ISO PLC or PLC LADDER. In the first case, the index will be equal to 474, in the second case to 1464. The settable value must be between –-2147483.648 and 2147483.648.

Page 240

M0000464

Programming manual

Chapter 2: General programming notes

PLC LADDER SLAVE interface new protocol If in the VN398 is enabled the new protocol (10000), you can define a custom mapping of all the variables handled by the new function 115 of the PLC: FUN115 Variables Mapping ( WplcMdbConfMap ) FUN115 PAR1= Index first VN that defines the mapping PAR2= Error index Ex:

FUN115 10 9

VN10 = First VN variables mapping VN9 = Error code The error codes are: Error Code 0 1

Description Command executed correctly Mapping already executed Mappatura variabili

VN First VN +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14

Description First VB shared First coil shared First VB/Coil shared First Uscita Digitale shared First coil shared Number Outputs/Coil shared First Digital Input shared First coil shared Number Inputs/Coil shared First VN shared First Register shared Number VN/Register shared First VQ shared First Register shared Number VQ/Register shared

M0000464

Page 241

Chapter 2: General programming notes

Programming manual

SLAVE VB0

MASTER COIL 1

VB499 VB500

VB599 VB600

100 VB

COIL 199 COIL 200

COIL 299 COIL 300

COIL 399 COIL 400

Dig Out 1

DO 09 DO 10

15 DO

COIL 415 COIL 416

DO 25 DO 26

INGRESSI

Dig In 1 INPUT COIL 24 399 INPUT COIL 25 400 DI 04 DI 05

5 DI

DI 10 DI 11

Page 242

M0000464

INPUT COIL 29 415 INPUT COIL 30 416

Programming manual

Chapter 2: General programming notes

SLAVE VN0

MASTER REGISTER

VN49 VN50

VN249 VVN250

REG 19 REG 20

200 VN

REG 249 REG 250

REG 299 REG 300, 301 = VQ15 REG 302, 303 = VQ16

VQ0

VQ14 VQ15

50 VQ

VQ64 VQ65

REG 398, 399 = VQ64 REG 400

M0000464

Page 243

Chapter 2: General programming notes

Programming manual

To have the mapping represented above, on the PLC SLAVE will be executed the FUN115 after setting its VN as follows: Variables Mapping VN First VN +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14

Value 500 200 100 10 400 15 5 25 5 50 20 200 15 300 50

Description First VB shared First coil shared Number VB/Coil shared First Digital Output shared First coil shared Number Outputs/Coil shared First Digital Input shared First coil shared Number Inputs/Coil shared First VN shared First Register shared Number VN/Register shared First VQ shared First Register shared Number VQ/Register shared

Error code response Code Function 01

02

03

Page 244

Errors Handled

Code returned

1. Initial address not correct and Initial address + number coils in read > maximum possible value. (code 02). 2. Quantity of Coils in read > 2000. (code 03).

Node Number

81

02

CHKS CHKS HIGH LOW

Node Number

81

03

CHKS CHKS HIGH LOW

1. Initial address not correct and Initial address + number Inputs in read > maximum possible value. (code 02). 2. Quantity of Inputs in read > 2000. (code 03).

Node Number

82

02

CHKS CHKS HIGH LOW

Node Number

82

03

CHKS CHKS HIGH LOW

1. Initial address not correct and Initial address + number Holding Registers in read > maximum possible value. (code 02). 2. Quantity of Holding Registers in read > 125.

Node Number

83

02

CHKS CHKS HIGH LOW

M0000464

Programming manual

Chapter 2: General programming notes

(code 03). 05

1. Coil address not correct (code 02). 2. New Coil value other than 0x0000 or 0xFF00 (code 03).

Node 83 Number Node 85 Number 85 Node Number

03 02 03

CHKS HIGH CHKS HIGH CHKS HIGH

CHKS LOW CHKS LOW CHKS LOW

06

1. Coil address not correct (code 02).

Node Number

86

02

CHKS CHKS HIGH LOW

16

2. Initial address not correct and Initial address + number Holding Registers in write > maximum possible. (code 02). 3. Quantity of Holding Registers in write > 125 and Byte Count value other than number bytes * 2. (code 03).

Node Number

90

02

CHKS CHKS HIGH LOW

Node Number

90

03

CHKS CHKS HIGH LOW

For all other function codes, error code 01 is returned as in the Modbus specifications. Return message format: Node Number Function Code + 0x80

01

M0000464

CHKS HIGH

CHKS LOW

Page 245

Chapter 2: General programming notes

Programming manual

Special handling for rotating table There are three types of special handling: 1. Movement optimized with automatic choice of the shortest route (eg from 10 degrees to 345 the movement happens anticlockwise via the 0 and 25 degrees along then move) 2. Movement with specific direction: • Positive target level => clockwise movement • Negative target level => anticlockwise movement 3.

Incremental movement optimized with automatic choice of the shortest route. Movement instruction = AX INCR (from firmware version 4.41 of 20/05/03)

The type of movement is selected with a Numeric Variable (VN): • • • •

0 = classical movement 1 = optimized movement 2 = movement with specific direction 3 = optimized incremental movement

NOTE: Setting values not previewed make it impossible the movement of the axe and, if in automatic cycle, causing the interruption of the execution of the program with an error code. NOTE: For the axes type “rotating table” is required to specify in the parameters axes the following values: Reference millimeter: Pulses reference:

360 (with the appropriate number of decimal digits) number of pulses corresponding to a rotation of 360 degrees

NOTE: the functions of special handling for rotating table are available only on particular firmware.

Limitations The special handling work with single placements (start and stop) and displacements < 360 degrees (ie it is not possible to program the execution of a displacement higher than a turn). Details implementation At the beginning of each movement the axe level is reported within the turn [0 - 360]. The target level specified is altered according to the needs of active handling (eg optimized displacement from 10 to 345 degrees becomes a displacement from 10 to -15).

Page 246

M0000464

Programming manual

Chapter 2: General programming notes

To view the level only in the interval [0 - 360] should be programming the variable PLC "display module" (VN365 - VN_VIEW_MOD - variable bit). 18.10.2000 The functions for the Rotating Table are enabled by the VB421, also for each axe there is a VN, starting from VN348, to specify the type of movement required. NOTE: Indexes of variables specified apply to firmware versions up to 8 axes VB421 VN VN348 VN349 VN350 VN351 VN352 VN353 VN354 VN355

1 = enable the special handling for rotating table select the type of movement for axis 1 2 3 4 5 6 7 8

M0000464

Page 247

Chapter 2: General programming notes

Programming manual

Scale factor VN333 contains the number of the first VQ used as Scale factor (0 = scale factor disabled). E.g.: in a control that can manage up to 4 axes, by setting VN333 to a value of 251, you will have variables VQ251 to VQ254 containing the scale factor applied to the axes: VQ251scale factor axis 1 VQ252scale factor axis 2 VQ253scale factor axis 3 VQ254scale factor axis 4 Setting VN333 to 0 disables the scale factor; this is equivalent to using the scale factor with all variables set to the value 1.000.

Specularity By setting negative values for the scale factor, it is possible to obtain specular movements. Example: VN333 = 251 VQ251 = -1.000 VQ252 = 1.000 VQ253 = 1.000 VQ254 = 1.000 The positions of the axis 1 will change sign, thus obtaining specular movement.

Page 248

M0000464

Programming manual

Chapter 2: General programming notes

ISO Programming More advanced configurations of the Numerical Control provide instructions for linear and circular interpolation with or without third tool orientation axis. The Linear Interpolation instruction brings the X and Y axes from their current position to the position specified following a straight line. Circular Interpolation instructions move the X and Y axes along an arc of circumference (or along a complete circumference) in a clockwise or counter-clockwise direction, given the coordinates of the center and the final point. To create user programs that provide linear or circular interpolation, it is necessary: • to have: a CAD/CAM program for the generation of the ISO file, • or by editing files, on NC or PC, through the specific instructions corresponding to the Gs and, in that case, the generated files will have the extension *.eep. This second solution is only possible if the firmware is interpolated and thus provides for its own internal ISO interpreter.

Programs generated with CAD/CAM It is possible, though a CAD/CAM program to start from a drawing of the piece to be worked to generate the ISO work file. These programs, once loaded in the memory of the NC, cannot be seen or edited but only executed. Below, we provide the complete list of ISO codes recognized.

ISO codes recognized ISO instructions are parameterized: the values of the axes positions in movement instructions (G0, G1, G2 e G3) and speed instructions (F) can be on Position Variables (VQ). The ISO interpreter recognizes the following instructions: %

Begin program

{

Begin comment

F

Set speed in mm/min

G

Movement instructions G0 rapid movement G1 linear movement G2 arc of circumference in clockwise direction G3 arc of circumference in counter-clockwise direction Note: the G2 and G3 instructions can have 1 additional axis (helical interpolation). G17 G18 G19 G40 G41 G42 G43 G44

sets the XY plane as the plane of interpolation sets the ZX plane as the plane of interpolation sets the YZ plane as the plane of interpolation disables tool tool to left tool to right tool outside with respect to the circumference tool inside with respect to the circumference

M0000464

Page 249

Chapter 2: General programming notes

Programming manual

G45

3rd axis of interpolation with angle of orientation parallel to the direction of advancement NOTE: the change plane of interpolation (instructions G17, G18 and G19) set the external tool side mode (G43). For this reason, any instructions that set the tool side, type G41, G42 and G45, are executed after the change plane instruction.

G55 G59

makes origin active set the origin values

G60 G61

CONT MOVE NO CONT MOVE

G90 G91

activates absolute coordinates mode activates incremental coordinates mode (realtive to last point)

G101 G102 G103

enables HA disables HA enables HA (without explicit angle).

G220 and G221 release the axes from the interpolation group G311 and G312 set the Profile by Points (PPP) mode G216 Personalization of the interpolation plane G321, G322, G323 and G324 set the interpolation mode with G1, G2 and G3 The implicit call characteristics (G101, G102 and G103) are propagated forward and back in calls to subroutines (i.e., if a G103 instruction is executed in a subroutine, the implicit call to a subroutine remains active even in the calling program. H

Wait time

M

Call to a subroutine M0 gosub 9700 M1 gosub 9701 M3 gosub 9703 M4 gosub 9704 M5 gosub 9705 : : M86 gosub 9786 M87 gosub 9787 M88 gosub 9788 M89 gosub 9789

The Mxx codes used as Gosub to subprogram are from M00 to M89 (excluding M02 and M30). There is the possibility of executing the "M" functions (prog. 97xx) from the page in Multiple Manual with the [PRG] key.

Page 250

M0000464

Programming manual

Chapter 2: General programming notes

M2 M30

end program end program

M93

M95

VBi = ValB assigns the value ValB (constant or VB, even with index greater than 255) to VBi VNi = ValN assigns the value ValN (constant or VN, even with index greater than 255) to VNi VQi = ValQ assigns the value ValQ (constant of VQ) to VQi

M97

VNi = Val + GOSUB 9797

M100

[J|B] [#|N] ValN jump to the inside of the program (GOTO) unconditioned [VB|VN|VQ]i [|!=] [ValB|ValN|ValQ] [J|B] [#|N] ValN jump to the inside of the program (GOTO) with condition where: J = absolute jump B = offset with respect to the current block # = line number of the file N = block number (label)(available from 5.09 version)

M94

M101

Examples: M100 J#20 jumps to line 20 M101 VB50 = 1 J#20 jumps to line 20 if VB50 = 1 M101 VN23 >= VN4 B#-5 jumps 5 lines more backwards if VN23 is greater than or equal to the content of VN4. M100 JN50 jump to block the that begin it with N50 Note: instructions M100 and M101 are legal only in programs residing in the memory of the NC and not in programs transmitted in temporary form from a PC. NOTE: jump to block number (label) Block numbering must begin in the first column, the letter "N" must be uppercase and there must not be any spaces between "N" and the number. The type of "jump to label" can only be absolute, so the only notation allowed in instructions M100 and M101 is "JN" (for example: M100 JN30) M102 VNi enables storing the step in VNi (like instruction 102 MEM STEP VNi). M750 M751

assumes the one of the last movement as the default G assumes G1 as the default G

M752 M753

4-axes interpolation (equal to 764) 2-axes interpolation (circular)

M761 M762 M763 M764 M765 M766

1-axes interpolation (linear) 2-axes interpolation (linear) 3-axes interpolation (linear) 4-axes interpolation (linear) 5-axes interpolation (linear) 6-axes interpolation (linear)

M780

Disables the forcing of tool tangency. M0000464

Page 251

Chapter 2: General programming notes

M781 M782 M783 M784 M785 M786 M787 M788 M789 M801

Programming manual

Enables the forcing of tool tangency. Always sets recalculated speed in arcs. Sets only recalculated speeds less than current. Disables the orientation of the tool in arcs of circumference. Enables the orientation of the tool in arcs of circumference. Disables the function for the movement only of axes with bit at 1. Enables the movement only of axes with bit at 1. Disables the function that interrupts continuous movement if the mask between one movement and the next is different - secondary axes. Interrupts continuous movment if the mask between one movement and the other is different - secondary axes. P= allows setting the value of several parameters internal to the firmware that modify the behavior of several functions (for a description of the parameters, see the chapter NC Functions, FUN 251).

N

Block number

S

Sets VN254

T

Sets VN255

The following example illustrates an ISO file that can be sent to the NC and interpreted and executed by the Numeric Control.

Page 252

M0000464

Programming manual



Chapter 2: General programming notes

Example ISO program

Example ISO file. The work refers to the a sink top, with peripheral work and central hole. instruction

Comment

%12 program 12 G103P1000VQ0 enables ha:prg 1000 angle in vq0 G60 cont move G45 3rd axis parallel to advancement G55 N 0 origin 0 M93 VB49 = 1 VB 49 = 1 M95 VQ187 = 4 vq 187 = 4 M95 VQ223 = 50 vq 223 = 50 M94 VN110 = 1000 VN 110 = 1000 M97 VN137 = 4 VN 137 = 4 e gosub 9797 G55 N 2 origin 2 G0 X135.5175 Y213.2669 positions x y axes to position G1 Z-10 F500 axis z to -10 at speed 500 mm/min G1 Z10 F500 axis z to 10 at speed 500 mm/min G3 X864.4825 Y213.2669 I500 J439.951 circum ctr-clock center in 500 439 and end 864 213 G2 X873.9338 Y220 I873.9338 J210 circum clock center in 873 210 and end 873 220 G1 X1490 Y220 linear interpolation final positions X=1490 Y=220 G3 X1500 Y230 I1490 J230 circumf ctr-clock center in 1490 230 and end 1500 230 G1 X1500 Y540 linear interpolation final positions X=1500 Y=540 G3 X1490 Y550 I1490 J540 circumf ctr-clock center in 1490 540 and end 1490 550 G1 X10 Y550 linear interpolation final positions X=10 Y=550 G3 X0 Y540 I10 J540 circumf ctr-clock center in 10 540 and end 0 540 G1 X0 Y230 linear interpolation final positions X=0 Y=230 G3 X10 Y220 I10 J230 circumf ctr-clock center in 10 230 and end 10 220 G1 X126.0662 Y220 linear interpolation final positions X=126 Y=220 G2 X135.5175 Y213.2669 I126.0662 J210 circonf clock center in 126 210 and end 135 213 G1 Z-10 F500 axis z at -10 at speed 500 mm/min G55 N 0 origin 0 M02 end program

M0000464

Page 253

Chapter 2: General programming notes

Programming manual

The ISO program creates the following profile

Programs generated with the editor In the case in which the numeric provides firmware with interpolation, you can write NC programs that use ISO instructions recognized by the compiler. To write such programs, you can use the internal editor of the development system (such as SiaxED) or an external editor selected by the programmer. Once the .SRC program is written, the compilation will generate an .EEP file. Below, we provide a table that illustrates the ISO instructions that are recognized by the NC compiler and the code of such instructions in the list of NC instructions. NC instructions code ISO instructions recognized 61 G1

Page 254

62

G2

63

G3

34 38 39 40 41

M02 or M30 G60 G61 G40 G41

Description Linear interpolation (G1XY xf yf with xf and yf final point positions) Circular clockwise interpolation (G2XY xc yc xf yf with xc and yc center positions, xf yf final point positions) Counter-clockwise circular interpolation (G3XY xc yc xf yf with xc and yc center positions, xf yf final point positions) End program Enables continuous interpolated movements Disables continuous interpolated movements Disables tool correction Tool position to the left with respect to advancement M0000464

Programming manual

Chapter 2: General programming notes

42

G42

43 44 45 55 56 57 60 72 73

G43 G44 G45 G55 G102 or G103 F FXY G2R G3R

Tool position to the right with respect to advancement Tool outside with respect to the circumference Tool inside with respect to the circumference Third axis oriented parallel to advancement Sets the active origin Sets the active origin Interpolation speed in mm/min. Interpolation speed in mm/sec. Arc of circumference clockwise, given the radius Arc of circumference counter-clockwise, given the radius

To better understand the instructions listed in the table, you can refer to the manual describing the NC instructions. The ISO instructions recognized by the compiler have a syntax that varies depending on the type of programming done. If I program directly on the NC, the table instructions have a different syntax from those when I program with the PC editor. The latter faithfully follows the ISO syntax and is illustrated in the manual describing the NC instructions (for programming from the keyboard of the control, see Chapter 1 of this manual). In programming with systems that support interpolation, it is also possible to set the linear advance speed and avoid the stopping of the axes in the intermediate point between two consecutive interpolations . This can be obtained in two different ways: with the instruction NO WAIT AX and with the instruction CONT MOVE. CONT MOVE (code 38) Enables continuous interpolated movements NO CONT MOVE (code 39) Disables continuous interpolated movements Let's look at an example to explain the differences. Suppose we want to realize the movement in figure 1 and find ourselves at point A.

Figure 1

One possible program is: : FXY 20 : NO WAIT AX

// Set working speed //Disables waiting for axes in position M0000464

Page 255

Chapter 2: General programming notes

Programming manual

G1 X 200 Y 100 // I am taken to point B G2 X 300 Y 0 I 200 J 0 // I am taken to point C WAIT AX //I enable waiting for axes in position WAIT AX 1 IN QUOTE //I wait for axes in position WAIT AX 2 IN QUOTE Having used the instruction NO WAIT AX, the program does not wait for the end of axis movement but immediately goes to execute the next step. So, in our case, the program will immediately go to step 6 and will remain there until the end of movements. This involves a disadvantage if I want to associate an action to the arrival of the axes at an intermediate point. In fact, suppose we want to set an output when the axes are brought to point B. Having used NO WAIT AX, any instruction at step 3 (OUTON 1) would be executed immediately and, therefore, I would not know when the axes were effectively at point B. : : : :

To avoid these problems, it is possible to use the 38 CONT MOVE obtaining continuous interpolated movements but continuing to execute the program in step-by-step mode. In order to give this instruction, you must be in normal mode (waiting for axes in position) and to obtain continuous movements it is necessary that, in the current step, there are no time wait instructions and that, in the next step, there are no operations on variables (because they are evaluated before the movement). In fact, after having given this instruction, if the program encounters an interpolated movement instruction it checks if there is another one at the next step. In this case, it places it in the buffer and waits for the first movement to finish and then executes the next step. If you wish to associate an action to a certain movement, you must enter the relative instruction in the step of that movement, without creating a new step. In fact, if there is another step between the two interpolated movement steps, you will not achieve continuity. Using the instruction CONT MOVE the program becomes: : FXY 20 : CONT MOVE movements : G1 X 200 Y 100 : G2 X 300 Y 0 I 200 J 0 : NO CONT MOVE disabled

// Set working speed //I enable continuous interpolated // I am taken to point B // I am taken to point C // Continuous interpolated movements

N.B.: It is important to note that continuous interpolated movements can only be obtained with circular connections.

Page 256

M0000464

Programming manual

Chapter 2: General programming notes

Types of ISO programming The Numerical Control is capable of executing ISO programs. In fact, there is an ISO interpreter resident in the NC that recognizes the codes listed in the paragraph “ISO codes recognized” of the NC Programming manual. The Numerical Control provides different “types” of ISO file programming. I.e., it is able to execute ISO instructions in different programming methods. Below, we illustrate these programming methods. Circular Interpolation By “Circular Interpolation” is meant the type of programming that provides for the use of ISO instructions G1, G2 and G3. The Numerical Control manages this type of programming by default. At the moment of power-on. i.e., the Numerical Control is enabled to manage this type of programming. In the case in which the Numerical Control was set for another type of programming to enable the NC to manage Circular Interpolation we must insert, at the beginning of the listing, the ISO instruction M753 At the moment of execution, the Numerical Control recognizes instruction M753 and enables the movements executed with the ISO instructions G1, G2 and G3. Circular Interpolation provides for working with a tool. I.e., with this type of programming, the Numerical Control executes the work, taking into account “tool correction” and manages instructions ISO G40, G41, G42, G43, G44 and G45. Another characteristic of this type of programming is the possibility of performing movements with non-standard geometries as well. In addition to movements within Cartesian orthogonal systems, it provides the possibility of managing more complex systems of reference (such as SCARA and Polari geometries, for firmware that provides for it). Circular Interpolation provides the possibility of performing continuous movements (G60) or with stop on the point. In the case in which we perform work with continuous movements, the possibility is provided of controlling the angle of direction between two consecutive movements. This is accomplished with instruction G103. The following example illustrates the use of instruction G103. Example: %1 TEST1 {ISO program number 1} G103P1000VQ0 {enabling stop work and jump to {program 1000. In VQ0} {there is the number that identifies the angle of direction } {of the next movement} G60 {enabling continuous movements} G0 X0.000 Y100.000 {positioning axes before the work } G42 {Tool to the left with respect to the direction of advancement} F2000 {setting working speed} G1 X150.000 Y100.000 {linear interpolation. Moving axes to the positions} {X=150 Y=100} G3 X220.000 Y170.000 I150.000 J170.000 {circular interpolation.} {Arc of circumference in counter-clockwise direction {with center I=150 Y=170 and } {final point X=220 Y=170} G1 X245.000 Y170.000 {linear interpolation. Moving axes to the positions} {X=245 Y=170} M0000464

Page 257

Chapter 2: General programming notes

Programming manual

G2 X260.000 Y150.000 I245.000 J154.375 {circular interpolation.} {Arc of circumference in a clockwise direction} {with center I=245 Y=154.375 and } {final point X=260 Y=150} G1 X225.000 Y18.750 {linear interpolation. Moving axes to the positions} {X=225 Y=18.750} G40 G61 M02

{disables tool correction} {disables continuous movements} {end of program}

The ISO program in the example performs continuous movements since it contains a G60 instruction. The instruction G103 P100 VQ0 is also present. This instruction enables control of the angle of tangency between two contiguous movements. At the moment in which the angle between the two continguous movements is greater than the value specified in the machine parameter Tangency tolerance the NC performs the following operations: • •

Stops the continuous movement at the end of the section being executed. Jumps to program 1000 in which NC instructions can be written for the correct positioning of the tool. • The number that represents the angle of direction, in degrees of the movement after the stop is placed in VQ0 In the ISO file example shown above, program 1000 is called after the execution of the G3 instruction and, after it has been executed, the work continues with the next G1 instruction. The following work is performed: Stop on point and execution of program 1000 because the angle formed by the directions of the sections of the profile made by G3 and subsequent G1 ( ) is greater than the value of the machine parameter Tangency tolerance

C D A

Page 258

M0000464

Programming manual

Chapter 2: General programming notes

The problem of stopping on the point doesn't exist in the passage from the rectilinear profile (first G1 instruction) to the arc of circumference (G3 instruction) which is represented by point A in the figure. In fact, in this case, the angle of tangency does not exceed the value of the machine parameter Tangency tolerance. The same is also true for the points of tangency C and D. N.B. ISO files must end with at least two empty lines. N.B. The action of instruction G103 is cancelled by instruction G102. Below, we show two examples of NC program 1000. Example: 1 : working without tangential axes. #prog 1000 #name Program 1000 :

TOOL ANGLE=VQ0

:

END

Example: 2: working with tangential axes #prog 1000 #name Program 1000 :

AX 3 TO VQ0

:

END

M0000464

Page 259

Chapter 2: General programming notes

Programming manual

Profile by Points By the term “Profile by Points” is meant the type of programming that provides for the use of the ISO G1 instruction, while the G2 and G3 instructions are NOT enabled. In type of programming, the profile is executed with a succession of “brief” linear movements composed of ISO G1 instructions. This type of programming does NOT provide for tool management and, therefore, ISO instructions G40, G41, G42, G43, G44 and G45 are not enabled. Since this is a type of programming that provides for contiguous linear movements, the use of programming with continuous movements (G60) is recommended. Movements subsequent to the one the Numerical Control is executing are loaded in a buffer which permits control of up to 30 “future” movements that the NC must execute in succession. To enable the Numerical Control to execute this type of programming, we must set VB394 to 1. N.B. Also see the documentation on VB394 in the NC programming manual. The “Profile by Points” type of programming with continuous movements (G60) manages the speed of the axes in the point of passage between one movement and the next. If, for example, the NC must follow the following profile Y

C

A

B

D

E

X with the “Profile by Points” type of programming with continuous movement (G60), the speed of the axes is managed at points B, C and D so as to obtain a fluid, “non-jerky” motion. In general, the speed of the axes at the point of passage between two consecutive movements depends: •

On the speed F set by the program (expressed in [mm/min]). The higher the value of speed F set, the greater the change of speed at the point of passage.



On the profile. The greater the angle, expressed in degrees, formed by the directions of the two consecutive movements, the lower the speed between such movements.



On the value of the access parameters “Acceleration time” Tacc and “Deceleration time” Tdec. The higher the value of Tacc and Tdec (low acceleration), the lower the speed between two consecutive movements at the point of passage.

Page 260

M0000464

Programming manual

Chapter 2: General programming notes

N.B. The speed-time graph of an axis has the following shape: Vx

Maximum speed

t Tacc

Tdec

The variation of the axes speeds of the NC is controlled by the speed of the Master axis. In the case in which the NC carries out continuous movements (G60) in the “Profile by Points” type of program, the following would be a representation of the speed-time graphic: N.B. The Master axis is the fictitious axis inside the NC used for the calculation of the trajectory. Vmaster

P2 P1 t T1

T2

The graphic shows the instants in which the passage between one movement and the next occurs (T1 and T2). In these instants, the Numerical Control calculates the passage speed between two consecutive movements so that the acceleration to which the axes are subjected due to the change of the profile is compatible with the acceleration calculated on the basis of the parameters listed previously. The sections in bold represent the changes of speed of the Master axis so as to obtain the calculated speed at the points of passage between one movement and the next.

M0000464

Page 261

Chapter 2: General programming notes

Programming manual

Machine parameter “Acceleration factor between two entities” The value of the speed at points P1 and P2 can be changed using the machine parameter “Acceleration factor between two entities” Kbtw. The default value is 1; the range of possible values is [0.1,10.0]. The following speed-time graphic shows how the speed rend of the Master axis changes in the points of passage between two subsequent movements as a function of the machine parameter “Acceleration factor between two entities” Kbtw.

Vmaster

Q P S R t T1

T2

As in the preceding example, T1 and T2 indicate the instants in which the passage occurs between one movement and the next. In this case, the changes in speed for the two different values of the parameter Ktwb are shown. In this example, the parameters are related in the following manner: Kbtw1 > Kbtw2 where: Kbtw1 Kbtw (section Kbtw2 Kbtw (section

) )

As can be seen in the case in which you uses Kbtw1, the value of the speed in instants T1 and T2 (points P and Q) is greater than with the use of Kbtw2 (points R and S). During the calibration of the Numerical Control, you must evaluate the optimal value to attribute to the machine parameter “Acceleration factor between two bodies” so as to obtain speeds in the point of passage between two contiguous movements that are suitable to the work that you want to execute.

Page 262

M0000464

Programming manual

Chapter 2: General programming notes

Machine parameter “Acceleration factor” The speed trend of the master also depends on the machine parameter “Acceleration factor” Facc. This parameter has no influence on the speed value at the points of passage between two subsequent movements as for the parameter Kbtw, but determines the slope of speed in the sectors of acceleration and deceleration. The machine parameter “Acceleration factor” has a default value equal to 1 (slope not modified); while the range is [0.1,10.0]. The following speed-time graphic of the master axis shows how the slope of speed changes with two different values of the parameter Facc.

Vmaster

Q P T1

T2

t

The above graphic shows the speeds of the master axes for two different values of the parameter Facc. In this example, the parameters are related in the following manner: Facc1 > Facc2 where: Facc1 Facc2

Facc (section Facc (section

) )

As you can see in the case in which we use Facc1, the speed value has a greater slope than with the use of Facc2. This involves more brusque accelerations at the points of passage between two movements and, therefore, greater stresses on the mechanics that carries out the work. Even in this case, as for the parameter Kbtw, during the calibration of the Numerical Control, you must evaluate the optimal value to attribute to the machine parameter “Acceleration factor” so as to obtain a speed profile suitable for the work that you want to execute. So, with “Profile by Points” programming with continuous movements (G60), the proper calibration of machine parameters “Acceleration factor between two entities” and “Acceleration factor” turns out to be essential, based on the considerations made above.

M0000464

Page 263

Chapter 2: General programming notes

Programming manual

We illustrate the example of an ISO file with “Profile by Points” programming. Example: %2 TEST2 M762 {enables 2-axes linear interpolation} G60 {enabling continuous movements} G102 {disables tangency tolerance control (instruction G103)} M93 VB394=1 {enables profile by points} F2000 {interpolated axes speed 2000 mm/min} G0 X30.000 Y40.000 {positioning start work in position X=30 Y=40} G1 X70.000 Y40.000 {sequence of G1 instructions for work with profile by points} G1 X100.000 Y80.000 G1 X130.000 Y40.000 G1 X170.000 Y40.000G1 X170.000 Y70.000 G1 X130.000 Y70.000 G1 X100.000 Y110.000 G1 X70.000 Y70.000 G1 X30.000 Y70.000 G1 X30.000 Y40.000 G0 X0.000 Y0.000 M02 {end of program} The program listed above produces the following work.

H C L

I

G

F

A

B

D

E

At the points of passage (A, B, C …), the Numerical Control makes a check of the speed of the Master axis in conformity with what was said regarding machine parameter “Acceleration factor between two entities” and “Acceleration factor.”

Page 264

M0000464

Programming manual

Chapter 2: General programming notes

ISO instructions • G311 and G312 ISO instruction G311 sets the mode Profile by Points (PPP) and is equivalent to the following sequence of instructions: G90 M766 M93VB394=1 G60 M787 M788 G200A

{absolute coordinates {6-axes interpol. (all axes interpolated) {enables Profile by Points {continuous movement {moves only axes with bit at 1 {does not perform a check of the movement mask (G311) {sets the equivalent stop angle to . { is the machine parameter "tangency tolerance"

N.B: if the firmware does not provide for the Profile by Points mode (PPP), the G311 instruction generates the error –311 Instruction G312; is like instruction G311, but activates the check of the mask of the axes that must move and, between one movement and the other, the mask changes, a stop on point is forced (equivalent to instruction M789). • G216 Instruction G216 allows personalizing and activating an interpolation plane for executing circular interpolations with axes other than those anticipated by the standard planes (XY, ZX and YZ activatable, respectively, by instructions G17, G18 and G19). syntax: G216 [] the last parameter is optional and allows specifying any tangential axis (it will be activated only if the machine parameter 'number tangential axes' is other than 0) example: G216 X A sets axes X (1) and A (7) as the principal axes of the new interpolation plane N.B.: the identifiers of the center of circumference in the configurable plane of interpolation are 'I' and 'J' associated, respectively to the first and second axis of the plane. N.B.: the identifiers of axes 1, 2, 3, 4, 5, 6, 7 and 8 are, respectively, X, Y, Z, U, V, W, A and B

M0000464

Page 265

Chapter 2: General programming notes

Programming manual

example of ISO file that uses the personalized plane of interpolation: (interpolation axes 1 - 6) %40 Test XW G0 X0 Y0 Z0 W0 G17 F500 G2 X100 Y100 I100 J0 H3 {change plane of interpolation G216 X W G3 X0 W100 I0 J0 H3 G1 X50 W50 M02 • G225 Instruction G225 allows defining which axes must be checked to generate a possible stop on point following the change of the movement mask. This instruction has effect only if combined with instruction G312 (interpolation with only G1's and check of the movement mask). example: G312 G225 U enables interpolations with only G1's with check of the mask; if in contiguous movements, the U axis (4) intervenes and then stops or otherwise, a stop on point is generated; whether or not the other axes are involved does not influence the generation of the stop on point. At any rate, control of the change of direction remains enabled, parameterized by the machine parameter 'tangency tolerance' expressed in equivalent degrees, for which, independently of the axes movement mask, a change of equivalent direction that exceeds the value set generates a stop on point. • G221, G222, G223, G224 Instructions G321, G322, G323 and G324, which set the interpolation mode with G1, G2 and G3, are equivalent to the following sequence of instructions: G90 M753 M93VB394=0 G17 G60 G45 M786 M787 M788 M789 G103P1000VQ0

Page 266

{absolute coordinates {2-axes interpolation with G1/G2/G3 {disables profile by points {plane of interpolation XY {continuous movement {tool parallel to the direction of movement {(G323 and G324) moves all the axes {(G321 and G322) moves only axes with bit at 1 {(G321 and G323) doesn't check the mask difference {(G322 and G324) stop on point if mask different {enables check of change of direction

M0000464

Programming manual

Chapter 2: General programming notes

• G220, G221 Instruction G220 and G221 are added to release the axes from the interpolation group example: G221 U V

{releases axes U and V from the interpolation group

M0000464

Page 267

Chapter 2: General programming notes

Programming manual

Use of tools The available instructions related to the management of tools are: TOOL SN (code 41) Tool to the left of the path TOOL DX (code 42) Tool to the right of the path TOOL n (code 74) Sets tool number n TOOL ANGLE = deg (code 75) Sets the tool angle (degrees) They are indicated in the list of available instructions with the symbol �. In linear interpolation, it is necessary to specify the angle of the tool to identify its working point (instruction 75). In circular interpolation, the angle is calculated and updated automatically to allow the tool to remain tangential to the curve. The angle is calculated with respect to the system of reference (see figure 2). Starting from the edge or center of the tool, it considers the ideal vector that go towards the working point: for the angle, it takes the one that forms this vector, oriented in the system of reference. For example, the first tool in the figure forms an angle of 0° and the second of -90°. Y 90°

180°



X

Figure 2 Y

Y -90°

-90° 0° X

X

Instructions 41 and 42 allow setting the position of the tool with respect to the direction of advancement. Instruction 74 allows specifying the tool in use. The length (or radius) of the tools is set in the Tool Parametes pages (option 7 of the Main Menu). On power-up, tool number 1 is automatically set. Attention! In programs that use interpolation, do not modify Position Variable VQ98 (parameter Tool length) and, if necessary, manage VQ99 (increment decrement tool). Variable VB270 allows choosing the mode of displaying the coordinates: 0 the positions of the axes are displayed 1 the coordinates of the working point of the tool are displayed Example 1 Page 268

M0000464

Programming manual

Chapter 2: General programming notes

Now, let's look at a program that allows realizing the work in fig. 3.

Figure 3

: : : : : : : : : : : : : : : : : : :

AX 1 TO 1150 AX 2 TO 900 FXY 10 TOOL 2 TOOL ANGLE = 90 G41 G1 X 1150 Y 1200 NO WAIT AX G1 X 450 Y 1200 G3 X150 Y900 I450 J900 G1 X 150 Y 500.000 G3 X450 Y200 I450 J500 G1 X 1150 Y 200 G3 X1450 Y500 I1150 J500 G1 X 1450 Y 900 G3 X1150 Y1200 I1150 J900 WAIT AX WAIT AX 1 IN QUOTE WAIT AX 2 IN QUOTE G1 X 1150 Y 1100 AX 1 TO 0.000 AX 2 TO 0.000

//Sets working speed: 10 mm/sec // Use tool no. 2 //Tool angle = 90 degrees //Tool to the left of the path //Brings tool to point A //Disables waiting for axes in position //Brings the tool to point B

//Enables waiting for axes in position //Waits for the completion of the work //Distances the tool //Brings the axes to 0

As usual, to obtain continuous interpolted movements, instead of NO WAIT AX you could use instruction CONT MOVE, inserting it at step 7. In that case, step 17, relative to waiting for the completion of the work, would disappear and step 16 (WAIT AX) would become: : NO CONT MOVE //Disables continuous interpolated movements Example 2 M0000464

Page 269

Chapter 2: General programming notes

Programming manual

Suppose we want to perform the work in figure 4 (section A-B-C). Y

50

A

B

C 0

X

100

Figure 4

In this case, you cannot use instruction NO WAIT AX,since the connections are not circular and you cannot obtain continuous work. Supposing that we are already positioned at A, the steps having to do with the work are: : : : : : :

FX 10 TOOL 5 TOOL ANGLE = - 90 G41 VQ1 = 100 + VQ98 G1 X VQ1 Y 50

:

TOOL ANGLE = 180

:

G1 X 100 Y 0

//Sets speed of work: 10 mm/sec // Use tool no. 5 //Tool angle = - 90 degrees //Tool the right of the path //Final position (axis 1) of point B //Brings the tool to point B //Tool angle = 180 degrees: along the section //B-C the tool is oriented in a different way //with respect to section A-B //Brings the tool to point C

As you can see from the program (at step 6), it is necessary to take into account the length of the tool to position it at the correct position. For example, for working section A-B, it is necessary to arrive not in position 100 (axis 1) but 100+VQ98, i.e., incrementing the section by the length of the tool for the purpose of, then, allowing its correct positioning for working section B-C (as we said, Position Variable VQ98 contains the value relative to the length or radius of the tool). Similarly, if the work were also to continue in section C-O, it would be necessary to take it into account in the position of the second axis and make it arrive at 0 - VQ98. The steps relative to this case would be: : :

Page 270

VQ1 = 0.000 - VQ98 G1 X 100 Y VQ1

//Final position (axis 2) of point C //Brings the tool to point C

M0000464

Programming manual

Chapter 2: General programming notes

Temporary transmission of ISO programs A program in ISO language can be sent from a PC to the NC without being stored on the NC (temporary program). The management of the transmission of a temporary program is enabled on the NC by setting variable VB_USE_TX_PRG (VB385) to 1. When during the automatic cycle, the NC detects a request to execute a program not present in memory, if the management of the transmission of programs from a PC is enabled (VB_USE_TX_PRG to 1), set VB_WAIT_TX_PRG (VB393) to 1 and write the number of the program being waited for in VN_TX_WAIT_ PRG_NUM (VN338). A suitable PLC logic will have to transform the requests of the NC into requests to the PC (management of variables VB_START_TX, VN_TX_PRG_NUM, VN_TX_STEP_H and VN_TX_STEP_L). The PC must read VB_START_TX (VB386) to detect the begin transmission request. VN_TX_PRG_NUM (VN310) contains the number of the requested program; VN_TX_STEP_H (VN314) and VN_TX_STEP_L (VN315) contain the number of the starting step: (num. step = VN_TX_STEP_H × 65536 + VN_TX_STEP_L). If VN_TX_PRG_NUM contains a valid program number (1-9999), the name of the file to send will be .ISO (e.g., 35.ISO); if VN_TX_PRG_NUM contains the value 0, the name of the file to be sent will be contained in a descriptive file suitably updated by the PC during the selection of the program by the operator. If the number of the starting step is greater than 0, the PC will send the ISO program starting from the line of the specified line of the file. The program must be sent in 128-byte data packets preceded by 2 bytes that define the code for sending a temporary program ('4' and 16); the second byte must also contain any flags of First_Packet (bit 6) and Last_Packet (bit 5). Each send by the PC that does not fill the exchange buffer receives the response COM_READY ('O'). If the exchange buffer is filled, the NC sets VB_TX_BUF_FULL (VB387) to 1 and responds COM_BUSY ('o'); subsequent sends with buffer full will have a response of NC ERROR ('E') with code -2. The PC must read VB_TX_BUF_FULL at 0 before making new transmissions. VB_TX_IN_PR (VB388) is at 1 during the entire transmission phase; the NC can set it to 0 to request the interruption of the transmission; sending packets after the first with VB_TX_IN_PR in the 0 state will have a response of ERROR ('E') with code -1. At the completion of the transmission of the program (last packet) the NC sets VB_END_TX (VB389) to 1.

M0000464

Page 271

Chapter 2: General programming notes

Programming manual

Example of PLC logic for temporary transmission

N.B.: With this section we set the restart of the program from the beginning only in the cases of Automatic Execution End and Selection of a new program to execute. If we wish to restart with other conditions (keys, inputs, etc.) it is sufficient to add them to the input of the OR function.

Page 272

M0000464

Programming manual

Chapter 2: General programming notes

M0000464

Page 273

Chapter 2: General programming notes

Programming manual

It is also necessary to add the following delays in the management of VB256 (START):

N.B. In this example, several support variables are used (VN200, VN201 and VB600, VB601, 603,604,605). In the event you use this example in your own PLC program, you need to check that these variables are not already used for other purposes.

Page 274

M0000464

Programming manual

Chapter 2: General programming notes

Programming examples Examples of logical external decoding Suppose we want to drive a determined Numerical Control program by means of external logic (this is only one example of programming and, in fact, the PLC can drive the execution of the program whose number is contained in VN257 by setting VB265 to 1), using a group of 5 inputs (such as: inputs from 10 to 14). Suppose that input 10 is assigned the lowest weight (weight = 20 = 1) and input 14, the highest weight (weight = 24 = 16). The number of the program is contained in Numeric Variable VN0, which is initially set to 31 and, for every input found low, the relative weight of the input is subtracted from this variable. If all the inputs are low (the number 0 is passed), the program terminates without driving any program 1, otherwise it jumps to program VN0. #prog 1000 #name Pippo : : : :LB1 : :LB2 : :LB3 : :LB4 : :LB5 : :End END

VN0 = 31 IF IN 10 GOTO LB1 VN0 = VN0 - 1 IF IN 11 GOTO LB2 VN0 = VN0 - 2 IF IN 12 GOTO LB3 VN0 = VN0 - 4 IF IN 13 GOTO LB4 VN0 = VN0 - 8 IF IN 14 GOTO LB5 VN0 = VN0 - 16 IF VN0 = 0 GOTO End JMP PROG VN0

M0000464

Page 275

Chapter 2: General programming notes

Programming manual

Example of palletization Now, let's look at a program example having to do with palletization. Suppose we want to also drive the third axis. In the following program, first axis X is scanned, then Y and finally Z, i.e., it first moves in the XY plane and, once access to this plane is exhausted, we move the higher (or lower) one.

Figure 5

Figure 6

Page 276

M0000464

Programming manual

Chapter 2: General programming notes

Program no. 11 is a subroutine for defining palletization which is to say that it defines the number of pieces to scan along the three axes, the initial levels of the three axes and the increments between the two positions for each axes (for the meaning of the symbols, also see fig.5 and fig.6). #prog 11 #Name DEFINITIONS : : : : : : : : : :

VN51 = NUM_X VN52 = NUM_Y VN53 = NUM_Z VQ21 = X0 VQ22 = Y0 VQ23 = Z0 VQ31 = DELTA_X VQ32 = DELTA_Y VQ33 = DELTA_Z JMP PROG 14

//NUM_X is the Number pieces along X //NUM_Y is the Number pieces along Y //NUM_Z is the Number pieces along Z //X0 is the initial position for the axis X //Y0 is the initial position for axis Y //Z0 is the initial position for axis Z

//Jumps to the main program

Program no. 12 is a subroutine that resets the variables, i.e., the Numeric Variables used as indexes of the movements made along the three axes, of the flag indicating the end of palletization and the Position Variables indicating the current position of the three axes. In our program the initialization is conditioned by the presence of input 1 OFF. #prog 12 #Name INITIALIZATION : : : : : : : : :End

IF IN VN151 VN152 VN153 VB159 VQ151 VQ152 VQ153 END

1 = = = = = = =

GOTO End 0 0 0 0 VQ21 VQ22 VQ23

//If input 1 present doesn't initialize //ACT_X (current index along X) //ACT_Y (current index along Y) //ACT_Z (current index along Z) //FLAG: 1 = Palletization terminated //POS_X: current position along X (= X0) // POS_Y: current position along Y (= Y0) //POS_Z: current position along Z (= Z0)

M0000464

Page 277

Chapter 2: General programming notes

Programming manual

Program no. 13 is a subroutine for positioning at the current point. Suppose that we first want to scan the pieces on the XY plane (first along X and then along Y) and then on the XY plane at an incremented Position Z. This subroutine then executes the suitable adjustements of the Positions of the three axes and the control if work is finished along one or more axes. In the case of palletization terminated, it returns the relative flag (VB159) set to 1. #prog 13 #Name POSITIONINGS :

: : : : : : : : : : : : : : :End

AX 1 TO VQ151 AX 2 TO VQ152 AX 3 TO VQ153 INCR VN151 VQ151 = VQ151 + IF VN151 < VN51 INCR VN152 VQ152 = VQ152 + VN151 = 0 VQ151 = VQ21 IF VN152 < VN52 INCR VN153 VQ153 = VQ153 + VN152 = 0 VQ152 = VQ22 IF VN153 < VN53 VB159 = 1 END

VQ31 GOTO VQ32

GOTO VQ33

GOTO

//Positions X to current Position //Positions Y to current level //Positions Z to current level //Increments ACT_X (current x index) //POS_X = POS_X + DELTA_X End //If ACT_X < NUM_X I exit //Increments ACT_Y (current Y index) //POS_Y = POS_Y + DELTA_Y // Reset ACT_X (to pass to scanning 2nd line) //POS_X = XO End //If ACT_Y < NUM_Y I exit //Increments ACT_Z (current Z index) //POS_Z = POS_Z + DELTA_Z //Reset ACT_Y (to begin another plane) //POS_Y = YO End //If ACT_Z < NUM_Z I exit //Palletization ended: I set the relative flag

What follows is the main, i.e., the main program that drives all the various subroutines. At step 1, the variables are initialized, followed by the steps (not shown here) that manage the suitable operations (the use of the tools, for example), then the positioning to the current point is performed and other appropriate operations. If palletization is not finished, it resumes the cycle again. #prog 14 #name MAIN : :Loop

GOSUB 12 ...

//Variable initialization //Appropriate operations

:

GOSUB 13 ...

//Positioning at current point //Appropriate operations

: :

IF VB159 = 0 GOTO Loop//Resume cycle if palletization not finished END

Page 278

M0000464

Programming Manual

Chapter 3: Variables

M0000464

Page 279

Chapter 3: Variables

Programming Manual

Chapter 3

Variables Variables are available in the Numerical Control that can be used in programming the NC and PLC. In particular, here we are will analyze in detail the Binary and Numeric Variables managed by the PLC to dialogue with/control the Numerical Control. These variables allow directly managing several functions, without having to make recourse to inputs, thus allowing their use for other purposes.

Page 280

M0000464

Programming Manual

Chapter 3: Variables

Numerical Control Variables

(from 4.37 firmware version) Variables are available in the Numerical Control that can be used in programming the NC and PLC. These variables allow directly managing several functions, without having to make recourse to inputs, thus allowing their use for other purposes. In particular, here we will analyze in detail the Binary , Numeric and Position Variables managed by the PLC to dialogue with/control the Numerical Control.

All the VB, VN and VQ variables can be used by either the NC or the PLC, by keeping in mind that the variables higher than 255 can only be used by the NC through assignment instructions. Example: VB360 =1 IF VB360 = 1 GOTO LABEL Example: VQ10 = VQ280 AX1 TO VQ280

CORRECT WRONG CORRECT WRONG

A part of the variables that already have predefined functions that can be very useful in programming. In other words, they are already dedicated to determined tasks and cannot be used as if they were free support variables for programming. Gradually, as new functions are implemented, contiguous variables to those already used are dedicated to system purposes. So, if you need free variables for programming the PLC, we recommend that you do not use those close to the last ones used so that in the future you can be able to freely use new firmware versions (for example, we recommend using VBs from 600 on and VNs from 600 on). N.B. There are also three Position Variables dedicated to particular functions but that are only used in the case in which you use tool management in the program. The potential that these variables offer is significant and it will become clear in the pages that follow; here, at any rate, it will be worth recalling that, if these variables are used to manage the NC, the inputs remain free (and are thus useable for other purposes) that would otherwise have served for those particular functions. Here, below, we show all the Binary, Numeric and Position Variables available with dedicated functions, giving a brief description of the functionality of each one. N.B. In the event that the numerical control has less than 8 axes, the variables relative to the axes that are not available are to be considered reserved and, therefore, cannot be used.

M0000464

Page 281

Chapter 3: Variables

Programming Manual

Structure of the variables with DOS PLC Binary Variables VB0 VB1

NC only NC-PLC

VB1 VB80 VB100 Buffered var. VB101 Alarm var. VB255

VB255

VB751

The VB from 101 to 255 if they are not associated to messages can be use as normal variables. N.B.: they are not buffered.

PLC only Buffered variables

VB1024

Numerical Variables VN0

NC only

VN50

VN100

Buffered variables

VN255 VN256

VN464

Index first VN shared betwenn CN and PLC = 50 from firmware version 3.41 of 10-12-97 (were 150)

Index first VN buffered = 100 from firmware version 3.41 of 10-12-97 NC-PLC (were 210) N. total VN = 304 from firmware version 3.3 of 08-10-96 336 from firmware version 3.18 of 18-02-97 352 from firmware version 3.28 of 14-05-97 PLC only 368 from firmware version 3.32 of 08-07-97 432 from firmware version 3.41 of 10-12-97 464 from firmware version 3.58b of 07-07-99

Position Variables VQ0 VQ98 VQ99

Riserved variables

NC only

VQ150

VQ255

Page 282

Buffered variables

M0000464

Programming Manual

Chapter 3: Variables

Structure of the variables for Siax 80-100-110110Light-150-300 N.B. Structure of the variables using PLC LADDER. VB0

Binary Variables VB0 VB79 VB80 VB100 VB101

VB255 VB256 VB600

VB255

Reserved

Batt. buff. var. Alarm Var.

If not associated to messages, VBs from 101 to 255 can be used as normal variables. N.B. they are not battery buffered

VB750 VB751

Battery Buffered Variables VB1024

Numeric Variables VN0 VN99 VN100

VN255 VN256

Battery Buffered Variables Reserved

VN600 VN1198

Battery Buffered Variables

VN1454

Position Variables VQ0 VQ97-VQ99

Reserved

VQ149 VQ150 VQ256÷VQ257 Reserved

Battery Buffered Variables

VQ303

M0000464

Page 283

Chapter 3: Variables

Programming Manual

Structure of the variables for Siax100 Plus N.B. Structure of the variables using PLC LADDER.

VB0

Binary Variables VB0 VB79 VB80 VB100 VB101

VB255 VB256 VB600

VB255

Reserved

VB750 VB751

Battery Buffered Variables VB4095

Numeric Variables VN0

VN99 VN100 VN255 VN256

Battery Buffered Variables Reserved

VN600 VN1198

Battery Buffered Variables

VN4095

Position Variables VQ0 VQ97÷VQ99

Reserved

VQ149 VQ150 VQ256÷257 Reserved

Battery Buffered Variables

VQ8191

Page 284

M0000464

Batt. buff. var. Alarm Var.

If not associated to messages, VBs from 101 to 255 can be used as normal variables. N.B. they are not battery buffered

Programming Manual

Chapter 3: Variables

Structure of the variables for Siax 200 N.B. Structure of the variables using PLC LADDER. VB0

Binary Variables VB0 VB79 VB80 VB100 VB101

VB255 VB256 VB600

VB255

Reserved

Batt. buff. var. Alarm Var.

If not associated to messages, VBs from 101 to 255 can be used as normal variables. N.B. they are not battery buffered

VB750 VB751

Battery Buffered Variables VB4095

Numeric Variables VN0 VN99 VN100

VN255 VN256

Battery Buffered Variables Reserved Variables

VN600 VN3840

Battery Buffered Variables

VN4095

Position Variables VQ0 VQ97-VQ99

Reserved

VQ149 VQ150 VQ256÷VQ257 Reserved

Battery Buffered Variables

VQ8191

M0000464

Page 285

Chapter 3: Variables

Programming Manual

Binary Variables with dedicated functions

L

L

L L L L L L L L L L L L

L L L L L L L L

VB256 VB257 VB258 VB259 VB260 VB261 VB262 VB263 VB264 VB265 VB266 VB267 VB268 VB269 VB270 VB271 VB272 VB273 VB274 VB275 VB276 VB277 VB278 VB279 VB280 VB281 VB282 VB283 VB284 VB285 VB286 VB287 VB288 VB289 VB290 VB291 VB292 VB293 VB294 VB295 VB296 VB297 VB298 VB299 VB300 VB301 VB302 VB303 VB304 VB305 VB306 VB307 VB308 VB309 VB310 VB311

Page 286

Start Stop JOG+ JOGEmergency Indicates if automatic is running Suspends execution of automatic Suspends automatic disabling axis movement Makes a step of aut. at each neg. trans. on VB262 Sets as prog. no. that contained in VN257 Enables manual multiple movement Indicates end excution automatic program Access key Block access to Variable Setting (F1) Movement in tool coordinates Self-learning Interpolated self-learning Signals NC in “Variable Setting” (F1) If = 0 NC in Local, if = 1 NC in Remote If = 0 NC in Manual, if = 1 NC in Automatic NC in Main Menu NC in Automatic NC in Manual NC in Parameter Acquisition NC in Test NC in Speed Test NC in Semi-automatic NC in Single State NC in Resetting NC in Editor NC in Emergency (read only) Enabling Axes Diabling movement axis 1 Diabling movement axis 2 Diabling movement axis 3 Diabling movement axis 4 Diabling movement axis 5 Diabling movement axis 6 Diabling movement axis 7 Diabling movement axis 8 Selec. axis 1 and JOG+ in multiple man. movement Selec. axis 2 and JOG+ in multiple man. movement Selec. axis 3 and JOG+ in multiple man. movement Selec. axis 4 and JOG+ in multiple man. movement Selec. axis 5 and JOG+ in multiple man. movement Selec. axis 6 and JOG+ in multiple man. movement Selec. axis 7 and JOG+ in multiple man. movement Selec. axis 8 and JOG+ in multiple man. movement Axis 1 in position Axis 2 in position Axis 3 in position Axis 4 in position Axis 5 in position Axis 6 in position Axis 7 in position Axis 8 in position

M0000464

VB312 VB313 VB314 VB315 VB316 VB317 VB318 VB319 VB320 VB321 VB322 VB323 VB324 VB325 VB326 VB327 VB328 VB329 VB330 VB331 VB332 VB333 VB334 VB335 VB336 VB337 VB338 VB339 VB340 VB341 VB342 VB343 VB344 VB345 VB346 VB347 VB348 VB349 VB350 VB351 VB352 VB353 VB354 VB355 VB356 VB357 VB358 VB359 VB360 VB361 VB362 VB363 VB364 VB365 VB366 VB367

Axis 1 zeroed Axis 2 zeroed Axis 3 zeroed Axis 4 zeroed Axis 5 zeroed Axis 6 zeroed Axis 7 zeroed Axis 8 zeroed Disables axis 1 servo Disables axis 2 servo Disables axis 3 servo Disables axis 4 servo Disables axis 5 servo Disables axis 6 servo Disables axis 7 servo Disables axis 8 servo Sets axis 1 encoder 0 Sets axis 2 encoder 0 Sets axis 3 encoder 0 Sets axis 4 encoder 0 Sets axis 5 encoder 0 Sets axis 6 encoder 0 Sets axis 7 encoder 0 Sets axis 8 encoder 0 JOG- in multiple man. movement (axis 1) JOG- in multiple man. movement (axis 2) JOG- in multiple man. movement (axis 3) JOG- in multiple man. movement (axis 4) JOG- in multiple man. movement (axis 5) JOG- in multiple man. movement (axis 6) JOG- in multiple man. movement (axis 7) JOG- in multiple man. movement (axis 8) Delays the departure of axis 1 while remains 1 Delays the departure of axis 2 while remains 1 Delays the departure of axis 3 while remains 1 Delays the departure of axis 4 while remains 1 Delays the departure of axis 5 while remains 1 Delays the departure of axis 6 while remains 1 Delays the departure of axis 7 while remains 1 Delays the departure of axis 8 while remains 1 Enables IRQ TPU encoder 1 Enables IRQ TPU encoder 2 Enables IRQ TPU encoder 3 Enables IRQ TPU encoder 4 Reserved Reserved Reserved Reserved Enables axis 1 to follow the encoder in VN284 Enables axis 2 to follow the encoder in VN285 Enables axis 3 to follow the encoder in VN286 Enables axis 4 to follow the encoder in VN287 Enables axis 5 to follow the encoder in VN288 Enables axis 6 to follow the encoder in VN289 Enables axis 7 to follow the encoder in VN290 Enables axis 8 to follow the encoder in VN291

Programming Manual VB368 VB369 VB370 VB371 VB372 VB373 VB374 VB375 VB376 VB377 VB378 VB379 VB380 VB381 VB382 VB383 VB384 VB385 VB386 VB387 VB388 VB389 VB390 VB391 VB392 VB393 VB394 VB395 VB396 VB397 VB398 VB399 VB400 VB401 VB402 VB403 VB404 VB405 VB406 VB407 VB408 VB409 L VB410 L VB411 VB412 VB413 VB414 VB415 VB416 VB417 VB418 VB419 VB420 VB421 VB422 VB423

Chapter 3: Variables

At each rising front: data inserted in input At each rising front data extracted in output Data input: input value of the shift register Data output: the output value of the shift register If = 1, all shift register data is zeroed 1 = in F1 & auto. run access to all programs Setting active origin (contained in VN306) Origin acquisition (contained in VN305) Acquisition position origin axis 1 Acquisition position origin axis 2 Acquisition position origin axis 3 Acquisition position origin axis 4 Acquisition position origin axis 5 Acquisition position origin axis 6 Acquisition position origin axis 7 Acquisition position origin axis 8 Enables continuous movements Program management from PC Program management from PC Program management from PC Program management from PC Program management from PC Enables F3 to see active processes If = 1 disables set program in F1 Reverses direction arcs Program management from PC Enables Profile by Points (G1) Restarts program from step 1 Disales speed setting in ISO file Signals program change by PC Value read in self-learning from F1-VB271 Allows setting automatic page Displays alarms on last line Disables display after Reserved In F1 sets current ax position In multiple manual sets incremental positions In F1 disables modify var Enables self-learning speed Enables modem management Enables movement storage Enables RETRACE backwards Enables RETRACE forward RETRACE in progress Next movement exists Enables rotation and translation Acquires origin angle Signals change program from NC NC selected in RS422 in multi-nc Centering point in self-learning Arc 0 = no key pressed Axes phase in VN348-351 Disables output management by PLC Requests confirms data storage in F1 Enables functions for rotating table (dedicated FW) Axes positions with origins in self-learning Enables F6 for access parameters from automatic

VB424 VB425 VB426 VB427 VB428 VB429 VB430 VB431 VB432 VB433 VB434 VB435 VB436 VB437 VB438 VB439 VB440 VB441 VB442 VB443 VB444 VB445 VB446 VB447 VB448 VB449 VB450 VB451 VB452 VB453 VB454 VB455 VB456 VB457 VB458 VB459 VB460 VB461 VB462 VB463 VB464 VB465 VB466 VB467 VB468 VB469 VB470 VB471 VB472 VB473 VB474 VB475 VB476 VB477 VB478 VB479

VB enabling non-standard password VB Emergency Reset VB initialization with Main errors in Single State VB Single State output VB Start Automatic in Single State VB Start Test Status in Single State VB Start Speed Test in Single State VB Start Semi-automatic in Single State VB Start resetting in Single State VB activation Single State VB disable Jog in Single State (if no jog active) VB disable Change page in Single State VB initializes objective position in Single State VB enable set Errors in multiple manual VB objective position in multiple manual VB automatic execution with CANopen errors VB Profibus management disable

"L" indicates read-only variables.

M0000464

Page 287

Chapter 3: Variables

Programming Manual

Numeric Variables with dedicated functions VN256 VN257 VN258 L VN259 L L L L L L L L

VN260 VN261 VN262 VN263 VN264 VN265 VN266 VN267 VN268 VN269 VN270 VN271 VN272 VN273 VN274 VN275 VN276 VN277 VN278 VN279 VN280 VN281 VN282 VN283 VN284 VN285 VN286 VN287 VN288 VN289 VN290 VN291 VN292 VN293 VN294 VN295 VN296 VN297 VN298 VN299 VN300 VN301 VN302 VN303 VN304 VN305

Page 288

Contains speed override (enabled by par = 1) Contains the number of the program to execute Contains the code of the last key pressed Flags of axes in movement (bit 0 = axis1, bit 1= axis2) Contains position axis 1 (in mm) Contains position axis 2 (in mm) Contains position axis 3 (in mm) Contains position axis 4 (in mm) Contains position axis 5 (in mm) Contains position axis 6 (in mm) Contains position axis 7 (in mm) Contains position axis 8 (in mm) Counter IRQ TPU encoder 1 Counter IRQ TPU encoder 2 Counter IRQ TPU encoder 3 Counter IRQ TPU encoder 4 Axes ON/OFF with play recovery disabled Axes ON/OFF with permanent intertia space Axes with Rollover enabled Reserved Trk.fact.(x1000 with sign) encoder VN284 (mode 0) Tracking factor numerator (mode 1 and 4) Trk.fact.(x1000 with sign) encoder VN285 (mode 0) Tracking factor numerator (mode 1 and 4) Trk.fact.(x1000 with sign) encoder VN286 (mode 0) Tracking factor numerator (mode 1 and 4) Trk.fact.(x1000 with sign) encoder VN287 (mode 0) Tracking factor numerator (mode 1 and 4) Trk.fact.(x1000 with sign) encoder VN288 (mode 0) Tracking factor numerator (mode 1 and 4) Trk.fact.(x1000 with sign) encoder VN289 (mode 0) Tracking factor numerator (mode 1 and 4) Trk.fact.(x1000 with sign) encoder VN290 (mode 0) Tracking factor numerator (mode 1 and 4) Trk.fact.(x1000 with sign) encoder VN291 (mode 0) Tracking factor numerator (mode 1 and 4) No. of tracking encoder enabled by VB360 No. of tracking encoder enabled by VB361 No. of tracking encoder enabled by VB362 No. of tracking encoder enabled by VB363 No. of tracking encoder enabled by VB364 No. of tracking encoder enabled by VB365 No. of tracking encoder enabled by VB366 No. of tracking encoder enabled by VB367 Override independent axis 1 (enabled by param.=2) Override independent axis 2 (enabled by param.=2) Override independent axis 3 (enabled by param.=2) Override independent axis 4 (enabled by param.=2) Override independent axis 5 (enabled by param.=2) Override independent axis 6 (enabled by param.=2) Override independent axis 7 (enabled by param.=2) Override independent axis 8 (enabled by param.=2) No. data present in shift register No. START program VQ index axis positions in emergency VQ index interpolation speed set (10 mm/min) VQ index last position reached with stop No. origin to acquire (with VB375 high)

VN306 VN307 VN308 L VN309

No. origin to be set (with VB374 high) No. active (current) origin No. main program No. current program

VN310 VN311 L VN312 L VN313 VN314 VN315 VN316 VN317 VN318 VN319 VN320 VN321 VN322 VN323 VN324 VN325 VN326

No. program to be transmitted Index 1st VN that contains the position error Step number in execution (current) H Step number in execution (current) L Step number begin TX (H) Step number begin TX (L) Axis 1 denomination tracking factor (if mode 1 and 4) Axis 2 denomination tracking factor (if mode 1 and 4) Axis 3 denomination tracking factor (if mode 1 and 4) Axis 4 denomination tracking factor (if mode 1 and 4) Axis 5 denomination tracking factor (if mode 1 and 4) Axis 6 denomination tracking factor (if mode 1 and 4) Axis 7 denomination tracking factor (if mode 1 and 4) Axis 8 denomination tracking factor (if mode 1 and 4) Axis 1: tracking mode [0-1] Axis 2: tracking mode [0-1] Axis 3: tracking mode [0-1]

VN327 Axis 4: tracking mode [0-1] VN328 Axis 5: tracking mode [0-1] VN329 Axis 6: tracking mode [0-1] VN330 Axis 7: tracking mode [0-1] VN331 Axis 8: tracking mode [0-1] VN332 Contains the index of the 1st VQ offset origin acquisition VN333 Contains the index of the 1st VQ scale factor L VN334 Contains the index of the emergency error L VN335 Contains the parameter of the emergency error VN336 Contains the number of the active program in F1 VN337 Contains VQ index last position (tool coord.) VN338 Program number waiting to be received VN339 Contains the number of the selected axis VN340 VQ index speed set-VB396 VN341 Value read learning by F1-VB271 VN342 Starting program numer in F1 L VN343 Page displayed in Automatic VN344 For setting page in Automatic L VN345 NC error index L VN346 NC error parameter VN347 Zeros only the specified axis VN348 Self-learning speed axis 1 – Phase axis1 VN349 Self-learning speed axis 2 – Phase axis2 VN350 Self-learning speed axis 3 – Phase axis3 VN351 Self-learning speed axis 4 – Phase axis4 VN352 Self-learning speed axis 5 – Phase axis5 VN353 Self-learning speed axis 6 – Phase axis6 VN354 Self-learning speed axis 7 – Phase axis7 VN355 Self-learning speed axis 8 – Phase axis8

M0000464

Programming Manual VN356 L VN357 VN358 VN359 L VN360 L VN361 VN362 VN363 VN364 VN365 VN366 VN367 VN368 VN369 VN370 VN371 VN372 VN373 VN374 VN375 VN376 VN377 VN378 VN379 VN380 VN381 VN382 VN383 VN384 VN385 VN386 VN387 VN388 VN389 VN390 VN391 VN392 VN393 VN394 VN395 VN396 VN397 VN398 VN399 VN400 VN401 VN402 VN403 VN404 VN405 VN406 VN407 VN408 VN409 VN410

Chapter 3: Variables

Instantaneous feed mm/min. Connection status Command and serial line VB index ISO operator message Flag axes in proximity threshold Type of interpolated movement Code of profile sector to self-learn Residual seconds in wait timer 1st VQ containing axis positions Bit variable, curr. ax position in MmRif Instruc. code with 1 par. to be generated in selflearn. Instruc. par. generated in self-learning Index First VN for reading a VQ VQ index read from two VNs Disables specified function keys Threshold of begin ISO file exectuion transmitted from PC Date and time format (dedicated FW) Date and time management (dedicated FW) Type of connection (dedicated FW) VN_MAIN_ERR_CODE – Main Error Code ID active page (user page) Base address code user page Index first VQ settable objective position ID object in input (user page) Axis position acqusition – MODE | No. Axis VQ index acquisition axis position Enables user program management – index First VN Simulated code key update period variables user page [tick] VN_MODE_PRG_LIST Number current language (from 1) VN_DISAB_STD_VIEW (bit variable) VN_LAST_PRG_REC VN_TIME_DATE_IDX VN_DATA_BARC_NUM VN_BARC_STATO VN_COPY_VA VN_DATA_CN_MASTER_NUM VN_CN_MASTER_STATO VN_CN_MASTER_NUM_SENT VN_FASE_AZZERAMENTO VN_DISAB_NG_COP VN_MODBUS_COM VN_MODBUS_COM_MODE VN_STD_STATE_NUM VN_OMNI_OPER VN_OM_PRG_NUM VN_OM_TSTVEL_AX_NUM VN_EDIT2 VN_PRG_NUM_TO_EDIT VN_FIRST_PRG_LIST VN_LAST_PRG_LIST VN_PRG_BASE_LIST VN_COP_WARN_ERR VN_OBJ_DATA_LIST

VN411 VN412 VN413 VN414 VN415 VN416 VN417 VN418 VN419 VN420 VN421

VN_PAGE_MODE VN_PALM_PUT_KEY VN_CONF_ISTR VN_EMRG_ERR_CODE VN_EMRG_ERR_AX VN_CONF_EDIT VN_DATA_EDIT_NUM VN_MENU_FUN_CODE VN_PRESET_CN_PASSW VN_CNT_RTC_FULL

VN422 VN423 VN424 VN425 VN426 VN427 VN428 VN429 VN430 VN431 VN432 VN433 VN434 VN435 VN436 VN437 VN438 VN439 VN440 VN441 VN442 VN443 VN444 VN445 VN446 VN447 VN448 VN449 VN450 VN451 VN452 VN453 VN454 VN455 VN456 VN457 VN458 VN459 VN460 VN461 VN462 VN463 VN464 VN465

"L" indicates read-only variables.

M0000464

Page 289

Chapter 3: Variables

Programming Manual

Position Variables with dedicated functions VQ97* VQ98* VQ99* VQ256 VQ257

Contains the value, in mm, of the circular connection Contains tool length Contains tool increase/decrease Used for the selection of functions on the standard menus from the PLC. Used for the selection of functions on the standard menus of the palm computer from the PLC.

N.B. These VQs are only used in the event in which you are using tool management in the program, for use call Sipro technical office.. *

Page 290

M0000464

Programming Manual

Chapter 3: Variables

Binary Variables with dedicated functins Following are describe Binary Variables with dedicated functions.



Notations read only variables (its is possible to write a value in these variables but it has no effect).

M0000464

Page 291

Chapter 3: Variables

VB256

Programming Manual

VB_START

If set to 1, starts the execution of the Automatic cycle. To begin execution of Automatic, it is sufficient to provide an impulse (transition 0-1-0) in VB256. In this way, it begins the program specified in the Automatic page (Automatic Cycle menu selection on the Main Menu of the NC). N.B. See the explanation of the Automatic cycle in chapter 6 of the programming manual. The transition on VB256 is performed by the PLC. 1 = START (it is equivalent to input START). In some controls (Siax 300 and Siax 150) digital input 1 is associated to the [START] key of the Numerical Control. So using the PLC logic, it is easy to associate the event of pressing the [START] key to VB256 (as explained in chapter 7 of the programming manual). In some others (Siax 110 and Remote Keyboard) digital input 1 is not associated to the [START] key, the pressing of which causes, instead, the sending of a code to the control (on VN258). N.B. See documentation paragraph Key Codes and paragraph Automatic in the programming manual.

VB257

VB_STOP

1 = STOP If set to 1, causes a stop of the Automatic cycle or the movement in progress (such as the test positioning function). To stop the execution of the program in Automtic, just provide an impulse (transition 0-1) in VB257. In this way, the execution program is interrupted at the step at which it is found. N.B. See the explanation of the Automatic cycle in chapter 7 of the programming manual. . The transition on VB257 is performed by the PLC. In some controls (Siax 300 and Siax 150) digital input 2 is associated to the [Stop] key of the Numerical Control. So, using the PLC logic, it is easy to associate the event of pressing the [Stop] key to VB257 (as explained in chapter 7 of the programming manual).

Page 292

M0000464

Programming Manual

VB258

Chapter 3: Variables

VB_JOG_P

1 = JOG+. If set to 1, VB258 forces the manual movement of the selected axis. The management of the 0-1 transition on VB258 is performed by the PLC. The Numerical Control allows the manual movement of the axes. Normally, the movement is associated to the keys [JOG+], forward axis movement, and [JOG-], backward axis movement. N.B. See the explanation of the Manual cycle in chapter 6 of the programming manual. . The transition on VB258 is performed by the PLC. In some controls (Siax 300 and Siax 150) digital input 3 is associated to the [JOG+] key of the Numerical Control. So, using the PLC logic, it is easy to associate the event of pressing the [JOG+] key to VB258 (as explained in chapter 6 of the programming manual).

VB259

VB_JOG_M

1 = JOG-. If set to 1, VB259 forces the manual movement of the selected axis. The management of the 0-1 transition on VB259 is performed by the PLC. The Numerical Control allows the manual movement of the axes. Normally, the movement is associated to the keys [JOG+], forward axis movement, and [JOG-], backward axis movement. N.B. See the explanation of the Manual cycle in chapter 6 of the programming manual. In some controls (Siax 300 and Siax 150) digital input 4 is associated to the [JOG-] key of the Numerical Control. So, using the PLC logic, it is easy to associate the event of pressing the [JOG-] key to VB259 (as explained in chapter 6 of the programming manual).

VB260

VB_EMERG

Causes the NC to go to a state of emergency (has the same behavior as the EMERGENCY input). The message “EMERGENCY FROM PLC” is displayed. When you set VB260 to 1, the numerical control goes in a state of emergency. The resetting of the variable must be performed by the PLC. I.e., VB260 must be set to 0 from the PLC to cause the NC to exit from the state of emergency. The effects of the state of emergency on the Numerical Control depend on the value assumed by the parameter “Emergency Type.” In fact, at the moment the emergency occurs, i.e., when the variable VB260 is set to 1, the control performs all the operations necessary to block the operation of the system (such as blocking the movement of the axes). For this reason, it is advisable to read the description of the parameter “Emergency Type” in the installation manual of the Numerical Control in chapter 3. N.B. For an example of the PLC logic for managing variable VB260, we recommend you read chapter 7 of the programming manual.

M0000464

Page 293

Chapter 3: Variables

VB261

Programming Manual

VB_PRG_RUN



Indicates that a program is running in the Automatic cycle of the NC. When you enter the Automatic page (Automatic Cycle item on the Main Menu of the NC) of the Numerical Control, you can launch a program in automatic execution (see chapter 7 of the programming manual). When the program is running, and only in this situation, variable VB261 is set to 1 from the control. The value of VB261 can only be read by the PLC. N.B. Also see VB267.

VB262

VB_STEP_STAND_BY

If set to 1, it suspends the execution of the Automatic cycle at the beginning of the step after the current one. In this case the status number is 1. When the value is brought back to 0, execution resumes. Together with variables VB263 and VB264, it constitutes a set of variables for executing a program in Automatic with step-by-step control. N.B. Also see VB263 and VB264.

VB263

VB_NO_MOVE_AX

If set to 1, it suspends execution of the Automatic cycle before executing the movement instructions in the first step that contains them (it disables axis movement). In this case the status number is 8. When the value is brought back to 0, execution resumes. Together with variables VB262 and VB264, it constitutes a set of variables for executing a program in Automatic with step-by-step control. N.B. Also see VB262 and VB264.

VB264

VB_EDGE_STEP

If set to 1, it executes a step of the Automatic cycle at each negative transition of VB262 (i.e., each time that the step is reenabled). Together with variables VB262 and VB263, it constitutes a set of variables for executing a program in Automatic with step-by-step control. N.B. Also see VB262 and VB263.

Page 294

M0000464

Programming Manual

VB265

Chapter 3: Variables

VB_SET_PRG_NUM

If set to 1, the number of the program to execute is set to that contained in VN257. When set to 1, the effect of VB265 differs depending on the whether the Numerical Control is in Multiple Manual (see VB266) or in Automatic. •

VB265=1 in Multiple Manual VB265 set to 1 by the PLC when the control is in Multiple Manual has the effect of sending the program specified in VN257 into execution. The effect is to give a Start to the program, which is then executed.



VB265=1 in Automatic VB265 set to 1 by the PLC when the control is in Automatic has the effect of setting the program to be executed (item Prog in the Automatic display) equal to the number of the program specified in VN257. In this case, only the number of the program to execute is set, but execution does not start. To begin execution, you must set VB256 to one as is normally done.

N.B. Also see the documentation for VN257.

VB266

VB_MAN_MULTI

If set to 1, it enables the possibility of moving several axes at the same time. JOG+ and JOG- (VB258 and 259) lose their meaning, while the VBs from 296 to 303 assume the meaning of JOG+ for the respective axes, and those from 336 to 343 that of JOG-. Sipro Numerical Controls provide two modes of Manual operation: manual and multiple manual (see chapter 5 of the programming manual) . To activate the Multiple Manual you must set VB266 to 1 from the PLC. In multiple manual mode, the Numerical Control allows movement of the axes in automatic mode. I.e., each axis can be moved autonomously using the VBs from VB296 to VB303 and from VB336 to VB343. N.B. See the VBs from VB296 to VB303 and from VB336 to VB343

VB267

VB_END_PRG



If set to 1, it signals the end of the execution of the program of the Automatic cycle of the NC. When you enter the Automatic page (Automatic Cycle item on the Main Menu of the NC) of the Numerical Control, you can launch a program in automatic execution (see chapter 6 of the programming manual). When the program terminates, the control sets VB267 to 1. The value of VB261 can only be read by the PLC. It remains 0 if the program is interrupted by a stop.

M0000464

Page 295

Chapter 3: Variables

VB268

Programming Manual

VB_ACCESS_KEY

If set to 1, it allows access to all the functions that require the key. The Program Management menu (Program Management on the Main Menu of the NC) lists all the operations that can be carried out on NC programs. Some of these operations are allowed only if VB268 is set to 1 by the PLC. The following table lists the operations that can be performed on programs from the Program Management menu and those that are only accessible if VB268 is set to 1 (the operations on programs correspond to the items on the Program Management menu). Operation on the program Program editor List Programs in memory Delete Program Copy programs Talk with PC Total program erasure Editor display

VB269

Requires the key (VB268=1) Yes No Yes Yes No Yes No

VB_NO_SETVAR

If set to 1, blocks access to the Variable Setting menu (F1). It is possible to set VB269 to 1 from the PLC so that the F1 key functions are disabled. This is to say: If VB269=0, then F1 Variable Setting functions are operational If VB269=1, then F1 Variable Setting functions are disabled N.B. See chapter 2 of the programming manual for information about setting variables using the F1 key.

VB270

VB_TOOL_COORD

If set to 1, the movements are carried out in tool coordinates. In the case in which checks are made on jobs that use the tools, the Numerical Control knows how the tool itself is made. To communicate the shape of the tool to the Numerical Control, you must specify the parameters that define it. To set the tool parameters, select the item Tool Parameters from the Main Menu of the NC (see chapter 7 of the programming manual). During the work, the control must take into account the shape of the tool to calculate the right trajectory coordinates. Setting VB270 to 1 enables the Numerical Control to also take the dimensions of the tool into account when calculating the trajectory. N.B. See NC instructions 40 G40, 41 G41 and 42 G42 in the instructions chapter.

Page 296

M0000464

Programming Manual

VB271

Chapter 3: Variables

VB_TEACH

If set to 1 and the NC is in Self-learning, it generates a program step depending on the selflearning mode. The Sipro Numerical Control provides an operating mode called Self-learning (see chapter 2 of the programming manual). In this mode, the Numerical Control generates the NC instructions automatically, depending on the type of self-learning used, by setting VB271 to 1 from the PLC. N.B. See also VN366, VN367 and VB272

VB272

VB_TEACH_LINE

If set to 1, allows interpolated self-learning. If set to 0, allows single-axis self-learning. The meaning of VB272 depends on whether the firmware of the Numerical Control is interpolated (and, thus, enabled to execute interpolated instructions) or not, on whether you use the F2 or F3 key and on the value of VN362. For the explanation of the various meanings of VB272, you must read the relative paragraph in chapter 2 of the programming manual.

VB273

VB_CN_IN_SETVAR

If set to 1, it signals that I am in “Variable Setting” (F1). N.B. See VB269 and the paragraph on setting variables from F1 in chapter 2 of the programming manual.

VB274

VB_LOC_REM

The Numerical Control can find itself in a Remote or Local state. The letters LOC or REM on the upper left of the display, inside the Main Menu functions of the NC, indicates in what state the Numerical Control is found. VB274 is used to establish in which of the two states we want the control to operate. If VB274 is set to 1, the SIAX is in REMOTE control mode. If VB274 is set to 0, the SIAX is in LOCAL control mode . N.B. Also see VB275 and the paragraph on REMOTE/LOCAL mode in chapter 6 of the programming manual.

M0000464

Page 297

Chapter 3: Variables

VB275

Programming Manual

VB_MAN_AUTO

In the case in which the NC is controlled in REMOTE mode (VB274=1), it can only be found in a state of Automatic or Manual. VB275 is used to determine in which of these two latter states we will make the NC operate. If VB275 is set to 1, the SIAX is set to Automatic (this is valid only if the SIAX is in REMOTE control mode). If one or more axes are not zeroed, it proposes the resetting function, after which automatic mode itself is reproposed. If VB275 is set to 0, the SIAX is placed in Manual mode. N.B. Also see VB274 and the paragraph on REMOTE/LOCAL mode in chapter 6 of the programming manual.

VB276

VB_ST_MENU



If equal to 1, it indicates that the SIAX is found in the Main Menu.

VB277

VB_ST_AUTO



If equal to 1, it indicates that the SIAX is found in Automatic.

VB278

VB_ST_MANU



If equal to 1, it indicates that the SIAX is found in Manual.

VB279

VB_ST_ACQ_PAR



If equal to 1, it indicates that the SIAX is found in the Parameter Acquisition.

VB280

VB_ST_TEST



If equal to 1, it indicates that the SIAX is found in Test.

VB281

VB_ST_TEST_VEL



If equal to 1, it indicates that the SIAX is found in Speed Test.

VB282

VB_ST_SEMI_AUTO



If equal to 1, it indicates that the SIAX is found in Semi-automatic.

VB283

VB_ST_OMNI



If equal to 1, it indicates that the SIAX is found in Single State.

VB284

VB_ST_AZZ

If equal to 1, it indicates that the SIAX is found in Resetting.

Page 298

M0000464



Programming Manual

VB285

Chapter 3: Variables

VB_ST_EDIT



If equal to 1, it indicates that the SIAX is found in the Editor.

VB286

VB_ST_EME



If equal to 1, it indicates that the SIAX is found in Emergency.

VB287

VB_AX_ENABLE



Normally, the Numerical Control uses digital output 1 to enable operations. Operations can be enabled (output 1 =1) or disabled (output 1=0). This information can also be read on VB287, which is 1 when digital output 1 is 1 and 0 when digital output 1 is 0. VB287 is useful when you want to use digital output 1, which is usually used to enable operations, in a different way (for example, to power-on or power-off a switch). In fact, in this case, information about enabling operations is always reported VN287 while it is NOT reported on digital output 1. To free digital output 1, you must set the parameter Emergency Type in a certain way. More precisely, you must set this parameter with values from 3 to 5 seconds based on the table shown in the explanation of the parameter in the paragraph Machine Parameters in the installation manual. N.B. Digital output 1 is 1 (operations enabled) when NOT in Test and when all the NC parameters are correct (i.e., NOT in a state of Emergency). N.B. The documentation on VB288-VB295 and the description of the parameter “Emergency Type” in chapter 3 of the installation manual.

VB288÷295

VB_FIRST_AX_DIS

If set to 1, disables axis movement (from 1 to 8). If VB288 is set to 1, the control cannot carry out axis movement instructions. For example, if a program must execute instruction 80 AX n TO m and VB288 is 1, then the control does not carry out the movement and displays an axis movement error (see paragraph Automatic Cycle Error Codes in chapter 6 of the programming manual). This behavior of the system is valid both for VB288, associated to axis 1, and for the VBs from VB289 to VB295, associated to the axes from 2 to 8. N.B. Also see the documentation for VN375.

VB296÷303

VB_FIRST_AX_SEL

If set to 1, in manual the PLC selects (and it is also possible to select from the keyboard) the number of the axis (from 1 to 8) to move, while in Multiple Manual, it has the function of JOG+ for the axis itself. In this latter case, setting one of the variables of the interval VB296-VB303 to 1 performs a movement of the axis corresponding to the increase of the position. I.e., in Multiple Manual movement, an axis can be moved forward or backward in a manner independent from the other axes. For example, to move axis 1 forward, I set VB296 to 1 from the PLC (even associating it with a key on the keyboard). So long as VB296 remains 1, the axis continues to move forward. Each variable corresponds to an axis. VB296 corresponds to axis 1, VB297 to axis 2, and so on, until VB303, which corresponds to axis 8. N.B. See VB266 and chapter 5 of the programming manual. M0000464

Page 299

Chapter 3: Variables

VB304÷311

Programming Manual

VB_FIRST_AX_IN_QUO



If 1, it indicates that the axis (from 1 to 8) has arrived in position. During movement, the Numerical Control moves the axes to the position specified by the executing program. To know whether the axes have arrived at the position preset in each instruction, you use the VBs from VB304 to VB311. Each variable corresponds to an axis. VB304 corresponds to axis 1, VB305 to axis 2, and so on, until VB311, which corresponds to axis 8.

VB312÷319

VB_FIRST_AX_ZERO

If 1, it indicates that the axis (from 1 to 8) is zeroed. Before carrying out the axis movement, you must always set the system of reference used for calculating trajectories. To set the system of reference, you must perform a so-called “Resetting Axes”. I.e., all the positions of the axes are fixed that will then be taken as the origin of the system of reference (see chapter 8 of the programming manual and chapter 4 of the installation manual). A VB from VB312 to VB319 is associated to each axis, by means of which you can tell if the axis has been zeroed. If the VB of the axis that you are interested in moving is zeroed, then its value will be 1. Each variable corresponds to an axis. VB312 corresponds to axis 1, VB313 to axis 2, and so on, until VB319, which corresponds to axis 8.

VB320÷327

VB_FIRST_PID_DIS

If set to 1, disables the axis servo (from 1 to 8). Sipro S.r.l. numerical controls provide a PID-type “controller” stage within the axis position control system. The programmer is given the possibility of enabling the control stage or not by using the VBs from VB320 to VB327. For example, by setting VB320 to 1, the PID control stage is disabled for axis 1. Each variable corresponds to an axis. VB320 corresponds to axis 1, VB321 to axis 2 and so on up to VB327, which corresponds to axis 8. If the servo is disabled, so is the “servo error” alarm (see). When the variable is once again set to 0, its target axis is assumed to be the current one, cancelling any difference with respect to its original position.

Page 300

M0000464

Programming Manual

VB328÷335

Chapter 3: Variables

VB_FIRST_SET_ZERO

If set to 1, its sets the zero encoder to the axis (from 1 to 8). The correct operation of axis movement presupposes the presence of a system of reference. For this reason, on power-up the “Zero Axes” procedure is executed, which is explained in chapter 4 of the installation manual. The position to which the resetting refers, i.e., the position that is assigned to the axes at the end of the resetting procedure, is the Encoder Zero that is a parameter of the axis, illustrated in chapter 3 of the installation manual. In addition to the resetting procedure, you can attribute the encoder zero position to the axis in a desired position by loading the value 1 in one of the VBs from VB328 to VB335. I.e., in manual movement, for example, I can position the axis that interests me in a desired position and, in that position, make it assume the encoder zero position. From that moment on, the movements associated to that axis will make reference to the new reference system set with encoder zero. For example, if you want to change the system of reference on axis 1, you position axis 1 in the desired position in manual and set VB328 to 1. In this way, that position is the encoder zero position and all subsequent movements of axis 1 will refer to it. Each variable corresponds to an axis. VB328 corresponds to axis 1, VB329 to axis 2, and so on, until VB335, which corresponds to axis 8. N.B. Also see VB312-VB319

VB336÷343

VB_FIRST_AX_JOG_M

In Multiple Manual it has the function of JOG- for the corresponding axis (from 1 to 8). By setting one of the variables in the interval VB336-VB343 to 1, you perform a movement of the axis corresponding to a decrease of the position. I.e., in Multiple Manual, an axis can be moved forward or backward in a manner independent from the other axes. For example, to move axis 1 backward, you set VB336 to 1 from the PLC (even associating it with a key on the keyboard). So long as VB296 remains 1, the axis continues to move backward. Each variable corresponds to an axis. VB336 corresponds to axis 1, VB337 to axis 2, and so on, until VB343, which corresponds to axis 8. N.B. See VB266 and chapter 5 of the programming manual.

VB344÷351

VB_FIRST_AX_HOLD_S

If set to 1, it delays the start of the axis (from 1 to 8) as lock as it doesn't turn back to 0. If VB344 is set to 1, the Numerical Control cannot begin moving axis 1. For example, if VB344 is 1 and the NC must execute instruction 80 AX 1 TO 100, axis 1 does not begin the movement. Only when VB344 is set to 0 does axis 1 execute instruction 80. N.B. See the documentation for VB288-VB295. N.B. Delay Variables functions for ON/OFF AXIS ONLY from firmware version 5.14 of 06/10/04.

M0000464

Page 301

Chapter 3: Variables

VB352÷355

Programming Manual

VB_FIRST_IRQ_EN

If set to 1, it enables IRQ TPU of the encoder (from 1 to 4). Among the Numerical Control's encoder inputs, there is an input (Z) that can be used as an interrupt input (see encoder input diagrams in chapter 7 of the installation manual). This input is usually used to signal the zero notch of the encoder with an interrupt, especially in the zero cycle, but can also be used as an external interrupt input for other devices (such as piececounting photocells, for example). The VBs from VB352 to VB355 are used to enable these interrupts. Each variable corresponds to an axis. VB352 corresponds to axis 1, VB353 to axis 2, and so on, until VB355, which corresponds to axis 4. At the time in which I enable one of the 4 interrupts by setting the corresponding VB to 1, each impulse on incoming signal Z increments a counter. Each input Z is associated to an enabling VB that, in its turn, is associated to a VN, from VN268 to VN271, that contains the number of impulses that occurred from the moment of enabling on. N.B. Also see the documentation for VN268-VN271.

VB360÷367

VB_FIRST_FOLL_EN

If set to 1, it enables the axis (from 1 to 8) to track the encoder of the VN (from 284 to 291). The axes of the Numerical Control are normally moved following a trajectory calculated entirely by the control itself. However, by acting on the VBs from VB360 to VB367, it is possible to enable the axes to move with “tracking” (see paragraph Tracking Management in chapter 2 of the programming manual ). In this case, the axes enabled for this function, called SLAVES, track the movement of an encoder specified by the VNs from VN284 to VN291. For example, if I want axis 1 to follow the trajectory of encoder 3, I place the value 3 in VN284, I put 1 in VB360 and in VN276-283 and 316-323, the desired tracking ratio. Movement with axis tracking can be done using various methods. These methods are explained in paragraph Tracking Management in chapter 2 of the programming manual. N.B. Also see the documentation for VN276-VN283, VN284-VN291, VN316-VN323 and VN324-VN331

VB368

VB_SH_REG_LATCH_IN

The Numerical Control expects a PLC that has a shift register of variable size. The size of the shift register has a maximum value of 1023 elements. VB368 is used as a latch for the Data Entry and Reset functions. N.B. For an explanation of the operation of the shift register, see the documentation in the paragraph Use of the shift register in the Appendix of the programming manual. N.B. Operations on the shift register are only enabled for dedicated firmware.

Page 302

M0000464

Programming Manual

VB369

Chapter 3: Variables

VB_SH_REG_LATCH_OUT

The Numerical Control expects a PLC that has a shift register of variable size. The size of the shift register has a maximum value of 1023 elements. VB369 is used as a latch for the Data Extraction and Reset functions. N.B. For an explanation of the operation of the shift register, see the documentation in the paragraph Use of the shift register in the Appendix of the programming manual. N.B. Operations on the shift register are only enabled for dedicated firmware.

VB370

VB_SH_REG_IN

The Numerical Control expects a PLC that has a shift register of variable size. The size of the shift register has a maximum value of 1023 elements. VB370 is used as input data to the shift register for the Data Entry function. N.B. For an explanation of the operation of the shift register, see the documentation in the paragraph Use of the shift register in the Appendix of the programming manual. N.B. Operations on the shift register are only enabled for dedicated firmware.

VB371VB_SH_REG_OUT The Numerical Control expects a PLC that has a shift register of variable size. The size of the shift register has a maximum value of 1023 elements. VB371 is used as output data from the shift register for the Data Extraction function. N.B. For an explanation of the operation of the shift register, see the documentation in the paragraph Use of the shift register in the Appendix of the programming manual. N.B. Operations on the shift register are only enabled for dedicated firmware.

VB372

VB_SH_REG_CLEAR

The Numerical Control expects a PLC that has a shift register of variable size. The size of the shift register has a maximum value of 1023 elements. VB372 is used to enable the Reset shift register function. I.e., the resetting of the shift register only occurs if VB372 is 1. N.B. For an explanation of the operation of the shift register, see the documentation in the paragraph Use of the shift register in the Appendix of the programming manual. N.B. Operations on the shift register are only enabled for dedicated firmware.

M0000464

Page 303

Chapter 3: Variables

VB373

Programming Manual

VB_DINAM_SETVAR

If set to 1, when you are in F1 and Automatic is running, you have access to all the programs (not just to Main). Pressing the F1 key has different effects depending on the settings of several VNs and VBs (to see the various functions, see paragraph Variable Setting F1 key in chapter 2 of the programming manual). VB273 is one of these variables used for managing the functioning of the F1 key. In the case in which I press the F1 key and no starting program is set in F1 (VN342=0) and a program 1 is running (VB261=1), then: • •

If VB373=1, then, the variable setting instructions of program 9800 are managed. If VB373=0, then the variable setting instructions of the Main program, whose number is specified in VN308, are managed.

N.B. Variable available from firmware version 3.21c on. N.B. For a better understanding of the meaning of VB373 and the functioning of the F1 key, also see the flow-chart in the paragraph Variable Setting F1 key in chapter 2 of the programming manual.

VB374

VB_SET_ORG

If set to 1, it sets as the active origin the one whose number is contained in VN306. N.B. Variable available from firmware version 3.31c on. N.B. For additional explanations, consult the documentation for VN306 and chapter 8 of the programming manual.

VB375

VB_GET_ORG

If set to 1, it enables the acquisition of the origin whose number is contained in VN305. The positions acquired are those relative to the axes that have the corresponding VBs from VB376 to VB383 active. N.B. For additional explanations, consult the documentation for VN306, VB376-383 and chapter 8 of the programming manual.

VB376÷383

VB_FIRST_AX_SET_ORG

If set to 1, it enables the acquisition of the origin positions of the axis (from 1 to 8). To enable the acquisition of the origin, you must set VB375 to 1 from the PLC. The origin acquired is that relative to the number specified in VN305. At this point, the positions are acquired of those axes that have the VBs from VB376 to VB383 set to 1. Each variable corresponds to an axis. VB376 corresponds to axis 1, VB377 to axis 2, and so on, until VB383, which corresponds to axis 8. N.B. In chapter 8 of the programming manual, there is a PLC example for the acquisition of the origin for axes 1, 2 and 3. Also see the documentation for VB375 and VB374.

Page 304

M0000464

Programming Manual

VB384

Chapter 3: Variables

VB_CONT_MOVE

If set to 1, it enables continuous movement. In programming with systems that support interpolation, it is also possible to set the linear advance speed and avoid the stopping of the axes in the intermediate point between two consecutive interpolations. If I set VB384 to 1 from the PLC, I enable the Numerical Control to perform continuous movements when moving with interpolation. N.B. Also see the documentation related to Instruction 38 CONT MOVE.

VB385

VB_USE_TX_PRG

If set to 1, indicates the transmission of the program from a serial port (used for managing programs from a PC). VB385 is used to manage the transmission of .ISO files from a PC to the NC without the file being saved in memory (temporary file). N.B. For a better description of the utility of VB385, see the documentation and PLC examples in the paragraph Temporary transmission of ISO programs in chapter 2 of the programming manual.

VB386

VB_START_TX

It is set to 1 by the SIAX to ask the PC to begin sending the program (used for the management of programs from a PC). VB386 is used to manage the transmission of .ISO files from a PC to the NC without the file being saved in memory (temporary file). N.B. For a better description of the utility of VB386, see the documentation and PLC examples in the paragraph Temporary transmission of ISO programs in chapter 2 of the programming manual.

VB387

VB_TX_BUF_FULL

It is set to 1 when the exchange buffer is full (used for the management of programs from a PC). VB387 is used to manage the transmission of .ISO files from a PC to the NC without the file being saved in memory (temporary file). N.B. For a better description of the utility of VB387, see the documentation and PLC examples in the paragraph Temporary transmission of ISO programs in chapter 2 of the programming manual.

M0000464

Page 305

Chapter 3: Variables

VB388

Programming Manual

VB_TX_IN_PR

If set to 1, indicates that the transmission of the program is in progress (used for the management of programs from a PC). VB388 is used to manage the transmission of .ISO files from a PC to the NC without the file being saved in memory (temporary file). N.B. For a better description of the utility of VB388, see the documentation and PLC examples in the paragraph Temporary transmission of ISO programs in chapter 2 of the programming manual.

VB389

VB_END_TX

If set to 1, signals the end of transmission (used for the management of programs from a PC). VB389 is used to manage the transmission of .ISO files from a PC to the NC without the file being saved in memory (temporary file). N.B. For a better description of the utility of VB389, see the documentation and PLC examples in the paragraph Temporary transmission of ISO programs in chapter 2 of the programming manual.

VB390

VB_ENAB_F3

If set to 1, it enables the F3 function for viewing active processes. In the automatic cycle, it is possible to display the active processes. To see the list of such processes, with their relative number, name, step and status, you must press the F3 key. This function of the Numerical Control is enabled by setting VB390 to 1. N.B. Variable available from firmware version 3.26b on.

Page 306

M0000464

Programming Manual

VB391

Chapter 3: Variables

VB_DISAB_F1_SET_PRG

If set to 1, when you enter F1, the current program is not set as the program to be executed. Variable setting through the F1 key expects that the number of the program that is activated using F1 is set as the number of the program to be executed; i.e., it is placed in the variable VN308. However, in some cases, you can access a program to set variables by means of F1 without it becoming the program to be executed. VB391 is used to allow this. By setting it to 1, the variable setting program called with the F1 key does not become the program executed with a Start (i.e., it does not become the program 1 whose number is set in VN308). For example, if before entering into variable setting mode with F1, the program to be executed (displayed above in the Automatic screen after the word Prog.) is the one with number 13, while the variable setting program that is called from F1 has the number 102, then: •

If before pressing the F1 key to set the values of the variables, I set VB391 to 1 from the PLC, then, when I return to the Automatic screen, the program that is executed following a Start is program 13



If before pressing the F1 key to set the values of the variables, I set VB391 to 0 from the PLC, then, when I return to the Automatic screen, the program that is executed following a Start is program 102

N.B. Variable available from firmware version 3.26d on. N.B. The functioning described above is not valid when the program called from F1 is the one with number 9800. In this case, even if VB391=0, the program to be executed remains that whose number was set in VN308 before pressing F1. N.B. Also see the documentation in paragraph Variable Setting – F1 Key in the programming manual and for VN336, VN342, VN308 and VB373.

M0000464

Page 307

Chapter 3: Variables

VB392

Programming Manual

VB_REV_ARC_DIR

If set to 1, it allows reversing the direction of the arcs and circumferences, i.e., it changes the direction of travel from clockwise to counter-clockwise and vice versa. The Numerical Control is able to carry out movements of the axes following arc of circumference trajectories in a clockwise or counter-clockwise direction. The instructions for carrying out such movements are 62 (G2) and 63 (G3). VB392 allows the control to change the direction of movement of such instructions by setting them from clockwise to counter-clockwise and vice versa. If, for example, the program that is being executed contains an instruction 62 (G2), then: •

If VB392=0, then the control interprets the instruction in the usual way as a clockwise arc of circumference



If VB392=1, then the control interprets the instruction in the reverse way and that is as a counter-clockwise arc of circumference.

N.B. Variable available from firmware version 3.28b on. N.B. Also see the documentation for instructions 62 (G2) and 63 (G3)

VB393

VB_WAIT_TX_PRG

It is set to 1 at the beginning of the wait for the start of program transmission and is set to 0 when the transmission begins (used for managing programs from a PC). VB393 is used to manage the transmission of .ISO files from a PC to the NC without the file being saved in memory (temporary file). N.B. Variable available from firmware version 3.28c on. N.B. For a better description of the utility of VB393, see the documentation and PLC examples in the paragraph Temporary transmission of ISO programs in chapter 2 of the programming manual.

VB394

VB_PROF_PER_PNT

If set to 1, it enables the execution of profile by points (G1), only for the firmware versions that allow for it. Some profiles that the control must follow consist of curves that are so complex they cannot be executed by the Numerical Control with just instructions 62 (G2) and 63 (G3). The problem is solved by allowing the control to follow the profile using only instruction 61 (G1), which only executes linear movements. In executing a profile by points, the control executes straight sections of variable length that follow the profile set. To enable this mode, set VB394 to 1. N.B. Variable available from firmware version 3.28c on. N.B. VB394 only has meaning for firmware versions that provide for the execution of profile by points. N.B. Also see the documentation for instructions 61 (G1), 62 (G2) and 63 (G3)

Page 308

M0000464

Programming Manual

VB395

Chapter 3: Variables

VB_PRG_RESET

If set to 1, with the SIAX in Automatic and the Automatic cycle in stop, it restarts the execution of the set program from step 1.

VB396

VB_DIS_SET_F

If set to 1, it disables the speed setting in ISO files (instruction F) in relation to what is contained in VN340. In ISO files, instruction F allows changing the speed of axis movement. If I set VB396 to 1, I disable all the F instructions present in the ISO file that I want to execute. The new speed set is that contained in the VQ whose index is specified in VN340. If VN340 is not >0, no speed is set. N.B. Variable available from firmware version 3.30b on. N.B. Also see the documentation in paragraph ISO Codes Recognized in chapter two of the programming manual and for VN340.

VB397

VB_PC_CHG_PRG

It is set to 1 by the SIAX when the program to be executed is changed from the PC. VB397 is used to manage the transmission of .ISO files from a PC to the NC without the file being saved in memory (temporary file). N.B. Variable available from firmware version 3.44c on. N.B. For a better description of the utility of VB397, see the documentation and PLC examples in the paragraph Temporary transmission of ISO programs in chapter 2 of the programming manual.

VB398

VB_APPR_F1

Contains the value that is read when VB271 is used as Enter in F1. In the self-learning phase from F1, it is possible to self-learn the value of a VB. When in selflearning by F1 and VB271 is set to 1 while the cursor is on a VB, the latter is loaded with the value contained in VB398. N.B. Variable available from firmware version 3.30g on. N.B. Also see documentation for VB271 and the paragraph Self-Leaning by F1 in chapter 2 of the programming manual.

VB399

VB_CN_SET_PAGE

Allows setting the page displayed in Automatic from the PLC; when an impulse is given to this VB, the page relative to what is contained in VN344 is displayed. N.B. Variable available from firmware version 3.31a on. N.B. See documentation for VN344.

M0000464

Page 309

Chapter 3: Variables

VB400

Programming Manual

VB_VIEW_ALRM

Reserves the last line of the screen for the display of PLC alarms in F1 and F2. Normally, alarms are displayed with the F4 key. However, by using the function keys F1 and F2, it is possible to reserve the last line of the screen for the display of the alarm message with the highest priority. To enable this display, you must set VB400 to 1. N.B. Variable available from firmware version 3.31a on. N.B. Also see the documentation in the paragraphs relative to function keys F1, F2 and F4 in chapter 2 of the programming manual.

VB401

VB_ENABL_RES_F1

If set to 1, in F1 the fields (variables and instructions) after the instruction “RESERVED” are displayed, unlike when it is left as 0. N.B. Variable available from firmware version 3.31b on. N.B. Also see the documentation relative to Instruction 30 RESERVED.

VB402

VB_QUO_AX_F1

During self-learning with F1 on VQ, the Numerical Control allows the acquisition of an axis position. At the moment the F1 key is pressed, the screen displays the message associated to the VQ by self-learning and its current value (as explained in instruction 218). The Numerical Control provides the possibility of displaying the position at which the axis associated to the message is found instead of the value of the VQ associated to the message. VB402 is used to allow this. When F1 is pressed •

If VB402=0 Then the current value of the VQ to be self-learned is displayed with the associated message



If VB402=1 Then the current position of the axis associated to the message is displayed with the message associated to the VQ to be self-learned as described in instruction 218.

N.B. Variable available from firmware version 3.32 on. N.B. Also see documentation in the paragraph Self-Leaning by F1 in chapter 2 of the programming manual.

Page 310

M0000464

Programming Manual

VB403

Chapter 3: Variables

VB_SEMI_INCR

In Multiple Manual (VB266=1), if set to 1 the positions set are incremental and not absolute. When moving in multiple manual mode, it is possible to move the axes in an incremental manner. I.e., if, for example, I initially set the objective position of axis 1 to 10, at the first Start, the axis goes to position 10, at the second Start to position 20, at the third, 30 and so on. I.e., the position is always incremented by a fixed value. N.B. Variable available from firmware version 3.36a on. N.B. Also see documentation for VB266 and the paragraph Multiple Manual in chapter 2 of the Programming Manual.

VB404

VB_DISABIL_F1_SET_VAR

In F1, if set to 1, it disables changing the values of variables. With F1, it is possible to set the values of the variables to which the message is associated using the appropriate instructions. If I set VB404 to 1, I disable the possibility of changing those values. N.B. Variable available from firmware version 3.37c on. N.B. See the documentation in the paragraphs Messages and Variable Setting F1 key in chapter 2 of the Programming Manual and the documentation for instructions 209, 229, 249, 239, 105, 106, 107, 108, 109, 111, 112, 113, 218 and 224 relative to the management of the F1 key and messages.

VB405

VB_TEACH_EL

If set to 1, in Self-learning and in the F2 Editor, when the self-learning impulse (VB271) is generated, in addition to instruction AX n TO q, the instruction VEL AX n = v% is also generated; the speed is read from VN348÷355 (one for each axis). The speed is expressed as % × 10 (1000 = 100%). N.B. Variable available from firmware version 3.37c on. N.B. The set speed instruction is only generated if the axis movement instruction is not already present in the step; it is not active in Interpolated Self-learning (VB272) and in Self-learning on variables (F3). N.B. Also see documentation in the paragraph Self-Leaning in Program Editor in chapter 2 of the Programming Manual.

M0000464

Page 311

Chapter 3: Variables

VB406

Programming Manual

VB_MODEM_EN

If set to 1, enables modem management. N.B. Variable available from firmware version 3.38 on. N.B. See documentation for VN357 and VN358.

VB407

VB_RETR_ENAB

If set to 1, enables the storage of movements. Variable relative to the RETRACE function. RETRACE only works on dedicated firmware, i.e., that specifically provides for that function. The RETRACE function allows retracing the movement of the axes in the last 16 movement instructions and is only active for the main interpolation axes WITHOUT tangential axes. The RETRACE function is ONLY active on the MAIN PROCESS and NOT on any parallel processes (FORKs). The storage of the path for a possible retrace is enabled by setting VB407 to 1. N.B. Variable available from firmware version 3.43 on. N.B. See the documentation for VB408, VB409 and VB410.

VB408

VB_RETR_IND

If set to 1, enables RETRACE backwards. RETRACE only works on dedicated firmware, i.e., that specifically provides for that function. The RETRACE function allows retracing the movement of the axes in the last 16 movement instructions and is only active for the main interpolation axes WITHOUT tangential axes. The RETRACE function is ONLY active on the MAIN PROCESS and NOT on any parallel processes (FORKs). It is possible to activate retrace during normal axis movement by setting VB408 (VB_RETR_IND) to 1; a stop of the current movement is generated and the axes begin the opposite motion; the axes move backward as long as VB408 remains 1 or until all the stored movements have been executed. When VB408 is set to 0 the axes stop; if VB408 is reset to 1, reverse movement resumes. N.B. Variable available from firmware version 3.43 on. N.B. See the documentation for VB407, VB409 and VB410.

Page 312

M0000464

Programming Manual

VB409

Chapter 3: Variables

VB_RETR_AVA

If set to 1, enables forward RETRACE. RETRACE only works on dedicated firmware, i.e., that specifically provides for that function. The RETRACE function allows retracing the movement of the axes in the last 16 movement instructions and is only active for the main interpolation axes WITHOUT tangential axes. The RETRACE function is ONLY active on the MAIN PROCESS and NOT on any parallel processes (FORKs). It is possible to activate retrace during normal axis movement by setting VB408 (VB_RETR_IND) to 1; a stop of the current movement is generated and the axes begin the opposite motion; the axes move backward as long as VB408 remains 1 or until all the stored movements have been executed. When VB408 is set to 0 the axes stop; if VB408 is reset to 1, reverse movement resumes. If, VB409 (VB_RETR_AVA) is set to 1 instead, the axes resume forward motion from the position at which they had arrived with backward retrace; in this case also, the forward movement (as a function of retrace) continues so long as VB409 remains 1 or until all the stored movements have been executed; in this latter case, it resumes normal movement and execution proceeds normally. N.B. Variable available from firmware version 3.43 on. N.B. See the documentation for VB407, VB408 and VB410.

VB410

VB_RETR_IN_PR



If set to 1, signals RETRACE in progress. RETRACE only works on dedicated firmware, i.e., that specifically provides for that function. The RETRACE function allows retracing the movement of the axes in the last 16 movement instructions and is only active for the main interpolation axes WITHOUT tangential axes. The RETRACE function is ONLY active on the MAIN PROCESS and NOT on any parallel processes (FORKs). So long as the retrace function is active (forward, back or with axes stopped on a retrace movement) VB410 (VB_RETR_IN_PR) assumes the value of 1. N.B. Variable available from firmware version 3.43 on. N.B. See the documentation for VB407, VB408 and VB409.

VB411

VB_NEXT_MOVE



During an interpolated movement, while a movement is in progress, if set to 1 it indicates that there is a next movement. N.B. Variable available from firmware version 3.43a on. N.B. Also see documentation in the paragraph Linear and circular interpolation in the Programming Manual.

M0000464

Page 313

Chapter 3: Variables

VB412

Programming Manual

VB_ROTAT_ENAB

If set to 1, enables rotation management. In addition to the translation of axes through the imposition of the origin, it is possible to perform a rotation of the axes with respect to an absolute initial system of reference. To enable axis rotation management you must set VB412 to 1. When rotation is enabled, G0 (AX TO) instructions relative to the principal axes of interpolation are executed as G1 instructions at maximum speed (Rapid). N.B. Variable available from firmware version 3.43a on. N.B. See documentation relative to VB374, VB375, VB376, VB383, VN305 and VN306. Also see documentation relative to instruction 47 SET ANGLE ORG n VAL i in the instruction manual and in chapter 8 of the Programming Manual.

VB413

VB_GET_ANGLE

If set to 1, acquires the angle of origin contained in VN305 (origin to be acquired). If rotation is enabled (VB412), it is possible to acquire the angle of origin whose number is specified in VN305. To enable this acquisition, you must set VB413 to 1. N.B. Variable available from firmware version 3.43a on.

VB414

VB_CN_CHG_PRG

It is set to 1 by the SIAX when the program to be executed is changed with the [PRG] key. In the Automatic cycle, you can change the program to be executed by selecting from among those present on the NC. To access this function, you must press the [PRG] key on the Numerical Control. Once the number of the program to be executed has been selected, it is confirmed with the [ENTER] key. Upon confirmation, VB414 is set to a value of 1 to indicate that the program to be executed has been changed. N.B. Variable available from firmware version 3.44a on.

VB415

VB_CN_SEL

In the case in which more than one NC is accessed, forming a network of controls, it becomes useful to know which NC is selected. This information is provided by VB415. This latter is set to 1 if the number of the currently selected NC coincides with the identifier of the NC itself (useful in RS422 multicn). N.B. Variable available from firmware version 3.46d on.

Page 314

M0000464

Programming Manual

VB416

Chapter 3: Variables

VB_MIDDLE_PNT

It is set to 1 if the mid-point for self-learning of an arc by 3 points has been acquired. The Numerical Control is capable of self-learning particular profiles. Each profile is associated to an index and, at the time of self-learning, this index is specified in VN362. In the case in which self-learning is performed for a profile of an arc of circumference passing through 3 points, VB416 indicates whether or not the mid-point was acquired. If the mid-point was acquired, VB416 is set to 1, otherwise it is set to 0. N.B. Variable available from firmware version 3.49c on. N.B. Also see the documentation for VN362.

VB417

VB_TASTO_PREMUTO

VB417 is set to 1 when any key on the NC is pressed. When the key is released, it is set back to 0. N.B. Variable available from firmware version 3.54b on.

VB418

VB_EN_FASE_AX

The VNs from VN348 to VN355 have two meanings depending on the value assumed by VB418. In the case in which VB418 is set to 0, the VNs from VN348 to VN355 contain the speeds of the axes in the self-learning phase (see documentation in the paragraph Self-learning in Program Editor in chapter 2 of the Programming Manual). In the case in which VB418 is set to 1, the VNs from VN348 to VN355 contain the value that identifies the phase in which the axis is found during movement. N.B. Variable available from firmware version 3.57a on. N.B. Also see documentation for variables VN348-VN355 and the paragraph Self-learning in Program Editor in chapter 2 of the Programming Manual.

VB419

VB_DISAB_PC_OUT

In some cases (for example when you are in TEST) it is useful to have total control of the digital and analog outputs without any influence of the PLC on execution. The Numerical Control makes available VB419, which, if set to 1, disables the actuation of the digital and analog outputs managed by the PLC. It is normally connected directly to VB280. N.B. Variable available from firmware version 3.58a on.

M0000464

Page 315

Chapter 3: Variables

VB420

Programming Manual

VB_REQ_CONF_MEMO

NC program in execution (running), operator in F1 page; any changes will be stored when the cycle stops (stop or end); VB420 was added which, if set to 1, asks for confirmation of the storage through the SAVE (MEMO) key. This prevent the NC, in the case of a voltage drop during an automatic cycle in which changes were made in page F1, from beginning the storage phase (which would be interrupted when the voltage is below the operating threshold with consequent loss of programs); the storage phase begins in the passage of the automatic cycle from run to stop, something that could occur if, during a drop in voltage, some input is read in a state that would cause a stop. N.B. Variable available from firmware version 3.62a on.

VB421

VB_EN_TAV_ROT

Setting VB421 to 1 enables the special rotating table functions. This functions are only available with dedicated firmware. N.B. Variable available from firmware version 3.64a on. N.B. Also see documentation relative to the rotating table example in chapter 2 of the Programming Manual.

VB422

VB_APP_WITH_ORG

In self-learning instructions (Program Editor/Self-learning), if VB422 is 1, the self-learned axis positions are acquired taking into account the active origin. N.B. Variable available from firmware version 3.77 on.

VB423

VB_ENAB_F6

When the Numerical Control is stopped in Automatic or in Multiple Manual, you can enable the F6 to enter the parameter pages. To enable this function, you must set VB423 to 1. N.B. Variable available from firmware version 4.12 on.

VB424

VB_ENAB_OTHER_PSW

VB424 allows the user to set a different password than the standard one (456258) in the passage from here to the NC menus/functions in which it is necessary to type one (such as entering the NC parameters menu). The use of VB424 is explained in the paragraph Dedicated password management in this manual N.B. Variable available from firmware version 4.18 on.

Page 316

M0000464

Programming Manual

VB425

Chapter 3: Variables

VB_RESET_EMERG

VB425 allows the user to reset the active emergency. The NC resets it to 0 after use. I.e., if the user wants to reset the emergency, VB425 is set to 1; once the emergency is reset, the NC zeroes VB425. This VB is zeroed when going into emergency. N.B. VB425 is the only way to reset the emergency when using Single State. N.B. Also see variable VN370. N.B. Variable available from firmware version 4.28 on.

VB426

VB_

INIT_ERR_MAIN

VB426 allows initializing the parameters to the default values in the event that the NC goes into Main errors of the type check EEPROM ... N.B. Variable available from firmware version 5.08 on.

VB427

VB_OM_EXIT

VB427 allows exiting from Single State. VB427 must be used together with VB433. The procedure for exiting from Single State is as follows: 1. Set VB433 to 0 2. Set VB427 to 1 N.B. VB427 is automatically zeroed (zeroed by firmware). N.B. Also see the paragraph Single State in this manual. N.B. Variable available from firmware version 4.33 on.

VB428

VB_OM_START_AUTO

In Single State the Automatic cycle is started by setting VB428 to 1 and no longer VB256. To execute the Automatic cycle in Single State, you must: 1. Verify that the axes are zeroed (there is no check for zeroed axes and, thus, it is the programmer's responsibility to inhibit the start under the axes have been zeroed by means of VB312-VB319) 2. Set the number of the program to be executed in VN402 3. Set VB428 to 1 (start) N.B. VB428 is automatically zeroed (zeroed by firmware). N.B. Also see the paragraph Single State in this manual. N.B. Also see variable VN402. N.B. Variable available from firmware version 4.33 on.

M0000464

Page 317

Chapter 3: Variables

VB429

Programming Manual

VB_OM_START_TEST

In Single State it is possible to force the Test state of the NC. I.e., the NC is placed in standard Test status. To force the passage from Single State to Test State, you must set VB429 to 1. It should be noted that in the Test State called from Single State, no standard page is displayed, but only user pages implemented by the programmer. It is thus the programmer's responsibility to construct the test pages according to his own needs. N.B. Also see the paragraph Single State in this manual. N.B. Variable available from firmware version 4.33 on.

VB430

VB_OM_START_TSTVEL

In Single State, there is the possibility of performing a speed test of the axes. VB430 allows beginning the speed test. Before starting a speed test with VB430, you must: 1. Set the NC in Test State using VB429 2. Set the number of the axis for which you want to perform the test in VN403 3. Prepare a user page in which there is an objective-type index variable as the object equal to the number of the axis for which you wish to perform the speed test (VN403). This object must be readable and writable and contains, at the end of the test, the value of the maximum speed of the axis. N.B. See documentation relative to VB429 and VN403. N.B. Also see the paragraph Single State in this manual. N.B. Variable available from firmware version 4.33 on.

VB431

VB_OM_START_SEMI

In Single State, there is the possibility of working in semi-automatic. To start semi-automatic, you must set VB431 to 1. Before starting semi-automatic, you must: 1. Prepare a user page in which you can set the objective positions. To do this, the page must contain objects of objective variable type with index equal to the number of the axis that you wish to move in semi-automatic. These objects must be readable and writable. In the objective positions, you set the position to which the axis must go. N.B. VB431 is automatically zeroed (zeroed by firmware). N.B. Also see the paragraph Single State in this manual. N.B. Variable available from firmware version 4.33 on.

VB432

VB_OM_START_ZERO

In Single State, there is the possibility of resetting the axes. To start resetting, you must set VB432 to 1. N.B. See documentation relative to VB428. N.B. VB432 is automatically zeroed (zeroed by firmware). N.B. Also see the paragraph Single State in this manual. N.B. Variable available from firmware version 4.33 on. Page 318

M0000464

Programming Manual

VB433

Chapter 3: Variables

VB_OMNI_MODE

Single State is available on Sipro NCs from firmware version 4.33 on (if enabled). To make the NC function in Single State, you must set VB433 to 1. N.B. Also see the paragraph Single State in this manual. N.B. Variable available from firmware version 4.33 on.

VB434

VB_OM_DIS_MAN

In Single State, there is the possibility of disabling the jog axis function. To do this, you must set VB434 to 1. Jog axis is only disabled if there is no jog active at the moment when VB434 is set to 1. N.B. Also see the paragraph Single State in this manual. N.B. Variable available from firmware version 4.33 on.

VB435

VB_OM_DIS_PAGE_STATE

In Single State, the pages displayed are associated to the state of the NC. For example, if an emergency occurs while I am in Single State, the emergency user page is called. So, there is an automatic change of page based on a change in the state of the NC. VB435 allows disabling this function. I.e., when VB435 is set to 1, the change of page upon change of state no longer occurs. So, returning to the example mentioned above, if an emergency occurs while I am in Single State, the NC goes into a state of emergency but the relative emergency page is not displayed (the NC continues to display the page associated to Single State) N.B. Also see the paragraph Single State in this manual. N.B. Variable available from firmware version 4.33 on.

VB436

VB_OM_INIT_QUOTE

In Single State there is the possibility of initializing the value of the objective positions. The objective positions are initialized using VB436. At the moment in which I set VB436 to 1, the objective positions acquire the value of the current position of the axes. N.B. VB436 is automatically zeroed (zeroed by firmware). N.B. Also see the paragraph Single State in this manual. N.B. Variable available from firmware version 4.33 on.

VB437

VB_SET_AUTO_ERR

Sipro systems allow the execution of the Automatic cycle when the NC is in Multiple Manual (see paragraph Multiple Manual). If an Automatic cycle in Multiple Manual terminates due to an error, you can display the error codes in the standard variables (VN345, VN346 and VN375 ). To enable writing a possible error code on standard variables, you must set VB437 to 1. N.B. Also see the paragraph Multiple Manual in this manual. N.B. See documentation relative to VN345, VN346 and VN375. N.B. Variable available from firmware version 4.40 on. M0000464

Page 319

Chapter 3: Variables

VB438

Programming Manual

VB_NO_SET_SER_QUO

In systems with firmware versions higher than 4.46, this VB must be set to 1 for a correct exchange of information by serial port in the event you are using an operator interface such as palm computer, TO 5.7 or PC. N.B. Variable available from firmware version 4.46 on.

VB439

VB_DIS_COP_CHK_START

In Sipro systems with CANopen modules, it allows executing the automatic cycle even in the presence of CANopen errors (for example, Life Time Node Guarding error). N.B. Variable available from firmware version 5.02 on.

VB440

VB_DIS_PROFI

In system with ProfiBus interface, setting VB440 to 1 disables reading and writing ProfiBus variables. N.B. Variable available from firmware version 5.10 on.

Page 320

M0000464

Programming Manual

Chapter 3: Variables

Numeric Variables Following are describe Numeric Variables with dedicated functions.



Notations read only variables (its is possible to write a value in these variables but it has no effect).

M0000464

Page 321

Chapter 3: Variables

VN256

Programming Manual

VN_OVERRIDE_VEL

Contains the speed Override value from 0.0 to 100.0% (and thus values from 0 to 1000). During axis movement, the Numerical Control can limit the speed of the axes with VN256. This VN specifies the percentage of speed with respect to the speed set through the instruction set vel (or with respect to the maximum if the instruction itself is not used). In Automatic or Manual, the NC always displays the override percentage above to the right. The value in VN256 is valid for all axes. If you want to differentiate the override value for each axis, you must use VN292VN299. The choice of setting a single override value with VN256 or an override value for each axis with VN292-VN299 is determined with the axis parameter Enable speed override . N.B. Also see the documentation for VN292-VN299.

VN257

VN_PRG_NUM

Contains the number of the program to execute; it is active when VB265 is set to 1. In Automatic or Multiple Manual, it is possible to select the program to be executed in two ways: directly from the keyboard of the NC or by PLC logic using VB265 and VN257. In the second case, you must first set the number of the program to be executed in VN257 and then give an impulse to VB265. In Automatic, the number of the program specified in VN257 is set in VN308 and VN309 and is only executed after a [START] from the keyboard of the NC. In Multiple Manual, the number of the program specified in VN257 is transferred to VN308 and VN309 and is immediately executed. N.B. Also see the documentation for VN265, VN308 and VN309.

VN258

VN_KEY_CODE

Contains the code of the last key pressed. A recognition code is associated to each key of the Numerical Control that can be used by the PLC. The key codes are shown in the paragraph Key Codes in the Appendix of the Programming Manual. N.B. See documentation paragraph Key Codes in the Appendix of the Programming Manual.

Page 322

M0000464

Programming Manual

Chapter 3: Variables

VN259

VN_MOVING_AXES



Axes in movement flags: an axis corresponds to each bit according to the scheme shown below. If the bit is 1, the corresponding axis is in movement. 128

64

Bit 7

Bit 6

32

16

Bit 5 Bit 4

8

4

2

1

Bit 3

Bit 2

Bit 1

Bit 0

Value to be set

Axis 1 Axis 2 Axis 3 Axis 4 Axis 5 Axis 6 Axis 7 Axis 8

VN260÷267

VN_FIRST_POS_AX_MM



Contains the position of the axis (from 1 to 8), expressed in millimeters.

VN268÷271

VN_FIRST_IRQ_CNT

IRQ TPU encoder counter (from 1 to 8). In the case in which the Z signal of the encoders is used as counting input, the VNs from VN268 to VN271 are counters associated to each encoder. The first encoder is associated to VN268, the second to VN269 and so on. N.B. Also see the documentation for VN352–VN355

M0000464

Page 323

Chapter 3: Variables

VN272

Programming Manual

VN_AX_ONOFF_REC_GC

In the case in which the axes to be controlled are of the ON/OFF type, you can set an Axis parameter called Play Recovery. The Numerical Control provides the possibility of enabling this function or not for each axis using VN272. This VN contains the flags that indicate whether an axis has play recovery or not. An axis corresponds to each bit. Axis 1 corresponds to bit 0, axis 2 corresponds to bit 1 and so on. If the bit is set to 1, play recovery is disabled for the corresponding axis. N.B. See documentation reltive to ON/OFF type axis parameters in chapter 3 of the installation manual.

VN273

VN_AX_ONOFF_DEC

When the Numerical Control manages axis ON/OFF, the axis parameters contain a parameter called inertia. VN273 manages this parameter. An axis corresponds to each bit of VN273. Axis 1 corresponds to bit 1, axis 2 corresponds to bit 2 and so on. If the bit corresponding to the axis (axis ON/OFF) is 1, a stop of that axis always sets the inertia space as the deceleration space independently of the rapid output state. N.B. Variable available from firmware version 3.88c on. N.B. N.B. See documentation of the axes ON/OFF parameters in the installation manual.

VN274

VN_EN_ROLLOVER

The rollover function for an axis, allows resetting the count and resuming from 0 when that axis reaches a preset position. With this function, the restart of the count is performed intelligently, i.e., without the loss of encoder impulses during the resetting of the axis position. The Numerical Control allows enabling this function or not, through the use of VN274, and setting at what position to perform the resetting for each axis by using the axis parameter Proximity threshold. In fact, this latter parameter has two meanings, as explained in the paragraph Parameters in the Installation Manual. VN274, on the other hand, has the function of enabling the rollover of each axis, or not. An axis corresponds to each bit of VN274. Axis 1 corresponds to bit 1, axis 2 to bit 2 and so on, up to axis 8, which corresponds to bit 8. When a bit of VN274 is set to 1, the rollover function is enabled for the corresponding axis. N.B. Also see documentation of the axis parameter Proximity threshold in the paragraph Axis Parameters in the Installation Manual.

Page 324

M0000464

Programming Manual

VN276–283

Chapter 3: Variables

VN_FIRST_FOLL_FACT

Contains the tracking factor (×1000 with sign) The VNs from VN276 to VN283 contain numeric values that are used when the operation of axes in tracking is enabled (see VB360-VB367). The meaning of the value contained changes depending on the tracking mode used by each axis. These methods are explained in paragraph Tracking Management in chapter 2 of the Programming Manual. The table that follows shows the meanings assumed by the value of VN276-VN283 depending on the mode selected (VN324-VN331). Mode selected 0 1 2 3 4 6 7 8 9

Meaning of the value of VN276-VN283 Tracking factor x 1000 Numerator of the tracking factor Variables not used Variables not used Numerator of the tracking factor Tracking factor x 1000 Numerator of the tracking factor Tracking factor x 1000 Numerator of the tracking factor

In operation with tracking, each axis is assigned an encoder to track, i.e., an encoder that acts as master. The encoders associated with each axis are specified in VN284-VN291. VN284 contains the number of the encoder for axis 1, VN285 the one for axis 2, and so on. The values contained in VN276-VN283 are relative to the encoders specified in VN284-VN391, according to the following table: VN with tracking parameters VN276 VN277 VN278 VN279 VN280 VN281 VN282 VN283

Associated encoder specified in: VN284 VN285 VN286 VN287 VN288 VN289 VN290 VN291

N.B. Also see the documentation for VN360-VN367, VN284-VN291, VN316-VN323 and VN324-VN331

M0000464

Page 325

Chapter 3: Variables

VN284÷291

Programming Manual

VN_FIRST_FOLL_ENC

Contains the number of the tracking encoder enabled by VN (from 360 to 367). In operation with tracking, each axis is assigned an encoder to track, i.e., an encoder that acts as master. The encoders associated with each axis are specified in VN284-VN291. VN284 contains the number of the encoder for axis 1, VN285 the one for axis 2, and so on. N.B. Also see the documentation for VN360-VN367, VN276-VN283, VN316-VN323 and VN324-VN331. These methods are explained in paragraph Tracking Management in chapter 2 of the Programming Manual.

VN292–299

VN_FIRST_AX_OVD

Contains the independent override of the axis (from 1 to 8). Enabled by parameter 2. In Automatic or Manual, the NC always displays the speed override percentage above to the right. The override value specifies the percentage of speed at which the axis must move with respect to that set. The Numerical Control provides the possibility of setting a different override value for each axis using VN292-VN299. An axis corresponds to each VN. Axis 1 corresponds to VN292, axis 2 corresponds to VN293 and so on, up to axis 8, which is associated to VN299. N.B. See also documentation for VN256 and the axis parameters in the Installation Manual.

VN300

VN_SH_REG_DELAY

Indicates the number of elements present in the Shift Register. The PLC has a Shift Register available, in those firmware versions that provide for it. Its size is variable and depends on the elements that are inserted or deleted through VB368-VB372. VN300 contains the value that indicates the number of elements in the Shift Register. N.B. Also see documentation of VN368-VN372 and the paragraph Use of the Shift Register in the Appendix to the Programming Manual.

VN301

VN_NUM_PRG_START

Contains the number of the program that is executed (if the number is other than 0) at each start of Automatic. N.B. During program execution launched from VN301, FORK programs are not active. In the case in which: •

VN301 0 At the Start, the number of the program present in VN301 is displayed in VN309 and then executed. At the end of the execution, the program whose number is specified in VN308 is displayed in VN309 and then it also is executed. In this way, the two programs are executed in sequence; the first specified by the number in VN301 and the second specified by the number in VN308. This turns out to be useful, for example, when you want to execute an initialization program before the main program.

Page 326

M0000464

Programming Manual



Chapter 3: Variables

VN301 = 0 At the Start, the number of the program to execute in VN301 is ignored and only the program whose number is in VN308 is executed.

N.B. Also see the documentation for VN257, VN265, VN308 and VN309.

VN302

VN_VQ_INDX_EMERG

Upon the occurrence of an emergency, the Numerical Control ends the movement of the axes in the position in which they are found. VN302 is used to find out what position the axes stopped at. This VN contains the index of the first of the consecutive VQs that contain the values of the axis positions when an emergency occurs. If VN302 is 0, the function of saving the axis positions when an emergency occurs is disabled.

VN303

VN_VQ_INDX_FEED

The instruction 57 F ValQ sets the interpolation speed expressed in [mm/min]. The Numerical Control allows selecting a VQ to measure the value of this speed, expressed in [mm/min]. VN303 contains the index of the VQ that contains the set interpolation speed expressed in [mm/min] N.B. Also see documentation in the paragraph Linear and circular interpolation in chapter 2 of the Programming Manual and for VN340 and VN356.

VN304

VN_VQ_INDX_IN_POS

During movement, the axes reach positions that are called objective positions. At the moment in which the axes reach these positions, they stop. The Numerical Control allows saving the positions at the time in which the axes stop due to reaching the objective. VB304 is used to do this. This VN contains the index of the first of the consecutive VQs that contain the position values at the time the axes stop due to reaching the objective.

M0000464

Page 327

Chapter 3: Variables

VN305

Programming Manual

VN_GET_ORG_NUM

Contains the number of the origin to acquire (it will be acquired when VB375 is set). The Resetting procedure is used to set the system of reference used for moving the axes. The origin of this system of reference is called ORIGIN 0 to identify it as the absolute system of reference. Other origins can be set in addition, up to a maximum of 20 (see chapter 8 of the Programming Manual), and it is only necessary to make them active once (origin 0 is active by default and this is displayed on the screen of the control above to the left near the word LOC or REM). For example, the word LOC N0 indicates that the control is in LOCAL and that the active origin is number 0. Changing the number of the active origin means translating the system of reference from the previous origin to the current one and simultaneously involves the translation of all movements subsequent to the change of origin; for this reason, the change of origin is useful when you want to execute a path identical to the preceding, but translated in the plane. Using the NC instructions, this is achieved by using instruction 55 ORG n, in which you specify the number of the origin that you want to activate. VN305 contains the number of the origin that you wish to acquire through self-learning. After having moved the axes until they reach the positions of the new origin, you give an impulse to VB375. In this way, the origin whose number is specified in VN305 is stored with the positions of the self-learned axes. N.B. Also see documentation for VB374, VB375 and VN306 and in chapter 8 (Origins) of the Programming Manual.

VN306

VN_SET_ORG_NUM

Contains the number of the origin to be set (it will be set when VB374 is set). The Resetting procedure is used to set the system of reference used for moving the axes. The orgin of this system of reference is called ORIGIN 0 to identify it as the absolute system of reference. Other origins can be set in addition, up to a maximum of 20 (see chapter 8 of the Programming Manual), and it is only necessary to make them active once (origin 0 is active by default and this is displayed on the screen of the control above to the left near the word LOC or REM). For example, the word LOC N0 indicates that the control is in LOCAL and that the active origin is number 0. Changing the number of the active origin means translating the system of reference from the previous origin to the current one and simultaneously involves the translation of all movements subsequent to the change of origin; for this reason, the change of origin is useful when you want to execute a path identical to the preceding, but translated in the plane. Using the NC instructions, this is achieved by using instruction 55 ORG n, in which you specify the number of the origin that you want to activate. VN306 contains the number that specifies the origin that you want to make active for movement. To make the origin whose number is specified in VN306 active, you must give an impulse to VB374. For example, if I want to make the origin identified by number 3 active, I set this value in VN306 and I give an impulse to VB374. N.B. Also see documentation for VB374, VB375, VN305 and VN307 and in chapter 8 (Origins) of the Programming Manual.

Page 328

M0000464

Programming Manual

VN307

Chapter 3: Variables

VN_CUR_ORG_NUM

Contains the number of the active (current) origin. The choice of the orgin to activate can be made using NC instruction 55 ORG n or appropriately setting the VB and VN (VB 374 and VN306). Once one of the available origins (up to a maximum of 20) has been made active, the number that identifies the origin active at that moment is contained in VN307. N.B. Also see documentation for VB374, VB375, VN305 and VN306 and in chapter 8 (Origins) of the Programming Manual.

VN308

VN_MAIN_PRG_NUM

Contains the number of the main program. At the Start, the Numerical Control executes the program whose number is specified in VN308. However, in the case in which VN301 is 0, the program whose number is specified in VN301 is executed first and only at its completion is the program whose number is specified in VN308 executed. N.B. Also see the documentation for VN257, VN265, VN301 and VN309.

VN309

VN_CUR_PRG_NUM



Contains the number of the current program. The number of the program that the Numerical Control is executing is contained in VN309. N.B. Also see the documentation for VN257, VN265, VN301 and VN308.

VN310

VN_TX_PRG_NUM

Contains the number of the program to transmit (used for the management of programs from a PC). In transmitting .ISO files from a PC to the NC in temporary mode, VN310 contains the number of the .ISO program whose code must be transferred from the PC to the NC. N.B. For a better description of the utility of VB310, see the documentation and PLC examples in the paragraph Temporary transmission of ISO programs in chapter 2 of the Programming Manual.

M0000464

Page 329

Chapter 3: Variables

VN311

Programming Manual

VN_INDX_POS_ERR

Contains the index of the first VN that contains the position error. During movement, the axes follow a trajectory calculated by the Numerical Control. However, the axes commit positioning errors in following trajectories. The Numerical Control permits displaying the positioning errors dynamically using VN311. In fact, this VN contains the index of the first of the consecutive VNs that contain the positioning errors of the axes during movement, in impulses.

VN312

VN_CUR_STEP_NUM_H



Contains the number of the step being executed (current) H. The Numerical Control executes the steps of the program. The number that identifies the step that is executing is specified on the display of the control above to the right when in Automatic. This number is also specified by VN312 and VN313. VN312 is used to contain the high part and VN313 to contain the low part of the number that identifies the step.

VN313

VN_CUR_STEP_NUM_L



Contains the number of the step being executed (current) L. N.B. See description VN312.

VN314

VN_TX_STEP_H

Contains the number of the begin transmission step H (used for the management of programs from a PC). In transmitting .ISO files from a PC to the NC in temporary mode, VN312 contains the number that identifies the high part of the number of the step from which the transfer begins. N.B. For a better description of the utility of VB312, see the documentation and PLC examples in the paragraph Temporary transmission of ISO programs in chapter 2 of the Programming Manual.

VN315

VN_TX_STEP_L

Contains the number of the begin transmission step L (used for the management of programs from a PC). In transmitting .ISO files from a PC to the NC in temporary mode, VN313 contains the number that identifies the low part of the number of the step from which the transfer begins. N.B. For a better description of the utility of VB313, see the documentation and PLC examples in the paragraph Temporary transmission of ISO programs in chapter 2 of the Programming Manual.

Page 330

M0000464

Programming Manual

VN316–323

Chapter 3: Variables

VN_FIRST_FOLL_DEN

The VNs from VN316 to VN323 contain numeric values that are used when the operation of axes in tracking is enabled (see VB360-VB367). The meaning of the value contained changes depending on the tracking mode used by each axis. These methods are explained in paragraph Tracking Management in chapter 2 of the Programming Manual. The table that follows shows the meanings assumed by the value of VN316-VN323 depending on the mode selected (VN324-VN331).

Mode selected 0 1 2 3 4

Meaning of the value of VN276-VN283 Variables not used Denominator of the tracking factor Variables not used Variables not used Denominator of the tracking factor

In operation with tracking, each axis is assigned an encoder to track, i.e., an encoder that acts as master. The encoders associated with each axis are specified in VN284-VN291. VN284 contains the number of the encoder for axis 1, VN285 the one for axis 2, and so on. The values contained in VN316-VN323 are relative to the encoders specified in VN284-VN391, according to the following table:

VN with tracking parameters VN316 VN317 VN318 VN319 VN320 VN321 VN322 VN323

Associated encoder specified in: VN284 VN285 VN286 VN287 VN288 VN289 VN290 VN291

N.B. Also see the documentation for VB360-VB367, VN284-VN291, VN276-VN283 and VN324-VN331.

M0000464

Page 331

Chapter 3: Variables

VN324÷331

Programming Manual

VN_FIRST_FOLL_MODE

The movement of the axes in tracking mode provides several operating modes. The choice of the tracking mode can be specified for each axis using the VNs from VN324 to VN331. An axis corresponds to each VN. Axis 1 is associated to VN324, axis 2 to VN325 and so on, until axis 8, which is associated to VN331. The various modes, from 0 to 9, are explained in the paragraph Tracking Managment in chapter 2 of the Programming Manual.

VN332

VN_FIRST_ORG_OFFS

Contains the index of the first VQ for the management of the offset in origin acquisition. N.B. Variable available from firmware version 2.21 on.

VN333

VN_FIRST_SCALE_FCT

Contains the index of the first VQ for the management of the scale factor. It is possible to associate a scale factor to each axis of the Numerical Control. In this way, without changing the values of the working positions, I can work a new piece of larger or smaller dimensions by setting the scale factor. If, for example, I want to repeat a work to obtain a piece of double size of the preceding piece, I just set the scale factor of the axes that perform the movement to a value of 2. VN333 contains the number of the first VQ used as the Scale Factor (0 = scale factor disabled). E.g.: in a control that can manage up to 4 axes, by setting VN333 to a value of 251, you will have variables VQ251 to VQ254 containing the scale factor applied to the axes: VQ251scale factor axis 1 VQ252scale factor axis 2 VQ253scale factor axis 3 VQ254scale factor axis 4 Setting VN333 to 0 disables the scale factor; this is equivalent to using the scale factor with all variables set to the value 1.000. N.B. Variable available from firmware version 2.21 on. N.B. Also see documentation in the paragraph Scale Factor in the Programming Manual.

Page 332

M0000464

Programming Manual

Chapter 3: Variables

VN334

VN_EMERG_ERR_NUM



When an emergency error occurs, the Numerical Control generates codes that identify what type of error occurred. The number that identifies the error that occurred is set in VN344. The number is VN344 identifies the emergency error according to the following table. Error Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

17

18

19 20 21 22 23

Error Type Emergency input active Tracking error End of travel switch triggered Out of software limits Emergency from PLC CAN Controller error Node Guarding Life Time error Slave Node error Request Start with error Can Open active Nothing Open Can Node Found Open Can Parameters error Can Open error from Drive Future Use Future Use Internal error ProfiBus not in-line error. This error appears in VN344 when it happens that the NC is no longer connected to the master through the ProfiBus. Profibus Read Mail Data error. This error appears in VN344 when the NC is not able to read the ProfiBus card in the Mail Data memory area. Profibus Write Mail Data error. This error appears in VN344 when the NC is not able to write to the ProfiBus card in the Mail Data memory area. Profibus Request in Area error. Profibus Release in Area error. Profibus in phase of Initialization of ProfiBus Card error. Spartan Card error Number of last emergency error

N.B. Also see the documentation relative to error codes in chapter 6 of the Programming Manual and for VN335.

M0000464

Page 333

Chapter 3: Variables

Programming Manual

VN335

VN_EMERG_ERR_PAR



When an emergency error occurs, the Numerical Control generates codes that identify what type of error occurred. In addition to the number that identifies what type of emergency occurred (VN334), the Numerical Control also specifies the number of the parameter associated to the error that occurred in VN335. The values and the meaning of the paramters are explained in the following table Emergency error (VN334) 1 2 3

Meaning of the parameter associated to the error (VN335) Null Axis number Code

4 5 6 7 8

Axis number Null Null Node Number Node Number

Parameter values No Value From 1 to 8 See the following Code layout From 1 to 8 No Value No Value 1-127 1-127

Code VN335 with VN334 = 3 In the case in which VN334 has a value of 3, a number appears in VN335 that indicates which limit switches were triggered. In this case, VN335 becomes a bit variable. Each bit indicates an axis limit switch according to the following layout: Bit 0 1 2 3 4 5 6 7

Value 1 2 4 8 16 32 64 128

Meaning Min limit switch axis 1 Max limit switch axis 1 Min limit switch axis 2 Max limit switch axis 2 Min limit switch axis 3 Max limit switch axis 3 Min limit switch axis 4 Max limit switch axis 4

So, if there was an emergency error due to the triggering of the Max end of travel limit switch of axis 4, we would have a value of 3 in VN334 and a value of 128 in VN335. N.B. Also see the documentation relative to error codes in chapter 6 of the Programming Manual and for VN334.

Page 334

M0000464

Programming Manual

VN336

Chapter 3: Variables

VN_PRG_IN_F1

Contains the number of the active program in F1. Using the Variable Setting method of the F1 key, you access programms that use instructions suitable for setting variables. The program that begins execution depends on the value of several VNs and VBs as specified in the flowchart in the paragraph Variable Setting - F1 key in the Programming Manual. The number of the executing program in the mode of Variable Setting using the F1 key is specified in VN336. N.B. Variable available from firmware version 3.26c on. N.B. Also see documentation of VN342, VN308, VB261 and VB373 and the flowchart in the paragraph Variable Setting-F1 key in the Programming Manual

VN337

VN_VQ_TOOL_COORD

Contains the index of the first VQ in which the positions reached with a stop without a forced STOP are stored in tool coordinates. N.B. Variable available from firmware version 3.28b on.

VN338

VN_TX_WAIT_PRG_NUM

In transmitting .ISO files from a PC to the NC in temporary mode, VN338 contains the number of the .ISO program whose code the NC is waiting for. N.B. Variable available from firmware version 3.28c on. N.B. For a better description of the utility of VB338, see the documentation and PLC examples in the paragraph Temporary transmission of ISO programs in chapter 2 of the Programming Manual.

VN339

VN_SEL_AX_NUM

Contains the number of the selected axis. In moving axes in Single Manual, there is the possibility of selecting which axis to move with the JOG+ and JOG- keys. To select the axis that you want to move, just enter the axis number in question in the bottom right of the screen in Manual and confirm with [ENTER]. The number of the selected axis is specified in VN339. N.B. Also see documentation in the paragraph Manual Movement in the Programming Manual.

M0000464

Page 335

Chapter 3: Variables

VN340

Programming Manual

VN_VQ_INDX_SET_F

If it is > 0, when you disable the speed setting in ISO files using VB396, speed set is contained in the VQ whose index is specified in this VN; otherwise, no speed is set. In ISO files, instruction F allows changing the speed of axis movement. It is possible to disable all F instructions in an .ISO file by means of VB396. In the case in which the F instructions of an .ISO file are disabled, the new speed of reference for movement is contained in the VQ whose index is specified in VN340. If VN340 is not >0, no speed is set. N.B. Variable available from firmware version 3.30b on. N.B. Also see the documentation in paragraph ISO Codes Recognized in chapter 2 of the Programming Manual and for VB396, VN303 and VN356. N.B. VN340 can be used to set the speed, in [mm/min], for movements in Cartesian coordinates in Multiple Manual. If VN_VQ_INDX_SET_F (VN340) contains a value other than 0, this value is considered the index of the VQ that contains the speed value in [mm/min] to be set (VN340 function implemented in firmware version 3.73a).

VN341

VN_APPR_F1

Contains the value that is read when VB271 is used as Enter in F1. In Variable Setting with the F1 key, it is possible to self-learn the value VBs, VNs and VQs. In the case of the VNs, the value that is self-learned is that contained in VN341. N.B. Variable available from firmware version 3.30g on. N.B. Also see documentation in the paragraph Self-Leaning by F1 in chapter 2 of the Programming Manual.

VN342

VN_START_F1_PRG

Allows setting the starting program number in F1. When F1 is pressed, the Numerical Control executes an NC program, if it is present. The program that is executed is set by following the logic illustrated in the flowchart in the paragraph Variable Setting - F1 key in the Programming Manual. In the case in which VN342 is other than 0, pressing the F1 key executes the program whose number is specified by VN342. N.B. Variable available from firmware version 3.31a on.

Page 336

M0000464

Programming Manual

VN343

Chapter 3: Variables

VN_CN_ACT_PAGE



When the Numerical Control is in Automatic, there can be different ways of displaying on the screen depending on the function keys pressed (F1, F2, F4). VN343 contains the index that specifies the page displayed in Automatic according to the following coding: VN343 Value Page activated 0 normal page (position); 1 page F1 (variable setting); 2 page F2 (Editor display); 4 page F4 (active alarms). N.B. Variable available from firmware version 3.31a on. N.B. Also see documentation for VB399 and the paragraph Messages in chapter 2 of the Programming Manual.

VN344

VN_CN_SET_PAGE

Allows setting the page displayed in Automatic from the PLC; VN344 contains the value that specifies the display settings of the page in Automatic. The values of VN344 have the following meanings: 0 normal page (position); 1 page F1 (variable setting); 2 page F2 (Editor display); 4 page F4 (active alarms). The number relative to the desired page is placed in this VN. The change of page occurs when an impulse is given to VB399. The function described above is valid for the NC systems except for the Palm computer. For this latter system, the page displayed in Automatic is set at the time in which I place the code (one of those in the table above) in VN344. I.e., with the Palm computer, activating VB399 with an impulse has NO effect. N.B. It is advisable to use VN383 to set the various display pages in Automatic. N.B. Variable available from firmware version 3.31a on. N.B. Also see the documentation for VN343 and VB399.

M0000464

Page 337

Chapter 3: Variables

VN345

Programming Manual

VN_MAIN_ERR_NUM



When an error occurs in the Automatic cycle or in the Resetting phase, the Numerical Control generates codes that identify what type of error occurred. The value of the code that identifies the error is set in VN345. The values associated to the errors are as follows: Error Code 17 20

Error Type Automatic cycle error Resetting cycle error

N.B. Variable available from firmware version 3.31b on. N.B. Also see the documentation relative to error codes in chapter 6 of the Programming Manual and for VN346.

VN346

VN_MAIN_ERR_PAR



When an error occurs in the Automatic cycle or in the Resetting phase, the Numerical Control generates codes that identify what type of error occurred. In addition to this value, a parameter is specified that identifies which event generated that type of error (for example, instructions executed in an erroneous manner). The value of the parameter is specified in VN346. For example, if an error occurred in the Automatic cycle during the execution of instruction 4 GOSUB, a value of 17 will be placed in VN345, while a value of 100 will be placed in VN346. The values that specify the parameter associated to the error are coded in the paragraph Automatic Cycle Error Codes in chapter 6 of the Programming Manual. N.B. Variable available from firmware version 3.31b on. N.B. Also see the documentation relative to error codes in chapter 6 of the Programming Manual and for VN345.

VN347

VN_ZERO_AX_NUM

Allows resetting only the specified axis. When the axes are zeroed (item Resetting Axes on the Main Menu of the Numerical Control), all the axes are zeroed according to the sequence set in machine parameter Sequence of axes to be zeroed. The Numerical Control also permits resetting just one axis. To do this, we use VN347 in which the number of axis that is to be zeroed by itself is specified. N.B. Variable available from firmware version 3.31b on.

Page 338

M0000464

Programming Manual

VN348÷355

Chapter 3: Variables

VN_FIRST_TEACH_VEL

The contents of the VN variables from VN348 to VN355 assume two different meanings depending on the value of VB418. In the case in which VB418 is 0, the VNs from VN348 to VN355 contain the speed of the axis (from 1 to 8) in % × 10 (i.e., 1000 = 100%), which is read in self-learning in EDITOR - F2. When the self-learning impulse (VB271) is generated with VB405 = 1. In addition to the instruction AX n TO m, the instruction VEL AX n = v % is generated. In the case in which: VB418 is 1, the VNs from VN348 to VN355 contain the numeric value that identifies the phase of the axis. In this case, the values have the following meaning: Value 0 1 2 3 4 5 6 7 8 10

Meaning Axis stopped Acceleration phase Linear phase (V=constant) Deceleration phase Movement phase Phase of Master axis enslavement Phase of Slave axis enslavement Phase of Slave axis enslavement 2 User phase Number phases

N.B. Variable available from firmware version 3.37c on. N.B. Also see documentation for variable VN418 and the paragraph Self-learning in Program Editor in chapter 2 of the Programming Manual.

VN356

VN_VQ_FEED

When the Numerical Control sets the speed of movement with instruction 57 F ValQ, the value that represents the speed of the axis is set in VN303. This value represents the maximum axis speed. However, the maximum speed is not reached instantaneously, but following a precise dynamic. VN356 contains precisely the index of the VQ that contains the calculation of the instantaneous real interpolation speed in [mm/min]. N.B. Variable available from firmware version 3.37e on. N.B. Also see documentation in the paragraph Linear and circular interpolation in chapter 2 of the Programming Manual and for VN340 and VN303.

M0000464

Page 339

Chapter 3: Variables

VN357

Programming Manual

VN_MODEM_STAT



Shows the status of the Modem initialization and connection procedure. The meaning of the value contained in VN357 is specified in the following coding: VN357 Value 0 1 2 3 4 5 34 - $22 35 - $23 36 - $24 37 - $25 64 - $40

Meaning. Modem mode not enabled (at power-up) send Modem initialization string awaiting response to status 1 command awaiting confirmation of "autoanswer" set-up awaiting "RING" awaiting "CONNECT" error or disabling during status 2 error or disabling during status 3 error or disabling during status 4 error or disabling during status 5 connection made.

N.B. Variable available from firmware version 3.38 on. N.B. Also see the documentation for VN356, VN358 and VB406.

VN358

VN_MODEM_CDM

VN358 specifies the command [low byte (L)] and the serial line used [high byte (H)]. The values assumed by VN358 and their meaning are the following. •

the command [low byte (L)]: 0 - initializes in "autoanswer"



and the serial line used [high byte (H)]: 0 - uses COM1 1 - uses COM2

In practice, the following values are set: 0 uses COM1 - initializes in "autoanswer" 256 uses COM2 - initializes in "autoanswer" N.B. Variable available from firmware version 3.38 on. N.B. Also see the documentation for VN356, VN357 and VN406.

Page 340

M0000464

Programming Manual

VN359

Chapter 3: Variables

VN_VB_INDX_MSG

The Numerical Control allows the management of alarm messages as explained in the paragraph Messages in chapter 2 of the Programming Manual. Moreover, by using .ISO files, it is possible to generate messages using VN359. To do this, you must first enter a line in the listing of the .ISO program that contains the message that you want to display, between round parentheses. For example, the message (OIL FINISHED) To display the message from the .ISO file, you must write, from the PLC, the index of the VB to which you want to associate the message in VN359. For example, if I want the message (OIL FINISHED) to be displayed when VB120 goes to 1, I must place the value 120 in VN359. N.B. Also see documentation in the paragraph Messages in chapter 2 of the Programming Manual.

VN360

VN_SOGL_PROX_AX



Bit variable with flags of axes at proximity threshold. The bits of this variable indicate if the axes are in proximity of the objecive position (i.e., are at a distance less than the relative proximity threshold). The theshold values of the real axes are only settable through instructions of the type SETP AX n P 20 VAL m. The threshold value of the virtual axis can be set with instruction SETMAC P 7 VAL or directly from the machine parameter Virtual axis proximity threshold. Remember that the virtual axis is the one after the last real axis managed by the NC (for example, if we have a system of up to 4 axes, the virtual axis is axis 5). N.B. Variable available from firmware version 3.43a on.

VN361

VN_TYPE_MOVE



With dedicated firmware, the Numerical Control permits movements in interpolated mode. VN361 allows knowing which interpolated movement the Numerical Control is executing. A movement corresponds to each bit according to the following table. If a bit is 1, it means that the associated movement is being executed. Bit No. 0 1 2 3 4 5 6 7

Interpolated movement associated to the bit ARC arc (0 = circumference) CW direction (1 = CW, 0 = CCW) AGG additional axes RG arc given the radius LIN linear movement MOV point to point movement EXE movement execution G0 interpolated type G0

N.B. Variable available from firmware version 3.43a on.

M0000464

Page 341

Chapter 3: Variables

VN362

Programming Manual

VN_TYPE_AUTOAPP

The Numerical Control is capable of self-learning particular profiles. Each profile is associated to an index and, at the time of self-learning, this index is specified in VN362. The codes of the profiles that can be self-learned are shown below. APP_INIT 0 APP_LINEA 1 APP_ARC_TG 2 APP_ARC_3P 3

Initialization Line Tangential arc of circumference Arc of circumference by 3 points

N.B. Variable available from firmware version 3.49c on. N.B. Also see the documentation for VB416.

VN363

VN_TIMER_SEC_RES

Contains the number of residual seconds in the "awaiting timer" state (state 13). The Numerical Control provides the possibility of inserting await timer instructions (such as, instruction 17 TIME ValQ). VN363 indicates the number of seconds that are left until the end of the count. N.B. Variable available from firmware version 3.50a on. N.B. Also see documentation for instruction 17 TIME ValQ.

VN364

VN_VQ_POS_AX

Contains the index of the first of the VQs in which the axis positions are written. The positions are absolute with 3 decimal places. After specifying the index of the first of the VQs that contain the axis positions, the Numerical Control reserves as many consecutive VQs as there are active axes. If, for example, there are 3 axes active and a value of 8 is specified in VN364, then VQ8, VQ9 and VQ10 will be reserved. N.B. Variable available from firmware version 3.51 on.

Page 342

M0000464

Programming Manual

VN365

Chapter 3: Variables

VN_VIEW_MOD

The Numerical Control allows displaying the positions in MmRif modulous format. VN365 is used to enable this mode of display. An axis corresponds to each bit of VN365. Axis 1 corresponds to bit 1, axis 2 to bit 2 and so on, up to axis 8, which corresponds to bit 8. By setting one or more bits of VN365 to 1, I enable the corresponding axes for a display in modulus MmRif. To explain the meaning of the display in modulus MmRif format, we provide the following example. Example. If axis 4 is a rotating axis with the following parameters: • •

Movement of Reference = 360.00 Impulses of Reference = 4096

then: •

If I set a value of 8 in VN365 (bit 4 enabled for axis 4), then the current position of axis 4 is displayed in the interval 0.0 ÷ 359.9. I.e., when it reaches 360 the display, and only that, of the position of axis 4 restarts from 0.



If no value is set in VN365 (i.e., I set it to 0), then the current position of axis 4 is displayed without zerooing when it reaches the value 360 and continues the count for values even greater than 360.

N.B. Variable available from firmware version 3.52d on.

VN366

VN_INS_ISTR

In Self-learning the Numerical Control provides the ability to self-learn instructions with a parameter, in addition to those explained in the paragraph Self-learning from the Program Editor in chapter 2 of the Programming Manual. VN366 and VN367 are used to perform this type of self-learning. Once you have entered self-learning with F2 or F3, you set the number of the instruction code that you want to self-learn in VN366 and the value of its parameter in VN367. If, for example, VN366 contains the value 4 and VN367 contains 1200, it generates the instruction: 4 GOSUB 1200 N.B. Variable available from firmware version 3.52e on. N.B.: the NC automatically resets the value of VN366 to 0. N.B. Also see documentation in the paragraph Self-Leaning from the Program Editor in chapter 2 of the Programming Manual.

M0000464

Page 343

Chapter 3: Variables

VN367

Programming Manual

VN_INS_PAR1

Also see the documentation for VN366. N.B. Variable available from firmware version 3.52e on.

VN368

VN_RW_VQ

The Numerical Control provides the possibility of reading or writing a VQ using two VNs of which one contains the whole part and the other the fractional part. VN368 contains the index of the VN that contains the whole part; the VN following that whose index is specified in VN368, contains the fractional part. VN369 contains the index of the VQ. The VQ is read or written depending on whether VN368 is positive or negative. •

If VN368 = 0 Then, reading or writing a VQ using two VNs is disabled



If VN368>0 Then the content of the two VNs is copied to the VQ



If VN368 0, the value set represents the threshold for beginning execution of the ISO file; i.e., it is possible to begin execution before the complete filling of the transmission buffer, thus reducing wait time. N.B. Variable available from firmware version 3.59 on. N.B. For a better description of the utility of VB371, see the doucmentation and PLC examples in the paragraph Temporary transmission of ISO programs in chapter 2 of the Programming Manual. Also see the documentation for VB385–VB389 and VB393.

VN372

VN_FMT_DATE

Numeric Variable for managing the format of the date and time in Numerical Controls with dedicated firmware.

VN373

VN_WAKE_FUN

Numeric Variable for managing the date and time in Numerical Controls with dedicated firmware.

VN374

VN_TIPO_RACCORDO

In working with tools, the Numerical Control allows selecting the type of circular connector to use to connect two linear trajectories. The value that identifies the type of connector used is set in VN374 according to the following table. VN374 Value 0 1 2

Type of CONNECTOR connector disabled connector with specification of the distance from the transition point connector with specification of the radius

When the connector is enabled, VQ97 contains the value, in [mm], of the distance from the point of transition (mode 1) or the radius of the connector (mode 2). N.B. Variable available from firmware version 3.61c on. N.B. Function only enabled for controls with dedicated firmware.

Page 346

M0000464

Programming Manual

Chapter 3: Variables

VN375

VN_ MAIN_ERR_CODE

VN375 contains several error codes regarding the movement of the axes in Automatic. The following table shows the values of the codes and a brief description. VN375 Value 5 6 7 8 9 -1001 -1002 -1101 -1102 -1103 -1104 -2003 -2004 -4000 -4001 -4002 -5001 -5002 -5003 -5004 -5005 -5006 -5007 -5008 -5009

Description Axis number error Phase error Objective position out of range Change speed type parameter error Pointer to invalid CHG structure Axis disabled for movement (see VB288) Axis not active (set from axis parameters) Out of software limits (_LineAx()) Delta calculation error (_LineAx()) Out of software limits (Linear interp.) (_LineAx2()) DeltaS calculation error (Lineare interp.) (_LineAx2()) Error radius difference (CircleAx()) Error radius difference (ExecGtcCircAx()) Error type of movement requested Error movement beyond the revolution (Type 1) Error movement beyond the revolution (Type 2) Error in calculating circular connector Error in calculating circular connector Error in calculating circular connector Error in calculating circular connector Error in calculating circular connector Error in calculating circular connector Error in calculating circular connector Error in calculating circular connector Error in calculating circular connector

N.B. Variable available from firmware version 3.61c on. N.B. Also see documentation in the paragraph Error Codes in Automatic in chapter 6 of the Programming Manual.

VN376

VN_PAGE_ID

With dedicated firmware, the Numerical Control is able to manage the user pages described in the relative chapter of the SiaxEd manual. Each page is assigned a unique identification number that allows the control to recognize which of the pages is displayed on the screen. This number is also set in VN376 for any logic implementation by the PLC. N.B. In firmware version 4.36, VN376 is also writable. I.e., in addition to containing the ID of the current page, if forced to a valid page ID, this latter is loaded as the current page. N.B. VN376 is only managed in firmware that provides for the management of graphic User Pages. M0000464

Page 347

Chapter 3: Variables

Programming Manual

N.B. Also see documentation in the paragraphs Page Settings and Transmission of User Pages to the NC in chapter 3 of the SiaxEd Manual (in particular the Cod parameter).

Page 348

M0000464

Programming Manual

VN377

Chapter 3: Variables

VN_PAGE_BASE_ADDR

For firmware that supports it, the Numerical Control allows managing the User Pages explained in the SiaxED Manual. The management of the User Pages requires the use of several VNs. VN377 is one of these. After compilation, the User Pages are saved in memory. The Numerical Control allows saving them in various areas of memory. VN377 is used to specify which memory area to use for saving the User Pages. VN377 has the following values (also called memory LAYOUT). VN377 layout (0) 1 2 3 4 (1)

Memory type (Internal to Firmware) Flash–ROM RAM RAM RAM

Address (HEX) ****** (1) (80000 H) H 110000 H 200000 2C0000 H

The LAYOUT VN377=0 is used for special firmware implementations.

N.B. In the case in which VN377 = 0, the NC provides for management of the F2 key (only in the case where there are no user pages saved in memory) N.B. VN377 is only managed in firmware that provides for the management of graphic User Pages. N.B. Variable available from firmware version 3.72a on. N.B. Also see documentation in the paragraph Transmission of User Pages to the NC in chapter 3 of the SiaxEd Manual (in particular the Cod parameter).

VN378

VN_VQ_OBJ_AX

When in the Multiple Manual state (VB266=1), the Numerical Control allows setting the objective positions of the axes from the keyboard. Once set, these positions can be placed in the VQs. VB378 is used to do this. This VN contains the index of the first of the VQs that contain the value of the axes objective positions set in Multiple Manual mode. N.B. This VN is only available for dedicated firmware. N.B. Also see the documentation for VB266.

M0000464

Page 349

Chapter 3: Variables

VN379

Programming Manual

VN_OBJ_ID

Each User Page (VN376) is identified by a unique indentification number. However, inside each User Page, there are objects (Object Number, Object Switch, etc.). Each object of the User Page is identified by a unique indentification number. At the time of the selection of an object, this number is contained in VN379. This “Object Code” is unique within a page, while it is NOT unique in the context of the Project, since there can be various objects in different pages that have the same identification code. So, within a project, the objects are uniquely identified by the pair of values specified by VN376 and VN379. N.B. In firmware version 4.36, VN379 is also writable. So, it is possible to force the object to be placed in input; if the ID of the specified object is < 0, the ID of the current object in input is restored. N.B. VN379 is only managed in firmware that provides for the management of graphic User Pages. N.B. Variable available from firmware version 3.72a on. N.B. N.B. Also see documentation in the paragraph Transmission of User Pages to the NC in chapter 3 of the SiaxEd Manual. VN379 contains the IDENTIFIER of the object currently in input (valid only for the LCD pages configurable by the user)

VN380

VN_AX_QUO_MODE

The Numerical Control allows acquiring the positions of the axes depending on the mode specified by a code. VN380 and VN381 are the VNs used to manage this acquisition. VN380 contains: •

the number of the axis whose position to acquire, in the LOW byte. If VN380= 0, the positions of all the NC's active axes are acquired and their values are set in consecutive VQs. The first of these has an index equal to the value contained in VN381, acquisition of the position of all axes in consecutive VQs



the type of acquisition, conforming to the following codes, in the HIGH byte:

You must enter the hexadecimal value in VN380 (see the following example). Value 0 1 2 3 4 5 6 7

Page 350

Coding Real Position with its own decimals (with origins) Real Position with 3 decimals (with origins) Real Absolute Position with 3 decimals Theoretical Absolute Position with 3 decimals Objective Position with its own decimals Objective Position with its own decimals Real Absolute Position with its own decimals Cartesian Axes

M0000464

Programming Manual

Chapter 3: Variables

Example: If the following VNs are set with: VN380 = 301 Hex = 769 Dec VN381 = 200 Dec Then in VQ200 (VQ index specified in VN381) will be updated with the position of axis 1 (low bytes VN380) with mode 3, theoretical absolute position with 3 decimals (see previous table). N.B. Variable available from firmware version 3.63 on. N.B. Also see the documentation for VN381.

VN381

VN_QUO_VQ_INDX

The Numerical Control allows acquiring the positions of the axes depending on the mode specified by a code. VN380 and VN381 are the VNs used to manage this acquisition. If VN381 contains a number > 0 and < 255, this represents a request to acquire position and index of the destination VQ. N.B. Variable available from firmware version 3.63 on. N.B. After the acquisition, VN381 is ZEROED by the NC N.B. Also see the documentation for VN380.

VN382

VN_DATA_ENAB

When the SiaxED development tool is used, there is an object called “User Program Manager.” The Numerical Control must reserve 11 consecutive VNs to manage this object. VN382 is used to reserve these VNs. In fact, VN382 contains the index of the first of the consecutive VNs to be reserved for the management of the “User Program Manager” object. N.B. Variable available from firmware version 3.72a on. N.B. N.B. Also see documentation in the paragraph Uses Program Object Manger in chapter 3 of the SiaxEd Manual.

VN383

VN_PUT_KEY

The Numerical Control is able to simulate the pressing of a key through the use of VN383. The code of the key whose pressing you want to simulate is entered in VN383 using suitable PLC logic. The Numerical Control interprets it and behaves as if the key, with the recognized code, had been pressed on the keyboard. For example, if I want the alarms page (activated with function key F4) to appear when an alarm occurs, I write a PLC logic that places the number 68 (F4) in VN383. N.B. Variable available from firmware version 3.65 on. N.B. Also see documentation in the paragraph Key Codes in the Appendix of the Programming Manual.

M0000464

Page 351

Chapter 3: Variables

Programming Manual

VN384

VN_VAR_VIEW_TICK

The values of the variables displayed on the screen in the graphic control pages are updated with a certain period. The Numerical Control provides the possibility of changing the value of this period (expressed in [ticks]) by using VN384. N.B. Variable available from firmware version 3.65c on.

VN385

VN_MODE_PRG_LIST

In the GOSUB instruction (for the time being only on the palm computer) of the Program Editor on the NC, it is possible to select the program using a list rather than entering the number; by pressing the PROG key, a list of programs will appear from which it is possible to select the program to enter; the format of the list, i.e., the type of programs displayed, can be configured: the bit coding of the program requested is passed in VN_MODE_PRG_LIST (VN385): 128

64

32

16

8

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3

4

2

1

Value to be set

Bit 2 Bit 1 Bit 0 NC Prg. ISO Prg. Data Prg.

With Range With Specification Also hidden

Page 352

M0000464

Programming Manual

Chapter 3: Variables

The following table shows the description of the bit and the other VNs that must be managed to correctly implement the list of programs using VN385. BIT 0 1 2

Name NC Prg. ISO Prg. Data Prg.

3 4 5

Not used Not used With Range

6

With Specification

7

Also hidden

Description List with NC programs List with ISO programs List with user programs. In this case, you must specify the base matrix of the user programs to be displayed. To do this, you must enable bit 6 of VN385 and specify the number of the base matrix in VN408 Enables the possibility of displaying only programs whose numbers are found within a range. In addition to enabling VN385 with bit 5, you must specify the limits of the display interval. The lower limit is specified in VN406, while the upper limit of the interval is specified in VN407 (limits inclusive) Enables the possibility of specifying the number of the program of the base matrix if the list also contains user programs (bit 2 of VN385 active). In the case in which bit 6 of VN385 is active, the number of the base matrix is specified in VN408. Enables the possibility of also displaying programs hidden by machine parameter in the list.

VN385 also contains several bits for the management of I/O descriptors for the Program Editor. The bits used are shown below. As regards their description, we refer you to the paragraph I/O Descriptors in this manual. 32768 16384 8192 4096 2048 1024

512

256

Value to be set

Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 DIG IN ON DIG IN OFF DIG OUT ON DIG OUT OFF N.B. Variable available from firmware version 4.08 on for the management of I/O bits, while from firmware version 4.35 on for the management of bits for the display of programs. N.B. Also see documentation in the paragraph I/O Descriptors in this manual. N.B. Also see variables VN406, VN407 and VN408.

M0000464

Page 353

Chapter 3: Variables

VN386

Programming Manual

VN_CUR_CN_LANG

The variable (VN386) contains the code of the current language of NC messages. The numeric value of VN386 corresponds to the machine parameter LINGUA increased by 1. N.B. Variable available from firmware version 3.70 on. N.B. Also see documentation for Machine Parameters in the Installation Manual.

VN387

VN_DISAB_STD_VIEW

The variable (VN387) allows disabling the standard displays; each bit represents a machine state conforming to the coding shown below; if the bit corresponding to the current machine state is 1, standard displays are not executed. STATE ST_MENU ST_AUTO ST_MAN ST_PARAM ST_TEST ST_TSTV ST_SEMI ST_INIEE ST_ZERO ST_EDIT ST_EMERG ST_APPR

BIT 0 1 2 3 4 5 6 7 8 9 10 11

DESCRIPTION machine stopped (in menu) Automatic cycle axes in manual parameter acquisition test state speed test state semi-automatic cycle EEPROM initialization axes resetting program editor emergency self-learning state

VALUE 1 2 4 8 16 32 64 128 256 512 1024 2048

E.g.: by writing the value 7 (bit 2, 1 and 0) in VN387, the standard displays relative to the Main Menu (bit 0), Automatic (bit 1) and Manual (bit 2) states will not be executed; the User Pages will be displayed for the Manual and Automatic states N.B. Variable available from firmware version 3.76 on.

VN388

VN_LAST_PRG_REC

Variable VN388 contains the number of the last program sent to the NC and correctly stored.

Page 354

M0000464

Programming Manual

Chapter 3: Variables

VN389

VN_TIME_DATE_IDX

Variable VN389 contains the index of the first of 7 consecutive VNs that contain the current date and time, in the following order: Hours

Minutes

Seconds

Day

Month

Year

Day of the Week

N.B. Variable available from firmware version 4.08 on in systems in which an internal clock is available or in systems in which the date and time information is sent from the PC.

VN390

VN_DATA_BARC_NUM

VN390, together with VN391, is used for managing the barcode. VN390 specifies the data program number that manages the strings acquired by the barcode reader. If the initialization of the barcode is not successful, VN391 contains the error code conforming to the following coding: VN390 Value (Error Code) -1 -2 -3 -4

Meaning Program number specified in VN390 not valid (>9999) Data program specified in VN390 not present The program specified in VN390 is not a data program The serial port (COM) specified in VN391 in the initialization phase is not valid

N.B. VN390 is only available for dedicated firmware.

VN391

VN_BARC_STATO

VN391, together with VN390, is used for managing the barcode. In the initialization phase, it is necessary to specify the serial port that you want to use for the barcode in VN391, according to the following coding: Serial port used Com1 Com2 Com3 (if available)

Value in VN391 1 2 3

Correct initialization is reported by the value 8192 in VN391. After initialization, VN391 indicates the state of the NC as regards the reading of the barcode.

M0000464

Page 355

Chapter 3: Variables

Programming Manual

If the reading of the barcode is successful, VN391 contains the following coding: High byte Number of steps of the data program processed

Low byte Number of characters received

Example: If the string received from the serial port is 14 characters long and 3 steps were processed (i.e., the user program for managing the barcode consists of 3 steps), in VN391 you will have the value: (3 * 256) + 14 = 782 VN391 can assume the following values with the following coding: VN391 Value 8192 16384

Meaning Initialization correctly executed Release serial port and disable barcode management Number of steps processed (i) *256 + Num characters received String reception timeout; n = number of characters received

I*256+Num -n

N.B. VN391 is only available for dedicated firmware.

VN392

VN_COPY_VA

VN392 (VN_COPY_VA) allows copying a VA t another VA. VN392 contains: - Index of the source VA on the High byte - Index of the destination VA on the Low byte

BYTE HIGH

BYTE LOW VA destination index VA source index

Example: If you want to copy VA2 to VA10, VN392 is set to: VN392 = 2 * 256 + 10 = 522 N.B. VN392 returns to 0 after the copy of the source VA to the destination VA. N.B. Variable available from firmware version 4.19 on.

Page 356

M0000464

Programming Manual

VN393

Chapter 3: Variables

VN_DATA_CN_MASTER_NUM

VN393 is used in managing the NC Master Protocol. VN393 specifies the data program number that manages the sending of commands by the NC Master. In addition, VN293 contains the error for managing the NC Master Protocol. The error codes are explained in paragraph NC Master Protocol. N.B. Variable available with dedicated firmware. N.B. Also see paragraph NC Master Protocol in this manual.

VN394

VN_CN_MASTER_STATO

VN394 is used in managing the NC Master Protocol. During the intialization phase, VN394 specifies the communications serial port according to the codes explained in paragraph NC Master Protocol. N.B. Also see paragraph NC Master Protocol in this manual.

VN395

VN_CN_MASTER_NUM_SENT

VN395 contains the number of packets successfully transmitted (send request + return response) in managing the NC Master Protocol. N.B. Also see paragraph NC Master Protocol in this manual.

VN396

VN_FASE_AZZERAMENTO

In Sipro systems, it is possible to find out what phase axis resetting is in. VN396 contains the coding of the state of the procedure for resetting an axis. VN396 can assume the following values: VALUE 1 2 3 4 5 6

MEANING SEEK ZERO MICRO ZERO MICRO FOUND AWAITING ZERO MICRO RELEASE ZERO MICRO RELEASED AWAITING ZERO NOTCH INTERRUPT ZERO NOTCH INTERRUPT ARRIVED

N.B. Variable available from firmware version 4.23 on.

VN397

VN_DISAB_NG_COP

In NC systems that provide Can Open, VN397 allows disabling the NodeGuarding messages. N.B. Also see Can Open specifications for the NodeGuarding messages function.

M0000464

Page 357

Chapter 3: Variables

VN398

Programming Manual

VN_MODBUS_COM

VN398 contains the number that identifies the serial port to be used for communications using the MODBUS protocol. The ModBus protocol is enabled when VN398 has a value other than 0. N.B. Also see paragraph MODBUS "Slave" Protocol Management in this manual. N.B. Variable available from firmware version 4.30 on.

VN399

VN_MODBUS_COM_MODE

VN399 contains the number that identifies the configuration parameters of the serial port for communications using the MODBUS protocol. N.B. Also see paragraph MODBUS "Slave" Protocol Management in this manual. N.B. Variable available from firmware version 4.30 on.

VN400

VN_STD_STATE_NUM

VN400 contains the number that identifies the state of the excuting NC program. The state codes for the executing program are described in the paragraph Instruction Priorities. N.B. Also see the paragraph Instruction Priorities in this manual. N.B. Variable available from firmware version 4.33 on.

VN401

VN_OMNI_OPER

VN401 contains the number that identifies the operations in progress in Single State. VN401 is a bit variable. There is a meaning for each bit. When the bit is 1, it means that the operation associated to that bit is active in Single State. The following table shows the bits of VN401 and the associated Single State operation. BIT 0 1 2 3 4 5 6 7 8 9 10 11

VALUE 0 1 4 8 16 32 64

NAME OMNI_ACTIVE OM_OP_AUTO OM_OP_MAN OM_OP_SER OM_OP_TEST OM_OP_TSTVEL OM_OP_SEMI

MEANING Single State active NC with Automatic cycle active in Single State NC with Manual active in Single State NC with Serial operation in progress in Single State NC with Test active in Single State NC with Speed Test active in Single State NC with Semi-automatic active in Single State

256

OM_OP_ZERO

NC with Resetting active in Single State

1024 2048

OM_OP_EMERG OM_OP_ERR_MAIN

NC with Emergency active in Single State NC with Main error active

N.B. Also see the paragraph Single State in this manual. N.B. Variable available from firmware version 4.33 on.

Page 358

M0000464

Programming Manual

VN402

Chapter 3: Variables

VN_OM_PRG_NUM

In Single State, VN402 contains the number of the program to execute in Automatic. In Single State the Automatic is started by setting VB428 to 1. N.B. Also see variable VB428. N.B. Also see the paragraph Single State in this manual. N.B. Variable available from firmware version 4.33 on.

VN403

VN_OM_TSTVEL_AX_NUM

In Single State, VN403 contains the number of the axis on which to perform the speed test. N.B. See documentation relative to VB430 and VB429. N.B. Also see the paragraph Single State in this manual. N.B. Variable available from firmware version 4.33 on.

VN404

VN_EDIT2

VN404 allows enabling the new editor with multi-step on the NC. To enable the multi-step editor, you must set VN404 to 1. N.B. Variable only available on palm computers.

VN405

VN_PRG_NUM_TO_EDIT

VN405 allows the user to specify the number of the program to edit with the editor on the NC. When the editor starts, if the value contained is greater than 0, it does not ask for the entry of the number of the program to edit and the NC sets VN405 back to 0. On the other hand, if VN405 is equal to 0, it requests the number of the program to edit. N.B. Variable available from firmware version 4.36 on.

VN406

VN_FIRST_PRG_LIST

In the GOSUB instruction in the program editor (for the time being only on the palm computer), it is possible to select the program from a list rather than entering the number; by pressing the PROG key, a list of programs will appear from which it is possible to select the program to enter; the format of the list, i.e., the type of programs displayed, can be configured: the bit coding of the program requested is passed in VN385. If bit 6 is active (user programs with specification), VN408 specifies the number of the base matrix associated to the user programs requested. If bit 5 of VN385 is active, VN406 (lower limit) and VN407 (upper limit) define the search interval (LIMITS INCLUDED) of the programs to display in the GOSUB instruction. N.B. Variable only available on palm computers. Also see VN385. N.B. Variable available from firmware version 4.35 on. N.B. Also see documentation in the paragraph I/O Descriptors in this manual.

M0000464

Page 359

Chapter 3: Variables

Programming Manual

VN407

VN_LAST_PRG_LIST

See description VN406. N.B. Variable only available on palm computers. Also see VN385. N.B. Variable available from firmware version 4.35 on. N.B. Also see documentation in the paragraph I/O Descriptors in this manual.

VN408

VN_PRG_BASE_LIST

See description VN406. N.B. Variable only available on palm computers. Also see VN385. N.B. Variable available from firmware version 4.35 on. N.B. Also see documentation in the paragraph I/O Descriptors in this manual.

VN409

VN_COP_WARN_ERR

VN409 contains the warning number on a Can Bus network. N.B. Variable available from firmware version 4.36 on.

VN410

VN_OBJ_DATA_LIST

VN410 allows configuring the list of programs displayed by the User Program Manager. VN410 is a bit variable whose bits have the same functionality as those of VN385. The description of the bits of VN410 is shown below. 128

64

32

16

8

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3

4

2

1

Value to be set

Bit 2 Bit 1 Bit 0 NC Prg. ISO Prg. Data Prg.

With Range With Specification Also hidden

Page 360

M0000464

Programming Manual

Chapter 3: Variables

The following table shows the description of the bit and the other VNs that must be managed to correctly implement the list of programs using VN410. BIT 0 1 2

Name NC Prg. ISO Prg. Data Prg.

3 4 5

Not used Not used With Range

6

With Specification

7

Also hidden

Description List with NC programs List with ISO programs List with user programs. In this case, you must specify the base matrix of the user programs to be displayed. To do this, you must enable bit 6 of VN410 and specify the number of the base matrix in VN408 Enables the possibility of displaying only programs whose numbers are found within a range. In addition to enabling VN410 with bit 5, you must specify the limits of the display interval. The lower limit is specified in VN406, while the upper limit of the interval is specified in VN407 (limits inclusive) Enables the possibility of specifying the number of the program of the base matrix if the list also contains user programs (bit 2 of VN410 active). In the case in which bit 6 of VN385 is active, the number of the base matrix is specified in VN408. Enables the possibility of also displaying programs hidden by machine parameter in the list.

N.B. Variable available from firmware version 4.37 on. N.B. Variable VN410 has the same functionality as VN385 with the only exception that VN410 is used when you implement a project with User Program Manager object while VN385 is used in the NC Program Editor with the GOSUB instruction.

VN411

VN_PAGE_MODE

Not yet available.

VN412

VN_PALM_PUT_KEY

VN412 is used to simulate the pressing of a key on a palm computer. The code of the key whose pressing you want to simulate is entered in VN412 using suitable PLC logic. The Numerical Control interprets it and behaves as if the key, with the recognized code, had been pressed on the keyboard. For example, if I want the alarms page (activated with function key F4) to appear when an alarm occurs, I write a PLC logic that places the number 68 (F4) in VN412. N.B. Variable available from palm firmware version 1.34 on. N.B. Also see documentation in the paragraph Key Codes in the Appendix of the Programming Manual.

M0000464

Page 361

Chapter 3: Variables

VN413

Programming Manual

VN_CONF_ISTR

VN_CONF_ISTR (VN413) is added which, in bits 0 and 1, allows configuring the behavior of the NC change speed instruction (instruction code 85): the instruction's standard behavior provides for the change of speed to BEGING at the position specified; now it is possible to change the behavior so that the position specified corresponds to the END of the speed change; this is useful when, for example, you slow down (NewVel < CurVel where NewVel is the new speed, i.e., the speed that you want to set and CurVel is the current speed) and you want to arrive at a certain position already at the low speed. The possible configurations are: Value 0 1 2 3

Meaning usual behavior: QuoAx = begin speed change position if NewVel < CurVel => QuoAx = position of end speed change if NewVel < CurVel => QuoAx = position of end speed change QuoAx = begin speed change position

N.B. Variable available from firmware version 4.43 on. N.B. Also see instruction VEL Ax = m of change of speed.

VN414

VN_EMRG_ERR_COD



In Sipro systems with CANopen interface, it displays the number of the network that generated the error. N.B. Variable available from firmware version 5.01 on. N.B. Also see variable VB335, which displays the number of the node that generated the error.

VN415

VN_EMRG_ERR_AX



In Sipro systems with CANopen interface and with type network: In the case of a node (drive) error, Driver displays the error code in decimal format. VN415 = 1 Fault Drive (drive generating the error) VN415 = 2 Drive not enabled N.B. Variable available from firmware version 5.01 on. N.B. See also variables VN414, which displays the number of the network, and VB335, which displays the number of the node, that generated the error.

Page 362

M0000464

Programming Manual

VN416

Chapter 3: Variables

VN_CONF_EDIT

Using VN_CONF_EDIT (VN416), it is possible to configure some of the functions of the NC program editor: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--+ | | | | | | | | | | | |WNm| VaPrgName | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--+ Index of the VA from which to copy the name to assign to a new program (VA0 is excluded).

1 = disables the reacquisition of the program name.

VN417

VN_DATA_EDIT_NUM

VN417 allows defining a user program for configuring the alternative editor to 9876.

VN418

VN_MENU_FUN_CODE

The variable VN418 allows activating, from the user pages, several predefined pages (and thus not modifiable) internal to the firmware. When you write the code corresponding to the page, it will be activated; so long as a predefined page is active, management of the user pages is suspended and the value –1 is present in the VN; when you exit from the predefined page the VN will return to the value 0. If the code entered in the VN doesn't correspond to any predefined page, the value –16 will be written in the VN. At the moment, firmware version 5.09 contains the following predefined pages: CODE 1 3

DESCRIPTION axis parameters and machine parameters CANopen parameters (if managed by the tool)

M0000464

Page 363

Chapter 3: Variables

VN419

Programming Manual

VN_PRESET_CN_PASSW

The NC Presets functions, active in SiaxED for the initialization of the NC (parameters, programs, RAM, PLC, etc.), are only executed if the automatic cycle is stopped and if VN419 has the value 1234. N.B. Variable available from firmware version 5.13 of 09/09/2004 on.

15 VQ97 This function is only implemented in specific firmwares.

VN420

VN_CNT_RTC_FULL

Counter closing routine interrupt system (RTC). N.B. Variable is read only. N.B. Variable available from firmware version 5.61 of 26/10/2007 on.

VN421

VN_FLOPPY_STATE

The VN421 contains the Floppy state.

Page 364

M0000464

Programming Manual

Chapter 3: Variables

Position Variables Following are describe Position Variables with dedicated functions.



Notations read only variables (its is possible to write a value in these variables but it has no effect).

M0000464

Page 365

Chapter 3: Variables

VQ97

Programming Manual

VQ_VAL_RACCORDO

This VQ is used only with management of the tools in the program, for use call Sipro technical office. VQ97 contains the value [mm] for the circular connection specified in VN374. Depending on the type of connector active (VN374), the value in VQ97 assumes the following meaning: Variable available only on dedicated firmware Type of VN374 circular connector 0 1 2

Meaning VQ97 value No meaning distance from the transition point in [mm] radius of connector in [mm]

N.B. Variable available from firmware version 3.61c on. N.B. Also see the documentation for VN374.

VQ98 This VQ is used only with management of the tools in the program, for use call Sipro technical office. With dedicated firmware, the Numerical Control allows tool compensation when working with tools. The Numerical Control must know the dimensions of the tool to perform compensation. VQ98 contains the tool length for “tool compensation”

VQ99 This VQ is used only with management of the tools in the program, for use call Sipro technical office. With dedicated firmware, the Numerical Control allows tool compensation when working with tools. VQ98 specifies the dimension of the tool for tool compensation. However, during work, the tool can be subject to wear and, thus, its dimensions will vary. The Numerical Control provides VQ99 where you can set the increment value (in the case of the replacement of a worn tool with a new one) or the decrement value (in the case of a worn tool during work) of the dimension of the tool with respect to the intitial specification in VQ98. In this way, the Numerical Control is able to compensate for the tool correctly, also taking into account tool wear.

VQ256

VQ_MENU_LEVEL

VQ256 is used by the PLC to select functions from the standard menu. N.B. Variable available from firmware version 4.35 on.

VQ257

VQ_MENU_LEVEL_PALM

VQ257 is used by the PLC to select functions from the standard menu on the palm computer. N.B. Variable available from firmware version 4.35 on.

Page 366

M0000464

Programming Manual

Chapter 4: Program Management

M0000464

Page 367

Chapter 4: Program Management

Programming Manual

Chapter 4

Program Management In the Program Management menu on the NC, in addition to the Editor, which allows writing programs from the keyboard, there are also other functions that are useful for managing programs.

Page 368

M0000464

Programming Manual

Chapter 4: Program Management

List Programs in memory No. PROGRAMS 5 Prg. Name 1 Welding 3 Milling

Free Memory: Steps 5 10

15432 Bytes 50 66

By activating the function [2] from the Program Management menu it is possible to display information about the programs present in memory. It displays the number of programs, the free memory and, for each program, the number of steps it contains and its size in bytes. If the number of programs is such as to occupy more than one video page, you can move with [PAGE]; to exit, use the [MENU] key.

Delete Program It is possible to delete an entire program by using the function provided on the Program Management menu (key [3]). PROGRAM DELETION Delete Program No.:

0

MENU to exit It asks the number of the program to delete, so you must type the number and confirm it with [ENTER]. It then asks for an additional confirmation: if you press [ENTER], the program is deleted, if you press [MENU], you exit without deleting it.

Copy programs It is possible to copy a program, i.e., automatically transfer a source program to a destination program. This operation could be necessary when you wish to modify part of a program while maintaining the original program at the same time. This function is activated with key [4] from the Program Management menu: COPY PROGRAMS Source Program: MENU to exit It asks the number of the source program, i.e., the one to copy, and you must type the number and confirm it with [ENTER].

M0000464

Page 369

Chapter 4: Program Management

Programming Manual

It then asks for the destination program, i.e., where to copy the program and, similar to the first, you must type the number that you want to give the copy of the program. If there is no other program with that number, the copy is performed and the message "Copy completed; press any key" appears, otherwise: Program already exists: Confirm? = YES = NO At this point, if you want to overwrite the program copy on the one that already exists, with the loss of the latter, you must press [ENTER], otherwise, you must press [MENU]. If you call a non-existent source program by mistake, the following phrase appears: Program inexistent; press any key

Talk with PC By activating function [5] from the Program Management menu, you access Talk with PC, i.e., the SIAX is ready to receive/transmit programs and/or data and/or parameters to the PC over an RS232 serial line using the TXP or SiaxED programs. The following screen will appear: TX/RX PROGRAMS MENU to exit To exit from the talk with PC menu, you must use the [MENU] key.

Total program deletion By activating function [6] from the Program Management menu it is possible to display information about the programs present in memory. To access this function, you must enter the password consisting of the numbers 4 - 5- 6 - 2 - 5 - 8. To proceed to deletion, you must type key [7], otherwise, to exit without deleting, the [MENU] key.

Page 370

M0000464

Programming Manual

Chapter 4: Program Management

Display Editor With the Display Editor, activated with key [7] from the Program Management menu, it is possible to set a page to display messages (see paragraph Messages), connect them with variables and see their values in Automatic. To set the display, just type the number of the desired message and confirm your selection with [ENTER]. The text associated with the message will appear on the monitor. Then, using the [�] key, you move to the right on the monitor and the variables that you want to associate to the message are displayed. To select the type of variables, you must use the [+/-] key and then confirm with [ENTER]: The following displays are available: VB = Binary Variables indexes from 0 to 255 VN = Numeric Variables with indexes from 0 to 255 VQ = Position Variables AI = Analog Inputs AO = Analog Outputs VI = Position Variables without decimals DT = Position Variables in data and time format (only with special firmware) You must then type the number of the variable that you wish to confirm, again with [ENTER]. Using the [�] key, you can select another message number to display and so on. After having set the page as desired, you must store it with the [MEMO] key. Finally, you exit by pressing [MENU]. If, during the selection of the number, you make an error typing a digit, you can correct it with the [] key by deleting the last number typed. As described in the paragraph relative to Messages, with the [F2] key, it is possible to display what has been set using the Display Editor just described.

M0000464

Page 371

Chapter 6: Automatic

Programming Manual

Chapter 5

Manual Movement We analyze the manual movement function which permits moving the axes directly from the keyboard or from the axis inputs.

Page 372

M0000464

Programming Manual

� NOTE

Chapter 6: Automatic

The single manual movement, described in the following chapter, has been overcome by the advent of the single state. It is valid only multiple manual movement .

The Manual Movement of the axes function is activated with key [2] from the Main Menu and allows positioning the axes using the relative commands programmed by the PLC (they can be inputs or keys). The following screen appears: MANUAL MOVEMENT LOC N0 AX 1 Speed: 30.0

Current Ovd 100.0 % -0.67 Axis: 1

By acting on the manual controls, you can vary the position of the axis itself and you can observe the effects directly on the display. Manual movement allows move one axis at a time. Information is also provided about the control mode of the NC (local or remote) with words in the upper left (LOC or REM), the speed override and the tool set, which in our example is number 1 (T: 1). ATTENTION! Until resetting is executed, Manual movements do not take into account the software end of travels set in the parameters.

Manual Movement in the SIAX150 and SIAX300C When it leaves Sipro, the standard PLC program in the Numerical Control provides for the following commands: the JOG+ key, positive movement of the selected axis. the JOGkey, negative movement of the selected axis. You select the desired axis by typing a number on the keyboard and confirming it with [ENTER]. Using the [�] and [�] keys, you can change the manual speed, i.e., the speed with which axis movements occur (this change has a local effect, i.e., the Manual Speed parameter in Machine Parameters is not changed). Obviously, if Speed Override is active, this option has no effect.

M0000464

Page 373

Chapter 6: Automatic

Programming Manual

Example of PLC logic for manual movement in the SIAX150 and SIAX300C

In practice, for the SIAX150 and SIAX300C, it is sufficient to associate inputs 3 and 4 (and, therefore, also the JOG+ and JOG- keys) to VB258 (JOG+) and VB259 (JOG-), respectively.

Page 374

M0000464

Programming Manual

Chapter 6: Automatic

Manual movement in the SIAX110 and SIAX110L When it leaves Sipro, the standard PLC program in the Numerical Control provides for the following commands: key � positive movement of axis 1 key  negative movement of axis 1 key � positive movement of axis 2 key � negative movement of axis 2 The selection of the axis to move is made in Automatic mode and the manual speed is that set in the axis parameters.

Example of PLC logic for manual movement in the SIAX110 and SIAX110L

In this section, the selection of the axes is set in Automatic every time that the arrow keys are pressed. Upon the pressing of the keys  and � (codes 60 and 62), axis 1 is selected. Upon the pressing of the keys � and � (codes 58 and 59), axis 2 is selected. M0000464

Page 375

Chapter 6: Automatic

Programming Manual

In this section the movement of the selected axes is defined. The pressing of the keys � and � (codes 62 and 59) corresponds to JOG+. The pressing of the keys  and � (codes 60 and 58) corresponds to JOG-. VB417 allows keeping the movement command active so long as a key is pressed. N.B. For the correct operation of JOG+ and JOG- of the two axes, in addition to the PLC sections listed above, you must set the value 128 in VN370 from the PLC. This setting must only be enabled in manual.

Page 376

M0000464

Programming Manual

Chapter 6: Automatic

Multiple Manual By setting VB266 to 1, there is also the possibility of executing Multiple Manual Movement. The following screen appears: MANUAL MOVEMENT LOC N0 Current Ovd 100.0 % AX 1 0.00 -0.67 * exit, change axis arrows This function allows moving several axes at the same time in Manual by setting the following VBs to 1: VB296 VB297 VB298 VB299

JOG+ axis 1 JOG+ axis 2 JOG+ axis 3 JOG+ axis 4

VB336 VB337 VB338 VB339

JOG- axis1 JOG- axis2 JOG- axis3 JOG- axis4

Example: By setting VB296 = 1 and VB237 = 1, you will have the simultaneous positive movement of axis 1 and the negative movement of axis 2, at the speed set in the respective Manual Speed parameters. The VBs are usually activated using external buttons. It is, therefore, necessary to connect to the inputs relative to Variables just described from the PLC. In Multiple Manual, movement is always continuous and, for this reason, the Increment in Manual parameter is not considered. N.B.: In addition, with Multiple Manual Movement it is possible to carry fixed position movements as described in the paragraph Semi-automatic (Chapter Test). If VB403 is set to 1, it is possible to execute movements in Semi-automatic with incremental rather than absolute positions.

In Multiple Manual it is possible to launch the execution of a program directly from the PLC: by setting VB265 to 1, the program is executed whose number is contained in VN257. You must, therefore, pay attention to the state of VB265 when you enter Multiple Manual to avoid the inadvertant launch of a program.

M0000464

Page 377

Chapter 6: Automatic

Programming Manual

Chapter 6

Automatic We analyze the Automatic function, which allows the execution of programs.

Page 378

M0000464

Programming Manual

Chapter 6: Automatic

The Automatic function is accessed by selecting key [6] from the Main Menu and access is only allowed after resetting the axes (see the Chapter Resetting Axes), in fact, in this way the zero point is established from which all axis movements are then calculated. In the event that you enter Automatic without having performed the resetting, the following error message appears: ATTENTION! The axes have not been ZEROED ACCESS NOT ALLOWED Use the "Zero Axes" function When you enter Automatic the following screen appears: IN STOP LOC N0 AX 1

Prog 4 Target 0.00

Step 1 St 0 Current Ovd 100.0 % 0.00 *

The last program executed is always proposed as the program to start from (except the first time when "Prog:0"). If you wish to execute another, to choose the program, just press the [PRG] key (the words "Execute Program No. X" will appear) and type the number corresponding to the program and use [ENTER] to confirm. It is also possible to select the step from which you wish to begin the execution of the program. To do this, just move on the monitor with the [ENTER] key and type the number of the step (always using [ENTER] to confirm). If you begin a program from a step other than the first, you must be careful because variable initializations in the preceding steps will not be executed and there may be steps skipped that are fundamental for the correct functioning of the program. The monitor also provides another indication of the state in which the machine is found (for the interpretation of the codes see the relative table in the Chapter General Programming Notes) and it is a useful indication in the diagnostics phase since you can see, for example, if the program is waiting for an input to be set or that an axis is arriving in position, etc. The asterisk that you see alongside the current position indicates that the axis is in position. If you wish to see the values assumed by the inputs and outputs, just press the [PAGE] key and the screen with the values of all the inputs and outputs will appear. To exit from this screen, you must use the [MENU] key. To begin Automatic execution, just give an impulse to the START command (VB256). The cycle can be interrupted with the STOP command (VB257). If, at this point, you give a new START command, the cycle restarts from the point in which it was interrupted. With [MENU], you exit from Automatic. Once you have abandoned the Automatic cycle, it is no longer possible to resume direct execution of the program: it is, therefore, necessary to restart from the first step.

M0000464

Page 379

Chapter 6: Automatic

Programming Manual

Example of PLC logic for automatic in the SIAX150 and SIAX300C

In practice, for the SIAX150 and SIAX300C, it is sufficient to associate inputs 1 and 2 (and, therefore, also the START and STOP keys) to VB256 (START) and VB257 (STOP), respectively. Here, emergency is connected to not input 5.

Example of PLC logic for Automatic in the SIAX110 and SIAX110L

In this section the START, STOP and EMERGENCY commands are defined. Pressing the START key or activating input 1 corresponds to the START command. Pressing the Stop key or activating input 2 corresponds to the command Stop. Here, emergency is connected to not input 5. Page 380

M0000464

Programming Manual

Chapter 6: Automatic

Selection of the program to execute In the Automatic page, when the [PRG] key is pressed, the words: "Executing Program No."; appear and, at this point, it is possible to set the number of the program that you wish to execute (as in previous versions), or press the [F1] key. When the [F1] key is pressed, a window appears with the list of visible programs present in memory; the Number and Name are displayed for each program. With the [�] and [�] keys and the [PAGE] key, it is possible to move the cursor to the desired program and confirm it with the [ENTER] key.

Displaying the executing program When you press the [F3] key, a window appears that displays the Number, Name, Step and current State of the active programs. When you press the [MENU] key, you exit from the page. N.B.: The [F3] key is active if Binary Variable VB390 is 1.

Program name It is possible to select the program to execute by its associated NAME and display that name in a dedicated page. The "List Programs in memory" function (item 2 on the Program Management menu) displays the Number, Name, Number of Steps and Size in bytes for each program.

M0000464

Page 381

Chapter 6: Automatic

Programming Manual

Local/Remote control mode The Numerical Control offers the possibility of also having REMOTE control, which can also be used to limit the menus and possible settings to the end user. The control mode in which the NC is found is given by VB274 (0 = LOCAL, 1 = REMOTE) driven by the PLC (see chapter Variables Managed by the PLC*) and is displayed on the screen by the word LOC or REM in the various menus (see relative screens). When the NC is controlled in REMOTE, it can only be found in Automatic or Manual (Manual if VB275 = 0, Automatic if VB275 = 1) and, if necessary, the first START given in Automatic causes axis resetting to start. In practice, in REMOTE it is not possible to go to the main menu and, therefore, to all the relative submenus, but it is only possible to go from the automatic menu to the manual menu and vice versa, by acting on VB275. When you go from REMOTE to LOCAL, the NC remains in the state in which it is found (Automatic or Manual), i.e., it does not return to the Main Menu. When the NC is in LOCAL in Automatic or Manual or at the Main Menu and you go to REMOTE, the NC is found in the state given by VB275 (Manual if VB275 = 0, Automatic if VB275 = 1). The passage from REMOTE to LOCAL and vice versa, is managed by the PLC: usually a coding is used given by the key sequence [SHIFT] + [CODE] and you will change the text in the upper left of the display. N.B.: In REMOTE, the selection of the axes for manual movement must be performed by setting the relative axis selection VBs (VB296-VB299) from the PLC.

Example of PLC logic for LOCAL/REMOTE management

This section performs the decoding of the keys: - code 123 corresponds to CODE which is activated by the key sequence SHIFT and CODE. - code 72 corresponds to key F8 (in the SIAX110, it is possible to use the AUT/MAN key, which has code 130).

Page 382

M0000464

Programming Manual

Chapter 6: Automatic

In the first line of the first Mathematical Block, the state of VB274 is changed so as to go from local to remote and vice versa. The second line resets the value contained in VN258. In the first line of the second Mathematical Block, the state of VB275 is changed so as to go from automatic to manual and vice versa. The second line resets the value contained in VN258.

M0000464

Page 383

Chapter 7: Tool Parameters

Programming Manual

Chapter 7

Tool Parameters The Tool Parameters function is analyzed, which allows setting the values of interest for the tools used.

Page 384

M0000464

Programming Manual

Chapter 7: Tool Parameters

With the Tool Parameters function, it is possible to set the parameters of the tools used by the machine in the various applications driven by the programs. N.B.: IT IS only present in the case that interpolation is provided for. To access Tool Parameters, you must select key [7] from the Main Menu and then type the requested password, which consists of the numbers 4 - 5 - 6 - 2 - 5 - 8. The following screen will appear: Tool No.:

To select the tool to set parameters for, type the number that identifies it and press [ENTER] to confirm. You will see: Tool No.: Tool length: 0.0

To set the length of the tool, just type the value and confirm with [ENTER]. To go to other tools, you need to use the [PAGE] key. Once you are finished entering or changing the values of interest, you need to use the [MEMO] function to store the new data. If, on the other hand, you wish to exit without storing it, you must use the [MENU] function. It should be noted that, on power-up, the tool is automatically set to number 1, so if you want to use another tool, it must be specified in the program using the appropriate instruction (TOOL no; see Use of Tools in the chapter General Programming Notes).

M0000464

Page 385

Programming Manual

Chapter 8: Origins

Chapter 8

Origins The Origins function is analyzed, which allows setting several origins of reference with respect to the absolute origin.

M0000464

Page 387

Chapter 8: Origins

Programming Manual

The positions that are displayed on the screen always refer to an origin. If resetting has not been performed, this origin is set on power-up in the point at which the axes are found. With the execution of Resetting, this origin is changed and taken as the machine zero (absolute) origin. This origin is identified as ORIGIN 0 and cannot be changed without performing another resetting. However, it is possible to set different working origins (up to a maximum of 20). This allows performing work with an origin of reference on the piece. If, for example, you wish to execute the same work on several pieces present on the work surface, it is possible to use the same program and change only the origin of reference. These origins always refer to the absolute origin (Origin 0). The indication of the active origin is displayed on the upper left of the screen (near the word LOC or REM). For example, the text LOC N0 indicates that origin 0 is active. There are two methods available for setting new origins: 1) Setting the positions of the origins directly 2) Self-learning the origins.

Setting the positions directly When you know the positions of the origins with respect to Origin 0, it is possible to set them in the ORIGINS menu (item 8 on the Main Menu). To access the setting, you must type the password: 4 - 5 - 6 - 2 - 5 - 8. The following screen will then appear: ORIGIN 1 1 - AX1 2 - AX2 3 - AX3 4 - AX4

0.000 0.000 0.000 0.000

This page shows the positions of origin 1 with respect to origin 0. To set the desired origin, you must type the values and confirm with [ENTER]. To go to the positions of the next origin, press the [PAGE] key. To return to the Main Menu, use the [MENU] key. Once the origins are set, you can make the desired origin active by using the following instructions in NC or ISO programs: 55 ORG n for NC programs G55N n for ISO programs n is the number of the origin that is made active. To return to the absolute origin, you must set the active origin to 0.

Page 388

M0000464

Programming Manual

Chapter 8: Origins

Self-learning the origins It is possible to set the origins automatically, rather than from the keyboard. By using Self-learning of the origins, it is possible to move the axes in Manual to the desired point and set the relative positions as the origin of reference. This Self-learning must only be performed after the Resetting of the axes has been carried out, in order to have an exact reference with the machine zero. To execute Self-learning of the origins, it is necessary to dedicate several sections of the PLC to setting several dedicated variables (see the example shown further below). With suitable conditions (keys, inputs, etc.) you must set the VBs for acquiring axis origins (VB375 to VB379) to 1. You must then set VN305 (number of the origin to acquire) and VN306 (number of the origin to set). At this point, you must give an impulse to VB375 (Origin Acquisition) so that the origin contained in VN305 is acquired. If you also give an impulse to VB374 (Setting Active Origin) the origin contained in VN306 is made active. N.B.: If VN305 and VN306 coincide, by setting VB375 and VB374, you acquire the new origin and make it active.

Other useful instructions for managing origins There are also other instructions available that allow managing the origins from the program. Instruction 49 INCR ORG m AX n VAL q allows adding an offset or increment q to the position of an origin m relative to an axis n. Instruction 59 INCR ORG m AX n VAL q allows setting a value q in the desired origin m relative to an axis n. It is, thus, possible to set the positions of the origins directly from a program.

M0000464

Page 389

Chapter 8: Origins

Programming Manual

Example of PLC logic

Page 390

M0000464

Programming Manual

Chapter 8: Origins

M0000464

Page 391

Chapter 8: Origins

Page 392

Programming Manual

M0000464

Programming Manual

Chapter 9: User Programs

Chapter 9

User programs The Numerical Control allows the management of “Data Setting” programs, called “User Programs”.

M0000464

Page 393

Chapter 9: User Programs

Programming Manual

USER PROGRAMS The Numerical Control allows the management of “Data Setting” programs, called “User Programs”. These programs serve to set a data table that can be used by the NC in the Automatic phase. For example, suppose we have to cut slabs from a block of marble; the slabs of the block are of different widths: 3 slabs of 15 cm, 4 slabs of 20 cm and 2 slabs of 25 cm. As you will note, the work consists in repeating the same setting (number of slabs and slab width) for 3 times (3 steps). In the user programs, all the steps use the same supporting variables. In this example, the supporting variables, which constitute the “basic” step, are: • •

The number of slabs (we will use VN120) The thickness of the slab (we will use VQ100)

So, each step consists of 2 variables, a VQ and a VN, and all the steps are supported by the same 2 variables (VQ100 and VN120). The composition (structure) of the step is defined by the so-called "base matrix." The base matrix is a standard NC program that lists which, and how many, variables comprise a single programming step; in our example, the base matrix is the following: #name Base Matrix #prog 9000 :

VN120 = 3 VQ100 = 50

You will note that each time a new step is created, the value of its variables is, by default, the value specified in the "base matrix" program: in our example, 3 for VN120 and 50 for VQ100. So, in short, the "base matrix" program specifies the composition of the single programming step and allows defining a default value for its variables.

� NOTE

In defining the base matrix, the VBs must be contiguous and an even number.

� NOTE

In defining the base matrix, you can use VNs with index greater than 50

If the programming step also contains Alphanumeric Variables (VAs) it is necessary to specify the length of these variables in the manner that we will see further on; this is necessary because the Alphanumeric variables have a settable length. A User Program formed from steps that are equal is defined a "Single Header" program (data coding = 1). To manage this type of program, the Numerical Control uses 11 consecutive VNs that the programmer must indicate during the programming phase. To indicate which VNs are reserved for the management of user programs, we use VN382, which contains the index of the first of the consecutive VNs. If, for example, we set VN382 to 50, the VNs reserved for managing user programs are the following (and we also show the function of each variable):

Page 394

M0000464

Programming Manual

Chapter 9: User Programs

VNs for managing User Programs VN Function VN50 base matrix no. As was said above, the base matrix is an editable NC program and, therefore, like all NC programs, it has an identification number (in the base matrix example shown above, it is #9000). At the time you wish to work on user programs, you must specify which base matrix you are referring to. To do this, you must indicate the number that identifies the base matrix in VN50. VN51 edit matrix no. Like the base matrix, the edit matrix is also an editable NC program and it also has an identification number (in the base matrix example shown above, it is #9001). At the time you wish to work on user programs, you must specify which edit matrix you are referring to by indicating the identification number of the edit matrix in VN51. In the case in which the edit matrix provides for the presence of a single editable step at a time, then the base and edit matrices coincide and the value of VN50 coincides with that of VN51. VN52 VA length (H byte) and data coding (L byte) VN52 consists of two bytes with the following meaning: H Byte

L Byte

H Byte: Contains the maximum number of characters of the user program type VAs that you wish to construct. L Byte: Contains the number that identifies the type of data coding: 1. Single Header: The data program consists of a series of equal steps described by the base matrix 2. With Step Header: The program is similar to type 1 but, in addition to the series of steps corresponding to the base matrix, it also contains a step of a different format, which is described by the Specified Header matrix in VN61 Example: if VN52 contains the number 6401, its meaning is: 640110 = 190116 from which: H Byte = 19H L Byte = 01H VN53

Thus, the length of the VAs is equal to 1916 = 2510 , while the coding type is 1 no. of the user program on which to work The Numerical Control requires that you specify the number of the user program on which you wish to perform certain operations. In VN53, you enter the number of the user program on which you wish to perform the operations indicated in Table 2, which include those of creating, renaming and deleting, copying and saving. M0000464

Page 395

Chapter 9: User Programs

VN54

Programming Manual

no. of active user program VN54 contains the number that identifies the selected user program.

� NOTE Writing the program number in VN54 is equivalent to writing the program number in VN53 together with writing the LOAD command in VN58.

VN55

no. of the current step of the active program VN55 contains the number that identifies the step on which you are working. The step on which you are working belongs to the user program specified in VN54.

� NOTE Writing the number of the step of the active program in VN55 has the effect of loading that step.

VN56

VN57 VN58

VN59

VN60

VN61

Page 396

no. of (total) steps present in the active program Each user program has a total number of steps. At the time in which you select a user program in the phase of creating, renaming, deleting (VN53) or in the editing phase (VN54), its total number of steps is specified in VN56. additional parameter Currently not used; implemented for future developments Command VN Operations can be performed on user programs. Each operation is identified by a code according to Table 2 explained below. In VN58, you enter the code of the command that you wish to execute on the selected user program (selection of the program with its number specified in VN53 in the case of creating, renaming and deleting or specified in VN54 in the case of just editing its steps). In the case in which the operation on the user program specified in VN58 is successful, the Numerical Control sets VN58 to the value 0 at the end of the operation. Otherwise, if the operation fails, the Numerical Control sets it to the error code of the command, whose coding is illustrated in Table 3, below. State VN The Numerical Control allows knowing the state of the system that is managing the user programs. VN59 contains a number that identifies this information. VN59 is managed by bits. Each bit has a meaning. When a bit is active, it means that the user program manager is in a state corresponding to the coding shown in Table 5 below. return parameter At the end of executing an operation on a user program (the operation specified in VN58), the Numerical Control returns a value in VN60 that represents the outcome of the operation. In the case in which the operation is successful, the value will be 0; otherwise, if the operation fails, the value specified below in Table 4 is returned. Header Matrix VN In the case of a type 2 data Program (with Step Header), it indicates the program number that represents the Header matrix. M0000464

Programming Manual

Chapter 9: User Programs

VN62

Header Step String Length VN In the case of a type 2 data Program (with Step Header), it indicates the number of characters anticipated for the alphanumeric variables contained in the header matrix.

VN63

VN step offset in DEL and INS (valid only if enabled by the command VN, in this example, VN58) when an EDIT is in use, in the cancel step (DEL) and insert step (INS) instructions, it allows specifying the step offset with respect to the current step.

VN64

VN step number (valid only if enabled by the command VN, in this example, VN58) indicates the step number to load when the LOAD_STEP command (command 19) is used.

Table 1

M0000464

Page 397

Chapter 9: User Programs

Programming Manual

User Program Command Coding (VN58) Command Code 0 1 2 3 4 5 6 7 8 9 10 11 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 30 31 Table 2

Page 398

Operation No command Create new program Load already existing program Save program Save program with name Delete program Copy program Change program name Load program and set its identification number to 0 Set-up program in work buffer Loading data stream Saving data stream Loading program without setting step 1 Update work buffer header Append a new step to the end of the steps in the selected program (VN54) Insert a new step at the current position in the selected program (VN54) Delete the step on which you are positioned from the selected program (VN54) Load the step of the selected program (VN54) Reload the step of the selected program (VN54) Save the step of the selected program (VN54) on which you are positioned Disable the “read only” step loading mode (see following note) Enable the “read only” step loading mode (see following note) Disable the Block on the Display of Empty Steps in a Multiple-Step Edit Matrix (Default) Enable the Block on the Display of Empty Steps in a Multiple-Step Edit Matrix Disable the Automatic Overwriting of the Program If Already Existing (Default) Enable the Automatic Overwriting of the Program If Already Existing (Default) Assign VN for last command code Doesn't use new VNs Uses new VNs

M0000464

Programming Manual

� NOTE

Chapter 9: User Programs

There are two modes for loading a step of a user program. •

“Read Only” Mode: The data of the step specified in VN55 is loaded in the support variables (base matrix variables) and the data relative to the previously loaded step is NOT saved in memory.



Normal Mode: The data of the step specified in VN55 is loaded in the support variables (base matrix variables) and the data relative to the previously loaded step is saved in memory.

M0000464

Page 399

Chapter 9: User Programs

Programming Manual

Code of the operation that generated an error (VN58) Error Code 0

Operation in which the error occurred No Error

-1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -14 -15 -16

create new program load already existing program save program Save program with name Delete Program copy program redimension the program load program and set its identification number to 0 Error set-up program in work buffer Error Loading data stream Error Saving data stream Error Loading program without setting step 1 Error Update work buffer header Error append a new step to the end of the steps of the selected user program (VN54) Error insert a new step at the current position of the selected user program (VN54) Error delete the current step of the selected user program (VN54) Error load the step of the selected user program (VN54) Error reload the step of the selected user program (VN54) Error save step Error assign VN for last command code

-17 -18 -19 -20 -21 -28 Table 3

Page 400

M0000464

Programming Manual

Chapter 9: User Programs

Error Type Code (VN60) Error Code 0 -1 -2 -3 -4 -5 -21 -22 -23 -24 -25 -26 -41 -81 -83 -84 -101 -121 -122 -141 -161 -162 -181 -182 -183 -201 -202 -203 -204 -205 -206 -207 -208 -209 -210 -221 -222 -223 -224 -241 -242 -243 -261 -263 -264

Meaning Operation executed correctly The specified matrix program does not exist The matrix program is not an NC program Maximum number of variables exceeded Data structure not managed Unanticipated variable type in matrix program Base matrix not loaded in memory Requested step non-existent Data structure type not recognized Data structure type not managed Head matrix not loaded in memory Step type not managed Program number not valid Edit matrix not loaded in memory Data structure type not recognized Data structure type not managed Step number not valid Data structure type not managed Data structure type not managed Data structure type not managed Storage not possible because cycle in RUN Error deleting program The requested program is not present The requested program is not a data program (lacks instruction 255) Data structure type not managed Storage not possible because cycle in RUN Program name absent and number = 0 Program number not valid (number not between 1 and 9999) There is a program with the same name There is a program with the same number Insufficient memory for storing the program Error storing in Flash No program number available Program in work area not valid Program number = 0 Deletion not executed because number of steps present
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF