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.3to update the product specifications or performance or the contents of the manual without prior notice
Index
Introduction 14
Programming the NC ...15
Programming directly from the keyboard
16
Program Editor ...17General 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...22Program 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 (14) AN OUT n = m ... 40
Instruction (77) ANT AX n TP t VAL q ... 41
Instruction ( 94 ) AX n INCR m ... 42
Instruction ( 80 ) AX n TO m ... 43
Instruction ( 85 ) AX n VEL v QUOTE m... 44
Instruction (38) CONT MOVE � ... 46
Instruction (34) END � ... 47
Instruction (120) FORK PROG n ... 49
Instruction (60) FXY m � ... 50
Instruction (61) G1 X xf Y yf � ... 50
Instruction (56) G103 P n VQi � ... 51
Instruction (66) G1XYN xf, yf, n, nf �... 55
Instruction (62) G2 X xf Y yf I xc J yc �... 56
Instruction (72) G2R r e xf yf �... 57
Instruction (67) G2XYN xc yc xf yf n qf � ... 58
Instruction (63) G3 X xf Y yf i xc J yc �... 59
Instruction (73) G3R r e xf yf �... 60
Instruction (68) G3XYN xc, yc, xf, yf, n, qf � ... 61
Instruction (40) G40 �... 62
Instruction (41) G41 �... 64
Instruction (42) G42 �... 66
Instruction (43) G43 (or TOOL EXT) �... 67
Instruction (44) G44 (or TOOL INT) �... 68
Instruction (45) G45 �... 69 Instruction (4) GOSUB n �... 70 Instruction (8) GOTO n �... 71 Instruction (142) IF AX n GOSUB m �... 72 Instruction (146) IF AX n GOTO m �... 73 Instruction (132) IF IN n GOSUB m � ... 74 Instruction (133) IF IN n JMPPRG m �... 75 Instruction (136) IF IN n GOTO m � ... 76
Instruction (248) IF VBi = ValB GOTO m � ... 77
Instruction (230) IF VNi < n GOSUB m � ... 78
Instruction (231) IF VNi = n GOSUB m � ... 79
Instruction (232) IF VNi > n GOSUB m � ... 79
Instruction (233) IF VNi < n GOTO m � ... 80
Instruction (234) IF VNi = n GOTO m � ... 81
Instruction (235) IF VNi > n GOTO m � ... 81
Instruction (210) IF VQi < m GOSUB n � ... 82
Instruction (211) IF VQi = m GOSUB n � ... 83
Instruction (212) IF VQi > m GOSUB n � ... 83
Instruction (213) IF VQi < m GOTO n � ... 84
Instruction (214) IF VQi = m GOTO n � ... 85
Instruction (215) IF VQi > m GOTO n � ... 85
Instruction (49) INCR ORG m AX n VAL i � ... 86
Instruction (3) INPUT n... 87
Instruction (37) INTP MODE = n �... 88
Instruction (31) INTP PAR n AX m P p � ... 89
Instruction (5) JMPRG n �... 91
Instruction (121) KILL PROG n... 91
Instruction (84) LINE n1 m1 n2 m2... 92 Instruction (50) LINE2 q1 q2 �... 93 Instruction (51) LINE3 q1 q2 q3 �... 93 Instruction (52) LINE4 q1 q2 q3 q4 � ... 93 Instruction (53) LINE5 q1 q2 q3 q4 q5 � ... 94 Instruction (54) LINE6 q1 q2 q3 q4 q5 q6 � ... 94
Instruction (86) SET POS AX n = m... 108
Instruction (87) SKIP WAIT AX n ... 109
Instruction (83) STOP AX n ... 110
Instruction (17) TIME m... 111
Instruction (75) TOOL ANGLE = m �... 112
Instruction (74) TOOL n � ... 113
Instruction (195) VB [VNi] = n... 113
Instruction (190) VBi = EQ2D v1 v2 v3 n... 114
Instruction ( 176 ) VBi = SETMAC PAR n VAL m... 115
Instruction (178) VBi = SETP AX n PAR j VAL m... 116
Instruction (246) VBi = VB[VNj ] ... 117
Instruction (240) VBi = x... 117
Instruction (189) VBi = x... 118
Instruction (82) VEL AX n = m %... 118
Instruction (92) VEL AX n = m [mm/min]... 119
Instruction (192) VN[VNi] = n... 119 Instruction (220) VNi = m ... 119 Instruction (188) VNi = m ... 120 Instruction (221) VNi = m + n... 120 Instruction (222) VNi = m - n... 121 Instruction (225) VNi = VQj ... 121 Instruction (227) VNi = VN[VNj]... 122 Instruction (228) VNi = AI m... 122
Instruction (238) VNi = STEP + n ... 123
Instruction (191) VQ[VNi] = m ... 123
Instruction (200) VQi = m... 124
Instruction (187) VQi = m... 125
Instruction (208) VQi = AI n... 125
Instruction (184) VQi = ATAN2 (m,j)... 126
Instruction (186) VQi = CATH (m,j) ... 126
Instruction (185) VQi = DIST (m,j)... 127
Instruction (104) VQi = FUN n p1 p2 p3 p4 ... 128
Instruction (48) VQi = GET ANGLE ORG n �... 128
Instruction (177) VQi = GETMAC PAR n... 129
Instruction (179) VQi = GETP AX n PAR j... 129
Instruction (193) VQi = m * j... 130
Instruction (194) VQi = m/j ... 130
Instruction (180) VQi = m * SIN j ... 131
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
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 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
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 <CmdVnIdx> <StatusVnIdx> 217 Vn stato = 1 218 Vn stato = -2 218 Modbus Management Protocol...220
Modbus Protocol Functions Implemented...221
Interface PLC LADDER MASTER ...222
Protocol MASTER initialization 222 Start Packet 222 Set Parameters 222 Closing packet and sending data 222 Reading protocol state 222 FUN110 Intialization ( MdbMasterInitProt ) 223 FUN111: Start Packet ( MdbMasterStartPack ) 223 FUN112: Set Parameters ( MdbMasterInsPar ) 224 FUN113: Closing packet and sending data ( MdbMasterEndPack ) 224 FUN114: Request protocol status 225 Read output 1 from the node 1 and write in the VB310 of the MASTER 227 PLC LADDER SLAVE interface old protocol ...239
PLC LADDER SLAVE interface new protocol...241
FUN115 Variables Mapping ( WplcMdbConfMap ) 241 Error code response 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 257 Profile by Points 260 Machine parameter “Acceleration factor between two entities” 262 Machine parameter “Acceleration factor” 263 ISO instructions 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 280
Numerical Control Variables (from 4.37 firmware version) ...281Structure 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÷295VB_FIRST_AX_DIS ... 299 VB296÷303VB_FIRST_AX_SEL... 299 VB304÷311VB_FIRST_AX_IN_QUO � ... 300 VB312÷319VB_FIRST_AX_ZERO... 300 VB320÷327VB_FIRST_PID_DIS ... 300 VB328÷335VB_FIRST_SET_ZERO ... 301
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 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 Numeric Variables ...321 VN256 VN_OVERRIDE_VEL... 322 VN257 VN_PRG_NUM ... 322
VN258 VN_KEY_CODE ... 322 VN259 VN_MOVING_AXES � ... 323 VN260÷267VN_FIRST_POS_AX_MM � ... 323 VN268÷271VN_FIRST_IRQ_CNT... 323 VN272 VN_AX_ONOFF_REC_GC ... 324 VN273 VN_AX_ONOFF_DEC ... 324 VN274 VN_EN_ROLLOVER ... 324 VN276–283VN_FIRST_FOLL_FACT ... 325 VN284÷291VN_FIRST_FOLL_ENC ... 326 VN292–299VN_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–323VN_FIRST_FOLL_DEN ... 331 VN324÷331VN_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÷355VN_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
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 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 Position Variables ...365 VQ97 VQ_VAL_RACCORDO ... 366 VQ98 366 VQ99 366 VQ256 VQ_MENU_LEVEL ... 366 VQ257 VQ_MENU_LEVEL_PALM... 366
Program Management
368
List Programs in memory...369Delete 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...373Example 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...380Example 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 ...388Self-learning the origins ...389
Other useful instructions for managing origins ...389
Example of PLC logic ...390
User programs
393
USER PROGRAMS...394VNs for managing User Programs 395 User Program Command Coding (VN58) 398 Code of the operation that generated an error (VN58) 400 Error Type Code (VN60) 401 User Program Management State Codes (VN59) 402 Creating a "User Program" ...403
USER PROGRAM MANAGER Object ...403
Example 1...404
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
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.
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.
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.
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.
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
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 bit 10 bit 9 bit 8
Dig. OUT OFF Dig. OUT ON Dig. IN OFF Dig. IN ON
�
NOTE
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.
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 STEP 1 NAME: PIPPO
FREE.MEM: 0 STEPS: 12
19 OUTOFF 5 //initialization of the outputs
220 VN1 = 0 // and of the variables used in the program --- STEP 2 ---
84 LINE 1 0.000 2 0.000 //initial positioning at the zero of the axes --- STEP 3 ---
3 INPUT 15 // awaiting input 15 high to continue executing loop --- STEP 4 ---
80 AX 1 TO 400.000 // positioning axis 1 to a level of 400 --- STEP 5 ---
80 AX 2 TO 200.000 // positioning axis 2 to a level of 200 --- STEP 6 ---
18 OUTON 5 //activation of output 5
--- STEP 7 ---
17 TIME 3.0 //wait three seconds
--- STEP 8 ---
19 OUTOFF 5 //deactivation of output 5 --- STEP 9 ---
80 AX 2 TO 200.000 // positioning axis 2 to a level of 0 --- STEP 10 ---
80 AX 1 TO 0.000 //positioning axes 1 to a level of 0 --- STEP 11 ---
221 VN1 = VN1 + 1 //increment of a variable used as a counter --- STEP 12 ---
234 IF VN1 = 10 GOTO 14 //if 10 loops have been executed end program --- STEP 13 ---
8 GOTO 3 //otherwise execute the loop again
--- STEP 14 ---
34 END //end program
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.
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)
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 WorkPosition 1000 //work position #define PumpTime 5 //activation time
//of pump (seconds) //*********************************************************** // Inputs definition //*********************************************************** #define START 1 #define STOP 2 #define JOG+ 3 #define JOG- 4 #define EMERGENCY 5 #define FCMaximum 6 #define FcMinimum 7 #define CheckOK 8 //*********************************************************** // Outputs definition //*********************************************************** #define ENABLING 1 #define Pump 2 //*********************************************************** // Binary variables (VB) //*********************************************************** #define EndWork VB1 //signals the end of work
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 : GOTO WaitInput //retry the check :Proceed Cart TO WorkPosition //work positioning
: OUTON Pump //activation OUT 2 : TIME PumpTime //wait a certain time : OUTOFF Pump //deactivation OUT 2 : EndWork = 1 //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
:<label> instruc. : sets the beginning of a new step, <label> 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 ":" // <comment> Begins a comment that ends at the end of the line { <comment> } comment in a line with ISO instructions
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.”
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 //move to zero
VB1 = 0 OUTOFF 16
:Loop1 IF IN 16 GOTO WorkPos //initial check
: GOTO Loop1 //if 1 OK, otherwise //retry check
:WorkPos AX1 TO 1000 //work positioning : OUTON 16 //activation 16 : TIME 5 //wait a certain time : OUTOFF 16 //deactivation 16 : VB1 = 1 //signal end of work
: end
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.
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 Interpretation (step enabling)
2 Management of variables 3 Generic status
4 Conditonal instructions 5 Awaiting inputs
6 Speed settings
7 Special function calls 8 Moving axes
9 Conditioned movements 10 Waiting for axes in position 11 Set digital outputs
12 Set wait times 13 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 ":".
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.
List of available instructions
Instruction list assignment values to variables
Istruzione ( 195 ) VB [VNi] = n
Istruzione ( 190 ) VBi = EQ2D v1 v2 v3 n Istruzione ( 246 ) VBi = VB[VNj ] Istruzione ( 240 ) VBi = x Istruzione ( 189 ) VBi = x Istruzione ( 192 ) VN[VNi] = n Istruzione ( 220 ) VNi = m Istruzione ( 188 ) VNi = m Istruzione ( 221 ) VNi = m + n Istruzione ( 222 ) VNi = m - n Istruzione ( 225 ) VNi = VQj Istruzione ( 227 ) VNi = VN[VNj] Istruzione ( 238 ) VNi = STEP + n Istruzione ( 191 ) VQ[VNi] = m Istruzione ( 200 ) VQi = m Istruzione ( 187 ) VQi = m
Istruzione ( 184 ) VQi = ATAN2 (m,j) Istruzione ( 186 ) VQi = CATH (m,j) Istruzione ( 185 ) VQi = DIST (m,j) Istruzione ( 193 ) VQi = m * j Istruzione ( 194 ) VQi = m / j Istruzione ( 180 ) VQi = m * SIN j Istruzione ( 181 ) VQi = m * COS j Istruzione ( 182 ) VQi = m / SIN j Istruzione ( 183 ) VQi = m / COS j Istruzione ( 201 ) VQi = m + j Istruzione ( 202 ) VQi = m - j Istruzione ( 203 ) VQi = m * n Istruzione ( 204 ) VQi = m / n Istruzione (197) VQi = j % k Istruzione ( 205 ) VQi = VNj Istruzione ( 206 ) VQi = POS AX n Istruzione ( 207 ) VQi = VQ[VNj]
Instructions for the management of digital inputs and outputs
Istruzione ( 3 ) INPUT n Istruzione ( 18 ) OUTON n Istruzione ( 19 ) OUTOFF n Istruzione ( 15 ) PULSE n
Instructions for the management of analogs inputs and outputs
Istruzione ( 14 ) AN OUT n = m Istruzione ( 228 ) VNi = AI m Istruzione ( 208 ) VQi = AI n
Instructions for the management of timers
Istruzione ( 17 ) TIME m
Instructions for the management of the axes
Istruzione ( 77 ) ANT AX n TP t VAL q Istruzione ( 94 ) AX n INCR m
Istruzione ( 80 ) AX n TO m
Istruzione ( 85 ) AX n VEL v QUOTE m Istruzione ( 35 ) NO WAIT AX
Istruzione ( 93 ) QUOTE AX n = m Istruzione ( 86 ) SET POS AX n = m Istruzione ( 83 ) STOP AX n
Istruzione ( 82 ) VEL AX n = m %
Istruzione ( 92 ) VEL AX n = m [mm/min]
Instructions for handling of axes with interpolation
Istruzione ( 38 ) CONT MOVE � Istruzione ( 57 ) F m �
Istruzione ( 60 ) FXY m � Istruzione ( 61 ) G1 X xf Y yf � Istruzione ( 56 ) G103 P n VQi � Istruzione ( 66 ) G1XYN xf, yf, n, nf � Istruzione ( 62 ) G2 X xf Y yf I xc J yc � Istruzione ( 72 ) G2R r e xf yf �
Istruzione ( 67 ) G2XYN xc yc xf yf n qf � Istruzione ( 63 ) G3 X xf Y yf i xc J yc � Istruzione ( 73 ) G3R r e xf yf �
Istruzione ( 68 ) G3XYN xc, yc, xf, yf, n, qf � Istruzione ( 37 ) INTP MODE = n �
Istruzione ( 31 ) INTP PAR n AX m P p � Istruzione ( 84 ) LINE n1 m1 n2 m2 Istruzione ( 50 ) LINE2 q1 q2 � Istruzione ( 51 ) LINE3 q1 q2 q3 � Istruzione ( 52 ) LINE4 q1 q2 q3 q4 � Istruzione ( 53 ) LINE5 q1 q2 q3 q4 q5 � Istruzione ( 54 ) LINE6 q1 q2 q3 q4 q5 q6 � Istruzione ( 70 ) MOVEXYT xf yf tf � Istruzione ( 39 ) NO CONT MOVE �
Instructions for managing tools (instructions developed for specific
applications. To use these instructions consult the Sipro technical
department )
Istruzione ( 40 ) G40 � Istruzione ( 41 ) G41 � Istruzione ( 42 ) G42 �
Istruzione ( 43 ) G43 (oppure TOOL EXT) � Istruzione ( 44 ) G44 (oppure TOOL INT ) � Istruzione ( 45 ) G45 �
Istruzione ( 75 ) TOOL ANGLE = m � Istruzione ( 74 ) TOOL n �
Instructions for controlling the flow of the program
Istruzione ( 34 ) END � Istruzione ( 4 ) GOSUB n � Istruzione ( 8 ) GOTO n � Istruzione ( 142 ) IF AX n GOSUB m � Istruzione ( 146 ) IF AX n GOTO m � Istruzione ( 132 ) IF IN n GOSUB m � Istruzione ( 133 ) IF IN n JMPPRG m � Istruzione ( 136 ) IF IN n GOTO m �
Istruzione ( 248 ) IF VBi = ValB GOTO m � Istruzione ( 230 ) IF VNi < n GOSUB m � Istruzione ( 231 ) IF VNi = n GOSUB m � Istruzione ( 232 ) IF VNi > n GOSUB m � Istruzione ( 233 ) IF VNi < n GOTO m � Istruzione ( 234 ) IF VNi = n GOTO m � Istruzione ( 235 ) IF VNi > n GOTO m � Istruzione ( 210 ) IF VQi < m GOSUB n � Istruzione ( 211 ) IF VQi = m GOSUB n � Istruzione ( 212 ) IF VQi > m GOSUB n � Istruzione ( 213 ) IF VQi < m GOTO n � Istruzione ( 214 ) IF VQi = m GOTO n � Istruzione ( 215 ) IF VQi > m GOTO n � Istruzione ( 5 ) JMPPRG n �
Istruzione ( 102 ) MEM STEP VNi Istruzione ( 87 ) SKIP WAIT AX n Istruzione ( 36 ) WAIT AX
Istruzione ( 81 ) WAIT AX n IN QUOTE
Instructions managing parallel programs
Istruzione ( 120 ) FORK PROG n Istruzione ( 121 ) KILL PROG n
Instructions for the management of the parameters of the numerical
control
Istruzione ( 176 ) VBi = SETMAC PAR n VAL m Istruzione ( 178 ) VBi = SETP AX n PAR j VAL m Istruzione ( 177 ) VQi = GETMAC PAR n
Istruzione ( 179 ) VQi = GETP AX n PAR j
Instructions for general use
Istruzione ( 104 ) VQi = FUN n p1 p2 p3 p4 Istruzione ( 247 ) WAIT VBi
In the list of available instructions that will now be shown, the following conventions are used:
Notations
{xxx} indicates that the parameter xxx is optional (can be omitted) <val> indicates a constant
<val | VB> indicates a constant (0, 1) or a Binary Variable <val | VN> indicates a constant or a Numeric Variable
<val | VQ> 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 oroutputs from the NC program with index greater than 64 is necessary to use special firmware
N.B. The syntax of programming instructions follows this convention:
Instruction <Instruction Name> <parameters>
NC Editor format m <Instruction Name><parameters>
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 (14) AN OUT n = m... 40 Instruction (77) ANT AX n TP t VAL q ... 41 Instruction ( 94 ) AX n INCR m... 42 Instruction (38) CONT MOVE � ... 46 Instruction (34) END � ... 47 Instruction (57) F m � ... 48 Instruction (120) FORK PROG n ... 49 Instruction (60) FXY m �... 50 Instruction (61) G1 X xf Y yf � ... 50 Instruction (56) G103 P n VQi �... 51 Instruction (66) G1XYN xf, yf, n, nf � ... 55 Instruction (62) G2 X xf Y yf I xc J yc � ... 56 Instruction (72) G2R r e xf yf � ... 57 Instruction (67) G2XYN xc yc xf yf n qf �... 58 Instruction (63) G3 X xf Y yf i xc J yc � ... 59 Instruction (73) G3R r e xf yf � ... 60 Instruction (68) G3XYN xc, yc, xf, yf, n, qf �... 61 Instruction (40) G40 �... 62 Instruction (41) G41 �... 64 Instruction (42) G42 �... 66 Instruction (43) G43 (or TOOL EXT) �... 67 Instruction (44) G44 (or TOOL INT) �... 68 Instruction (45) G45 �... 69 Instruction (4) GOSUB n � ... 70 Instruction (8) GOTO n �... 71 Instruction (142) IF AX n GOSUB m �... 72 Instruction (146) IF AX n GOTO m � ... 73 Instruction (132) IF IN n GOSUB m � ... 74 Instruction (133) IF IN n JMPPRG m �... 75 Instruction (136) IF IN n GOTO m �... 76 Instruction (248) IF VBi = ValB GOTO m �... 77 Instruction (230) IF VNi < n GOSUB m �... 78
Instruction (3) INPUT n ... 87 Instruction (37) INTP MODE = n �... 88 Instruction (31) INTP PAR n AX m P p � ... 89 Instruction (5) JMPPRG n �... 91 Instruction (121) KILL PROG n... 91 Instruction (84) LINE n1 m1 n2 m2 ... 92 Instruction (50) LINE2 q1 q2 �... 93 Instruction (51) LINE3 q1 q2 q3 �... 93 Instruction (52) LINE4 q1 q2 q3 q4 �... 93 Instruction (53) LINE5 q1 q2 q3 q4 q5 �... 94 Instruction (54) LINE6 q1 q2 q3 q4 q5 q6 �... 94 Instruction (102) MEM STEP VNi... 95 Instruction (70) MOVEXYT xf yf tf �... 96 Instruction (39) NO CONT MOVE � ... 97 Instruction (35) NO WAIT AX ... 98 Instruction (55) ORG n (or G55 n) � ... 101 Instruction (18) OUTON n ... 103 Instruction (19) OUTOFF n... 103 Instruction (15) PULSE n ... 104 Instruction (93) QUOTE AX n = m... 105 Instruction (47) SET ANGLE ORG n VAL i � ... 106 Instruction (59) SET ORG m AX n VAL i... 107 Instruction (86) SET POS AX n = m... 108 Instruction (87) SKIP WAIT AX n ... 109 Instruction (83) STOP AX n... 110 Instruction (17) TIME m ... 111 Instruction (75) TOOL ANGLE = m � ... 112 Instruction (74) TOOL n � ... 113 Instruction (195) VB [VNi] = n... 113 Instruction (190) VBi = EQ2D v1 v2 v3 n ... 114 Instruction ( 176 ) VBi = SETMAC PAR n VAL m ... 115 Instruction (178) VBi = SETP AX n PAR j VAL m ... 116 Instruction (246) VBi = VB[VNj ] ... 117 Instruction (240) VBi = x ... 117 Instruction (189) VBi = x ... 118 Instruction (82) VEL AX n = m % ... 118 Instruction (92) VEL AX n = m [mm/min] ... 119 Instruction (192) VN[VNi] = n... 119 Instruction (220) VNi = m ... 119 Instruction (188) VNi = m ... 120 Instruction (221) VNi = m + n... 120 Instruction (222) VNi = m - n... 121 Instruction (225) VNi = VQj ... 121 Instruction (227) VNi = VN[VNj]... 122 Instruction (228) VNi = AI m... 122 Instruction (238) VNi = STEP + n... 123 Instruction (191) VQ[VNi] = m... 123 Instruction (200) VQi = m ... 124 Instruction (187) VQi = m ... 125 Instruction (208) VQi = AI n... 125 Instruction (184) VQi = ATAN2 (m,j) ... 126 Instruction (186) VQi = CATH (m,j) ... 126 Instruction (185) VQi = DIST (m,j) ... 127 Instruction (104) VQi = FUN n p1 p2 p3 p4 ... 128 Instruction (48) VQi = GET ANGLE ORG n � ... 128 Instruction (177) VQi = GETMAC PAR n... 129 Instruction (179) VQi = GETP AX n PAR j... 129 Instruction (193) VQi = m * j... 130 Instruction (194) VQi = m/j... 130 Instruction (180) VQi = m * SIN j... 131
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
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÷295VB_FIRST_AX_DIS ... 299 VB296÷303VB_FIRST_AX_SEL... 299 VB304÷311VB_FIRST_AX_IN_QUO �... 300 VB312÷319VB_FIRST_AX_ZERO ... 300 VB320÷327VB_FIRST_PID_DIS... 300 VB328÷335VB_FIRST_SET_ZERO ... 301 VB336÷343VB_FIRST_AX_JOG_M... 301 VB344÷351VB_FIRST_AX_HOLD_S ... 301 VB352÷355VB_FIRST_IRQ_EN ... 302 VB360÷367VB_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÷383VB_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
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÷267VN_FIRST_POS_AX_MM �... 323 VN268÷271VN_FIRST_IRQ_CNT ... 323 VN272 VN_AX_ONOFF_REC_GC ... 324 VN273 VN_AX_ONOFF_DEC... 324 VN274 VN_EN_ROLLOVER ... 324 VN276–283VN_FIRST_FOLL_FACT ... 325 VN284÷291VN_FIRST_FOLL_ENC ... 326 VN292–299VN_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
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÷355VN_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
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)
AN OUT n = m
NC Keyboard Editor Format 14 AN OUT n = m n <val | VN>
m <val | VQ>
Sets a voltage of m volts on analog output n. (from -10 volts to +10 volts). Example:
#prog 1 #name Test
Instruction
(77)
ANT AX n TP t VAL q
NC Keyboard Editor Format 77 ANT AX <n> TP <t> VAL <q>n <val | VN> t <val | VN> q <val | VQ>
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 Meaning
0 execution passes to the next step when the axis is found at distance q from the objective position
1 execution passes to the next step when the axis is found at distance q from the position of departure 2 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 activatedExample:
: 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.
Instruction
( 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 <val | VN> m <val | VQ>
Incremental movement of axis n, i.e., to the actual position of axis n it adds the value m. Example:
: AX 1 TO 100 //axis in position = 100
: TIME 2 //waits 2 seconds
: AX 1 INCR 50 //axis in position = previous position + 50
: END
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
Instruction
( 80 ) AX n TO m
N1C Keyboard Editor Format 80 AX n TO mn <val | VN> m <val | VQ>
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.
Instruction
( 85 ) AX n VEL v QUOTE m
NC Keyboard Editor Format 85 AX n VEL v QUOTE mn <val | VN> v <val | VQ> m <val | VQ>
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 Meaning
0 usual behavior: QuoAx = begin speed change position 1 if NewVel < CurVel => QuoAx = position of end speed change 2 if NewVel < CurVel => QuoAx = position of end speed change
3 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 NewVel<ActVel (VN413=1) the new speed is already changed at the specified position.
: VN413 = 1
: 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
Example 3: If the NewVel>ActVel (VN413=1) the new speed is already changed at the specified position.
: 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).