[go: up one dir, main page]

0% found this document useful (0 votes)
29 views304 pages

PLC Interface

The MACHINEMATE PLC Interface Manual provides detailed information on the operation and specifications of MACHINEMATE INC products, emphasizing the importance of understanding proper usage before operation. It includes sections on tables and data interfaces, signal interfaces, and various control signals essential for qualified personnel. Users are encouraged to contact MACHINEMATE INC for additional information not covered in the manual.

Uploaded by

elek3ic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views304 pages

PLC Interface

The MACHINEMATE PLC Interface Manual provides detailed information on the operation and specifications of MACHINEMATE INC products, emphasizing the importance of understanding proper usage before operation. It includes sections on tables and data interfaces, signal interfaces, and various control signals essential for qualified personnel. Users are encouraged to contact MACHINEMATE INC for additional information not covered in the manual.

Uploaded by

elek3ic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 304

Software Manual

MACHINEMATE ®

PLC Interface
MACHINEMATE®

Progress is an ongoing commitment at MACHINEMATE INC. We


continually strive to offer the most advanced products in the industry.
Therefore, information in this document is subject to change without
notice. The illustrations and specifications in this document are not
binding in detail. MACHINEMATE INC shall not be liable for any
technical or editorial omissions occurring in this document nor for any
consequential or incidental damages resulting from the use of this
document.

DO NOT ATTEMPT to use any MACHINEMATE INC product until the use
of such product is completely understood. It is the responsibility of the
user to make certain proper operation practices are understood.
MACHINEMATE INC products should be used only by qualified personnel
and for the express purpose for which said products were designed.

Should information not covered in this document be required, please contact:

MACHINEMATE INC.
Fond du Lac, WI 54937

Phone: 920-907-0001
Fax: 920-907-0181

E-mail address: info@machinemate.com

Document version: 0717

PLC Interface Manual


page 2 / 304
MACHINEMATE®

Contents
1. Tables and data interface 11
1.1. Introduction to the PLC Interface 11
1.2. Tables and data interface for Station 1 15
1.3. Tables and data interface for Station 2 18
1.4. Tables and data interface for Stations 3 to 8 18
1.5. Electrical data – switches, lights, voltages 19

2. Signal interface 23
2.1. General 23
2.1.1. Introduction 23
2.1.2. Signal-interface 24
2.1.3. Interface typography 25
2.1.4. Interface terminology 25
2.2. Signal-interface summary 26
2.2.1. DWORD 1 (INGENERAL1, ONGENERAL1) 27
2.2.2. DWORD 2 (INGENERAL2, ONGENERAL2) 28
2.2.3. DWORD 3 (IN_DRIVEON, ONBCDWORD1) 29
2.2.4. DWORD 4 (IN_DRIVEEN, ONBCDWORD2) 29
2.2.5. DWORD 5 (IN_HOMING, ONINPOS) 30
2.2.6. DWORD 6 (IN_SWLIMIT, ONHOMINGOK) 30
2.2.7. DWORD 7 (IN_STRTPOS, ONPOSAXES) 31
2.2.8. DWORD 8 (IN_CYCLEB, ONCYCBYTE) 31
2.2.9. DWORD 9 (IN_EXTMODE, ONEXTMODE) 32
2.2.10. DWORD 10 (IN_DISABLE, ONREADY) 32
2.2.11. DWORD 11 (IN_SW_AXES, ON_PLCMDONE) 33
2.2.12. DWORD 12 (IN_SPINDLE, ONSPINDLE) 34
2.2.13. DWORD 13 (IN_PARKING, ONCONTROL) 35
2.2.14. DWORD 14 (IN_MIRROR, ONMIRROR) 35
2.2.15. DWORD 15 (IN_OVERRIDE, ONCMND_P) 36
2.2.16. DWORD 16 (IN_IPOMVMT, ONCMND_M) 36
2.2.17. DWORD 17 (IN_HDWHEEL, ONHANDWH) 37
2.2.18. DWORD 18 (IN_FASTIO, ON_CAM1_4) 38
2.2.19. DWORD 19 (IN_FASTSELECT, ON_CAM5_8) 39
2.2.20. DWORD 20 (IN_JPLS, ON_CAM9_12) 40
2.2.21. DWORD 21 (IN_JMNS, ON_CAM13_16) 41
2.2.22. DWORD 22 (free, ON_CAM17_20) 42
2.2.23. DWORD 23 (free, ON_CAM21_24) 43
2.2.24. DWORD 24 (free, ON_CAM25_28) 44
2.2.25. DWORD 25 (free, ON_CAM29_32) 45
2.2.26. DWORD 26 (free, ONPANEL) 46
2.2.27. DWORD 27 (IN_IPR, ON_IPR) 46
2.2.28. DWORD 28 (free, ON_SWAX) 47
2.2.29. DWORD 29 (IN_FASTM_MASK, ON_FASTM) 47
2.2.30. DWORD 30 (IN_TOOL, free) 48
2.2.31. DWORD 31 (IN_TOOLPLACE, ONTOOL) 48
2.2.32. DWORD 32 (IN_TOOLREQ, ON_TOOLPLACE) 49
2.2.33. DWORD 33 (free, ON_TOOLTABLE) 49
2.2.34. DWORD 34 (free, free) 49
2.2.35. DWORD 35 (free, free) 49

PLC Interface Manual


page 3 / 304
MACHINEMATE®

2.2.36. DWORD 36 (free, ON_EGBMOTION) 50


2.2.37. DWORD 37 (IN_FIVEAXES, ON_EGBCONTROL) 50
2.2.38. DWORD 38 (free, ON_FIVEAXES) 51
2.2.39. DWORD 39 (IN_IR_RD_IO, ON_IR_RD_IO) 51
2.2.40. DWORD 40 (IN_IR_EN, ON_IR_EN) 51
2.2.41. DWORD 41 (IN_IR_ACT, ON_IR_ACT) 52
2.2.42. DWORD 42 (free, ON_IR_PROG_ACT) 52
2.2.43. DWORD 43 (free, ON_PLC_IPO_ACT) 52
2.2.44. DWORD 44 (free, ON_PLC_IPO_ENDP) 53
2.2.45. DWORD 45 (free, ON_PLC_POS_ACT) 53
2.2.46. DWORD 46 (free, ON_PLC_POS_ENDP) 53
2.2.47. Summary of all inputs 54
2.2.48. Summary of all outputs 57
2.2.49. Critical signals in this interface 62
2.3. Signal-Interface, CNC inputs 63
2.3.1. INGENERAL 1 (dword 1), general control signals 1 63
2.3.1.1. INEMERGENCn -- EMERGENCY STOP 64
2.3.1.2. IN_START -- NC CYCLE START 65
2.3.1.3. IN_STOPn -- FEED HOLDn (CYCLE STOP) 68
2.3.1.4. IN_TRANSF -- BLOCK TRANSFER ENABLE 70
2.3.1.5. IN_ENABLE -- FEED ENABLE ALL AXES 71
2.3.1.6. IN_NO_HDW_RESET -- NO RESET OF HANDWHEEL 73
2.3.1.7. INPLAYBACK -- PLAYBACK, TEACH A POINT 73
2.3.1.8. IN_AFC_EN -- AFC ENABLE 74
2.3.1.9. IN_BLOCK_DEL, IN_BLOCK_DELn – BLOCK DELETE ON OR OFF 75
2.3.1.10. IN_G01_OVER, IN_G01_OVERn – G01 OVERRIDE ON OR OFF 75
2.3.1.11. IN_FORWARD, IN_BACKWARD – NC PROGRAM BLOCK PROCESSING DIRECTION 76
2.3.1.12. IN_M1STOP, IN_M1STOPn – M01 OPTIONAL STOP ON OR OFF 76
2.3.1.13. IN_WITH_MOVE, IN_WITH_MOVEn – RUN PROGRAMS WITH OR WITHOUT MOVEMENT 77
2.3.1.14. IN_PITCHERR, IN_PITCHERRn – PITCH ERROR COMP ON OR OFF 77
2.3.1.15. IN_IGNRMSERR – IGNORE AXIS FEEDBACK ERRORS 78
2.3.2. INGENERAL 2 (dword 2), general control signals 2 79
2.3.2.1. IN_REPEAT -- EDM Repeat 79
2.3.2.2. IN_INTERVA -- EDM Interval 79
2.3.2.3. IN_INSPECT -- EDM Inspect 79
2.3.2.4. IN_MIRR_STROBE -- MIRRORING STROBE Signal 80
2.3.2.5. IN_PLC_NO_RETREAT -- PLC Axis Move of IPO Axis Requires No Retreat 80
2.3.2.6. IN_DIS_ENABLE -- Distance Control Enable 81
2.3.3. IN_DRIVEON (dword 3), control loop enable signals 82
2.3.4. IN_DRIVEEN (dword 4), FEED enable signals 84
2.3.5. IN_HOMING (dword 5), homing control signals 85
2.3.6. IN_SWLIMIT (dword 6), axes software limits 86
2.3.7. IN_STRTPOS (dword 7), positioning axes control signals 87
2.3.8. IN_CYCLEB (dword 8), cycle input signals 89
2.3.9. IN_EXTMODE (dword 9), external CNC mode control signals 90
2.3.9.1. External CNC operating mode control signals (word 1) 90
2.3.9.1.1. Basic functions 91
2.3.9.1.2. External manual operating mode 92
2.3.9.1.3. External CNC operating mode selection 96
2.3.9.2. External program selection control signals (word 2) 99
2.3.9.2.1. Basic functions for external program selection 100
2.3.9.2.2. Multiplex mode for program selection 100
2.3.9.2.3. Direct mode for program selection 103
2.3.9.2.4. Replies of the CNC - ONEXTMODE 104
2.3.10. IN_DISABLE (dword 10), disable Sercos axes (not used) 106
2.3.11. IN_SW_AXES (dword 11), switching axes control signals 106
2.3.11.1. Switch-over spindle/rotational axes for 6 spindles/axes 106
2.3.11.2. IN_GEAR01..06 -- Spindle gear box selection 107
2.3.11.2.1. Sequence for spindle gear changes between CNC and PLC 107
2.3.12. IN_SPINDLE (dword 12), spindle control signals 109
2.3.12.1. IN_NULLV01 .. 06 -- SPINDLE 0 VOLT 109
2.3.12.2. IN_REV_01 .. 06 -- SPINDLE REVERSE 110
2.3.13. IN_PARKING (dword 13), parking control signals 111
2.3.14. IN_MIRROR (dword 14), mirroring control signals 113
PLC Interface Manual
page 4 / 304
MACHINEMATE®

2.3.15. IN_OVERRIDE (dword 15), override signals 114


2.3.15.1. Feed override 114
2.3.15.2. Spindle override 115
2.3.16. IN_IPOMVMT (dword 16), interpolated axis motion control signals 116
2.3.17. IN_HDWHEEL (dword 17), handwheel control signals 117
2.3.17.1. Disabling handwheels from the PLC 119
2.3.18. IN_FASTIO (dword 18), digital input (probe) signals 120
2.3.19. IN_FASTSELECT (dword 19), digital input (probe) select signals 122
2.3.20. IN_JPLS (dword 20), multiple axis jog (plus direction) control signals 123
2.3.21. IN_JMNS (dword 21), multiple axis jog (minus direction) control signals 124
2.3.22. IN_IPR (dword 27), PLC to NC block interpreter control signals 125
2.3.22.1. IN_CANCELBLK -- CANCEL THE ACTIVE BLOCK 125
2.3.22.2. IN_SINGLE_STEP -- PROGRAM IN SINGLE STEP MODE 126
2.3.22.3. IN_IPR_DO_STEP -- SINGLE STEP THE PROGRAM, ONE BLOCK 126
2.3.23. IN_FASTM (dword 29), fast output signals 128
2.3.24. IN_TOOL (dword 30), tool management signals 129
2.3.24.1. IN_TOOLRELEASE -- TOOL IS RELEASED IN SPINDLE 129
2.3.24.2. IN_TOOLCHANGE -- TOOL CHANGE HAS BEGUN 129
2.3.24.3. IN_TOOLPOS -- REQUEST TO POSITION TOOL MAGAZINE 130
2.3.24.4. IN_TOOLACTIVE -- TOOL LIFE TRACKING IS ACTIVE 130
2.3.25. IN_TOOLPLACE (dword 31), tool magazine location request 131
2.3.26. IN_TOOLREQ (dword 32), tool table location request 131
2.3.26.1. Tool change sequences for PLC 132
2.3.26.1.1. Fixed location coded tools and PLC-controlled magazine 133
2.3.26.1.1.1. Tool change procedure 133
2.3.26.1.1.2. Tool return procedure 134
2.3.26.1.2. Fixed location coded tool and CNC-controlled magazine 135
2.3.26.1.2.1. Tool change procedure 135
2.3.26.1.2.2. Tool return procedure 136
2.3.26.1.3. Variable location coded tools and PLC-controlled magazine 137
2.3.26.1.3.1. Tool change procedure 137
2.3.26.1.3.2. Tool return procedure 138
2.3.26.1.4. Moving CNC-controlled magazine to location via the PLC 139
2.3.26.2. CNC tool data interaction with tool management 139
2.3.26.3. Flow chart for tool management signals 140
2.3.27. IN_FIVEAXES (dword 37), five-axis function signals 143
2.4. Signal-Interface, CNC outputs 144
2.4.1. ONGENERAL 1 (dword 1), general state signals 1 144
2.4.1.1. ON_CYCLEON -- CYCLE ON 145
2.4.1.2. ON_STOPNCn -- FEED HOLDn (CYCLE STOP) 146
2.4.1.3. ON_STARTNC -- NC-START (CYCLE START) 147
2.4.1.4. CNC operating modes (ON_AUTO, ON_SINGLE, ON_MDI, ON_JOGMODE, ON_HOMING) 148
2.4.1.5. ON_INC_JOG -- INCREMENTAL JOG MODE 148
2.4.1.6. ON_CONT_JOG -- CONTINUOUS JOG MODE 149
2.4.1.7. ON_CNC_CHAN_ACT -- CNC STATION ACTIVE ON HMI 149
2.4.1.8. ON_EMERG -- CNC emergency stop 150
2.4.1.9. ON_PRG_STP -- PROGRAM STOP (M00/M01) 151
2.4.1.10. ON_PRG_END -- END OF PROGRAM (M02/M30) 152
2.4.1.11. ON_RESET -- CONTROL RESET 154
2.4.1.12. ON_NO_CNTR -- NO FEEDBACK CONTROL 155
2.4.1.13. ON_HOME_OK -- HOME POSITION OK 156
2.4.1.14. ON_NCERROR -- NC PROGRAM ERROR 157
2.4.1.15. ON_ADDKEY1 -- AUXILIARY PUSH-BUTTON 1 158
2.4.1.16. ON_ADDKEY2 -- AUXILIARY PUSH-BUTTON 2 159
2.4.1.17. ON_PROGRAM -- PROGRAM ACTIVE 159
2.4.1.18. ON_ADMISSN -- ADMISSION 159
2.4.1.19. ON_PANEL -- TEACH PANEL ACTIVE 159
2.4.1.20. ON_RETREAT -- RETREAT (RETURN TO PATH) 160
2.4.1.21. ON_BACKW -- BACKWARD 160
2.4.1.22. ON_TEACHED -- TEACH-Editor 160
2.4.1.23. ON_BLKCHNG -- BLOCKCHANGE 161
2.4.1.24. ON_M1STOP -- M01 OPTIONAL STOP ACTIVE 161
2.4.1.25. ON_WITH_MOVE -- AXES WILL MOVE DURING PROGRAM 161
2.4.1.26. ON_G01_OVER -- G01 OVERRIDE ACTIVE 162
2.4.1.27. ON_BLOCK_DEL -- BLOCK DELETE (/) ACTIVE 162
2.4.1.28. ON_PITCHERR -- PITCH ERROR COMP ACTIVE 163

PLC Interface Manual


page 5 / 304
MACHINEMATE®

2.4.2. ONGENERAL 2 (dword 2), general state signals 2 164


2.4.2.1. ON_STAND -- STANDSTILL 165
2.4.2.2. ON_RAPID -- RAPID TRAVERSE 166
2.4.2.3. ON_THREAD -- G33/34 ACTIVE 167
2.4.2.4. ON_HOMEOK -- HOMEOK 168
2.4.2.5. EDM functions signals 168
2.4.2.5.1. ON_INTVEND -- INTERVAL AT HOMING 168
2.4.2.5.2. ON_INTRET -- INTERVAL AT RETURN 168
2.4.2.5.3. ON_INTVHLD -- INTERVAL AT HOLD POSITION 168
2.4.2.6. ON_EGB_ACTIVE -- EGB ACTIVE 169
2.4.2.7. ON_EGB_SYNC -- EGB TABLE SYNCHRONIZED 169
2.4.2.8. ON_READ_TO_BLK -- READ TO BLOCK IS ACTIVE 170
2.4.2.9. ON_HDW_TICKS_LOST1 -- HANDWHEEL 1 LOST TICKS ON RAPID SPIN 170
2.4.2.10. ON_HDW_TICKS_LOST2 -- HANDWHEEL 2 LOST TICKS ON RAPID SPIN 171
2.4.2.11. ON_HDW_TICKS_LOST3 -- HANDWHEEL 3 LOST TICKS ON RAPID SPIN 171
2.4.2.12. ON_TRANSF -- BLOCK TRANSFER ENABLE STATUS 172
2.4.2.13. ON_CYCLE_STOP -- CYCLE STOP (FEED HOLD) ACTIVE 172
2.4.2.14. ON_AUTOFOCUS -- DISTANCE CONTROL FEATURE 172
2.4.2.15. ON_DIST_CTRL -- DISTANCE CONTROL IS ACTIVE 172
2.4.2.16. ON_STROBE1 .. 4 -- BCD strobes 173
2.4.3. ONBCDWORD1, 2 (dword 3, 4), BCD-codes 177
2.4.4. ONINPOS (dword 5), axis in position state signals 181
2.4.5. ONHOMINGOK (dword 6), homing state signals 183
2.4.6. ONPOSAXES (dword 7), positioning axes-state signals 184
2.4.7. ONCYCBYTE (dword 8), cycle output signals 185
2.4.8. ONEXTMODE (dword 9), external CNC state signals 186
2.4.8.1. External CNC operating mode state signals (word 1) 186
2.4.8.2. External program selection state signals (word 2) 187
2.4.9. ONREADY (dword 10), Sercos drive ready signals 188
2.4.10. ON_PLCMDONE (dword 11), PLC commanded measuring done state signals 188
2.4.11. ONSPINDLE (dword 12), spindle state signals 189
2.4.11.1. ON_STAND01 ... 06 -- SPINDLE STANDSTILL (STOPPED) 189
2.4.11.2. ON_MOVE01 ... 06 -- SPINDLE SPEED REACHED 190
2.4.12. ONCONTROL (dword 13), Sercos axis control state signals 191
2.4.13. ONMIRROR (dword 14), axis mirroring state signals 191
2.4.14. ONCMND_P (dword 15), ONCMND_M (dword 16), motion command plus/minus state
signals 192
2.4.15. ONHANDWH (dword 17), handwheel state signals 193
2.4.16. ON_CAM1_4 (dword 18), software CAM state signals for axes 1 to 4 194
2.4.17. ON_CAM5_8 (dword 19), software CAM state signals for axes 5 to 8 196
2.4.18. ON_CAM9_12 (dword 20), software CAM state signals for axes 9 to 12 197
2.4.19. ON_CAM13_16 (dword 21), software CAM state signals for axes 13 to 16 198
2.4.20. ON_CAM17_20 (dword 22), software CAM state signals for axes 17 to 20 199
2.4.21. ON_CAM21_24 (dword 23), software CAM state signals for axes 21 to 24 200
2.4.22. ON_CAM25_28 (dword 24), software CAM state signals for axes 25 to 28 201
2.4.23. ON_CAM29_32 (dword 25), software CAM state signals for axes 29 to 32 202
2.4.24. ONPANEL (dword 26), teach panel PLC function key state signals 203
2.4.25. ON_IPR (dword 27), NC block interpreter to PLC status signals 204
2.4.25.1. ON_CANCELBLK -- CANCELLING THE ACTIVE BLOCK 204
2.4.25.2. ON_MEMORY_MODE -- CNC IS IN INTERNAL MEMORY MODE 205
2.4.25.3. ON_MEMORY_OPERATION_ACTIVE -- CNC MEMORY OPERATION IS ACTIVE 205
2.4.25.4. ON_SINGLE_STEP -- SINGLE STEP MODE ACTIVE 205
2.4.25.5. ON_IPR_DO_STEP -- SINGLE STEP COMMANDED BY PLC 206
2.4.26. ON_SWAX (dword 28), switching spindle/axis control state signals 207
2.4.27. ON_FASTM (dword 29), fast output signals 208
2.4.28. ONTOOL (dword 31), tool management signals 209
2.4.28.1. ON_TOOLPOINT -- TOOL MAGAZINE MOVED 210
2.4.28.2. ON_TOOLWARNING -- TOOL LIFE REACHED WARNING LIMIT 210
2.4.28.3. ON_TOOLLIFEEND -- NO REMAINING TOOL LIFE 210
2.4.28.4. ON_TOOLREF -- TOOL MAGAZINE IS HOMING 211
2.4.28.5. ON_TOOLSTART -- TOOL IS BACK IN MAGAZINE 211
2.4.28.6. ON_TOOLDIR -- DIRECTION FOR TOOL MAGAZINE MOTION 211
2.4.28.7. ON_TOOLERROR -- ERROR FOR TOOL MAGAZINE MOTION 212
2.4.28.8. ON_TOOLANSWER -- NEW TOOL IS IN SPINDLE 212

PLC Interface Manual


page 6 / 304
MACHINEMATE®

2.4.28.9. ON_TOOLINPOS -- TOOL MAGAZINE IS IN POSITION 212


2.4.28.10. ON_TOOL_IS_ACT -- SELECTED TOOL IS IN SPINDLE 213
2.4.28.11. ON_TOOLNOTFND -- SELECTED TOOL IS NOT FOUND 213
2.4.28.12. ON_SPARENOTFND -- SPARE FOR SELECTED TOOL IS NOT FOUND 214
2.4.29. ON_TOOLPLACE (dword 32), tool magazine location signals 215
2.4.30. ON_TOOLTABLE (dword 33), tool table signals 215
2.4.31. ON_EGBMOTION (dword 36), electronic gear box motion signals 216
2.4.32. ON_EGBCONTROL (dword 37), electronic gear box control signals 217
2.4.33. ON_FIVEAXES (dword 38), five-axis function signals 218
2.4.34. ON_PLC_IPO_ACT (dword 43), PLC control of interpolated axes status signals 219
2.4.35. ON_PLC_IPO_ENDP (dword 44), PLC motion of interpolated axes – end point status
signals 220
2.4.36. ON_PLC_POS_ACT (dword 45), PLC control of positioning axes status signals 221
2.4.37. ON_PLC_POS_ENDP (dword 46), PLC motion of positioning axes – end point status
signals 222

3. Function interface – single station 223


3.1. PLC programming of functions and function blocks 225
3.2. Extended set of cycle parameters (or P-parameters) 226
3.3. ACTIVATE_SPOTI 226
3.4. ACTIVATE_SWORD 226
3.5. BLINKER 227
3.6. CLEAR_ERROR_MESSAGES 227
3.7. CLEAR_G92_OFFSET 227
3.8. DEACTIVATE_SPOTI 228
3.9. DEACTIVATE_SWORD 228
3.10. DISTANCE_CTRL 228
3.11. ERASE_NC_PROGRAM_MEMORY 229
3.12. GET_PARAMETER 230
3.13. HANDWHEEL_DIRECTION 230
3.14. HANDWHEEL_FACTOR_AUTO1 230
3.15. HANDWHEEL_FACTOR_AUTO2 231
3.16. HANDWHEEL_FACTOR_MAN1 232
3.17. HANDWHEEL_FACTOR_MAN2 232
3.18. HANDWHEEL_NO_AXIS 234
3.19. LOAD_NC_PROGRAM 234
3.20. MOVE_INTERPOLATING_AXIS 235
3.21. MOVE_POSITIONING_AXIS 235
3.22. READ_ANALOG_CHANNEL 236
3.23. READ_APPL_DATA 236
3.24. READ_BREAKING_PARAMETER 237
3.25. READ_CUTTING_FORCE 237
3.26. READ_GEOMETRIC_D 237
3.27. READ_GEOMETRIC_H 238
3.28. READ_GEOMETRIC_Z 238
3.29. READ_NO_PIECES 238
3.30. READ_PLANNED_LIFE 239
3.31. READ_POSITION 239
3.32. READ_RATE_X 239
3.33. READ_RATE_Y 240
3.34. READ_REMAINING_LIFE 240
3.35. READ_SPARE_TOOL 240
3.36. READ_SUPPLEM_X 241
3.37. READ_SUPPLEM_Y 241
3.38. READ_SWORD 241
3.39. READ_TOOL_NUMBER 242
3.40. READ_TOOL_TYPE 242
PLC Interface Manual
page 7 / 304
MACHINEMATE®

3.41. READ_WARNING_LIMIT 243


3.42. READFIRSTBLOCK 243
3.43. RESET_HANDWHEEL_FACTOR 243
3.44. SELECT_NC_PROGRAM 244
3.45. SELECT_NC_STATION 244
3.46. SET_G92_OFFSET 245
3.47. SET_JOG_INCREMENTS 245
3.48. SET_PARAMETER 246
3.49. SET_POSITIONING_ADJUST 246
3.50. SET_POSITIONING_FEED 246
3.51. WRITE_ANALOG_CHANNEL 247
3.52. WRITE_APPL_DATA 247
3.53. WRITE_BREAKING_PARAMETER 248
3.54. WRITE_CUTTING_FORCE 248
3.55. WRITE_ERROR_MESSAGE 248
3.56. WRITE_GEOMETRIC_D 249
3.57. WRITE_GEOMETRIC_H 249
3.58. WRITE_GEOMETRIC_Z 250
3.59. WRITE_NO_PIECES 250
3.60. WRITE_PLANNED_LIFE 250
3.61. WRITE_POSITION 251
3.62. WRITE_RATE_X 251
3.63. WRITE_RATE_Y 251
3.64. WRITE_REMAINING_LIFE 252
3.65. WRITE_SPARE_TOOL 252
3.66. WRITE_SPINDLE_CODE 252
3.67. WRITE_SPINDLE_ORIENTATION 253
3.68. WRITE_SPOTI 254
3.69. WRITE_SUPPLEM_X 255
3.70. WRITE_SUPPLEM_Y 255
3.71. WRITE_SWORD 255
3.72. WRITE_TOOL_NUMBER 256
3.73. WRITE_TOOL_TYPE 256
3.74. WRITE_WARNING_LIMIT 256

4. Function interface – multiple stations 257


4.1. CNC commands 257
4.2. Tables and data access: Compensations, Offsets and Parameters 258
4.2.1. fGET_D_CORR 259
4.2.2. fGET_D_R 259
4.2.3. fGET_D_WEAR 259
4.2.4. fGET_H_CORR 259
4.2.5. fGET_H_I_CORR 260
4.2.6. fGET_H_I_WEAR 260
4.2.7. fGET_H_J_CORR 260
4.2.8. fGET_H_J_WEAR 260
4.2.9. fGET_H_WEAR 261
4.2.10. fGET_PARAMETER 261
4.2.11. fGET_PART_POS_OFFS 261
4.2.12. fSET_D_CORR 262
4.2.13. fSET_D_R 262
4.2.14. fSET_D_WEAR 262
4.2.15. fSET_H_CORR 263
4.2.16. fSET_H_I_CORR 263
4.2.17. fSET_H_I_WEAR 263
4.2.18. fSET_H_J_CORR 264

PLC Interface Manual


page 8 / 304
MACHINEMATE®

4.2.19. fSET_H_J_WEAR 264


4.2.20. fSET_H_WEAR 264
4.2.21. fSET_PARAMETER 265
4.2.22. fSET_PART_POS_OFFS 265

5. Function interface – external data 266


5.1. EXTCLEARERROR 266
5.1.1. External data function error list 266
5.2. EXTCLOSEDATACHANNEL 267
5.3. EXTOPENDATACHANNEL 268
5.4. EXTREADDATA 269
5.5. EXTWRITEDATA 269

6. DDE-interface 270
6.1. DDE – interface of the PLC 270

7. MMI – PLC Interface 271


7.1. MMI States to the PLC 271
7.1.1. MMI_LEVEL 271
7.1.2. MMI_LASTKEY 273
7.1.3. MMISTATION 274
7.2. PLC Messages to the MMI 274
7.2.1. PLC Message text file for the MMI 274
7.2.2. PLC Message functions 275
7.2.2.1. Function WRITE_ERROR_MESSAGE 275
7.2.2.2. Function CLEAR_ERROR_MESSAGES 275
7.3. PLC Access to CNC Error Messages 276
7.3.1. GET_CNC_ERR 277
7.4. PLC Interface Display in MMI Info 280
7.5. PLC Command to MMI Display 280
7.5.1. MMI_COMMAND 281
7.6. Miscellaneous Interface Signals 283
7.6.1. CNC Shutdown Signals 283
7.6.2. Modular IO 24V Supply Check 283
7.6.3. PLC Application Scan Time 284
7.7. PLC String Functions for Messages 284
7.7.1. LREAL_TO_STR 284
7.7.2. LREAL2STR 284
7.7.3. REAL_TO_STR 285
7.7.4. REAL2STR 285
7.8. PLC Time Functions 286
7.8.1. GET_LOCAL_TIME 286
7.8.2. GET_SYS_DATE_TIME 287
7.8.3. GET_SYSTEM_TIME 287

8. Function interface – SERCOS drives 288


8.1. GET_RING_STATE 288
8.2. READ_SERCOS_PARAMETER 289
8.3. RING_COMMAND 289
8.4. SERCOS_COMMAND 290
8.5. WRITE_SERCOS_PARAMETER 291

9. PLC Project Libraries 292

PLC Interface Manual


page 9 / 304
MACHINEMATE®

9.1. Standard.lib 292


9.2. Cnclib.lib and cncplc.lib 292
9.3. Cffplc.lib 292
9.4. Extdata.lib 293
9.5. Cncstd.lib 293
9.6. Cross reference of operators, functions, function blocks and libraries 293

Index 297

Table of Figures
Figure 1. PLC Interface Diagram ................................................................................................................. 11
Figure 2. Light, switch example in Ladder Diagram .................................................................................... 19
Figure 3. Light, switch example in Structured Text...................................................................................... 20
Figure 4. Analog voltages example in Ladder Diagram............................................................................... 21
Figure 5. Analog voltages example in Structured Text................................................................................ 22
Figure 6. Tool management flow chart ...................................................................................................... 142
Figure 7. BCD Strobe Timing Diagram ...................................................................................................... 175

PLC Interface Manual


page 10 / 304
MACHINEMATE®

1. Tables and data interface

1.1. Introduction to the PLC Interface


Windows Applications CNC Real Time Subsystem

• CNC input signals


• CNC output signals
• CNC functions, function blocks
• CNC Tables
• CNC Data
• Operator data
PLC
application /
DDE Server

MMI CNC PLC


Kernel Process
SM Process

Data in host PC

Windows NT Kernel CNC Real Time Kernel

PC Hardware CNC Axes Interface Board

Machine Machine IO SERCOS


IO Drives ring(s) &
drive(s)

Windows NT® : Microsoft® Corporation NT Operating System (or Microsoft Windows 2000 or Linux – the
same architecture applies)
SM – Shared Memory interface (shared memory communication area)

Figure 1. PLC Interface Diagram

PLC Interface Manual


page 11 / 304
MACHINEMATE®

The separate PLC Programming Manual describes the details of a PLC application that are
involved in just the standard PLC code (such as the IEC-1131 programming languages
syntax, standard data types and the standard IEC-1131 operators, functions and function
blocks) rather than issues relevant to the CNC. Please consult that manual for general
information about programming a PLC application.

This document describes the interface between a PLC application and the CNC software
(simply called the ‘PLC interface’ in this document). Much of this PLC interface is
implemented as a very simple bi-directional shared memory interface. In other words, the
CNC will only read certain items and it will only write other items. At the same time, the PLC
will only read certain items (that are write-only for the CNC) and it will only write other items
(that are read-only for the CNC). This shared memory interface allows the two partners in the
interface (i.e., the CNC and the PLC) to operate on the data at different times, supporting
asynchronous communications.

There are a number of data items available in this PLC interface. The diagram above
illustrates the following general groups of data items that exist in this interface.

• Machine IO

The PLC can read inputs from the machine (e.g., switches, voltages) and can write
outputs to the machine (e.g., lights, voltages). These machine IO points are accessed
by the PLC using programmer-defined variable names.

This part of the interface is described in section 1.5 of this document.

This is also explained in Appendix E of the PLC Programming Manual. The machine
IO programming is part of the PLC application and is not affected by the CNC
software, other than its definition of the input and output byte number assignments.
These byte number assignments are described in section 2 of the Start Up Manual.

• CNC tables

These CNC tables are the tables available to the operator via the DATA mode. They
include:
• Cycle parameters (or P-parameters, for macro and cycle programming)
• D-table (for tool radius or diameter compensation)
• H-table (for tool length compensation)
• Zero offsets table (for the G54-G59 part zero offsets)

The PLC can read and write these CNC tables, just as the operator can access them
using the CNC displays and soft keys. These tables are accessed by the PLC using
defined variable names, as system variables that must not be declared in the POU
declarations.

This part of the interface is described in chapter 1 of this document.

• CNC data

These CNC data items include a number of axis positions and other items visible on
the AUTOMATIC and INFO displays. They include:
• Axis positions (command and actual)
• Active feed rate (command and actual)
• Active part program information (program number, subprogram number and
block number)
PLC Interface Manual
page 12 / 304
MACHINEMATE®

The PLC can only read these CNC data items. These data items are accessed by the
PLC using defined variable names, as system variables that must not be declared in
the POU declarations.

This part of the interface is described in chapter 1 of this document.

• CNC input signals


These CNC data items allow the PLC to provide information and direction to the
CNC. They are available for the operator’s viewing from the INFO – Interface display.

The CNC will only read these interface signals. These signals are accessed by the
PLC using defined variable names, as system variables that must not be declared in
the POU declarations.

This part of the interface is described thoroughly in chapter 2.3 of this document.

• CNC output signals


These CNC data items provide the PLC with information regarding the CNC. They
are available for the operator’s viewing from the INFO – Interface display.

The PLC can only read these interface signals. These signals are accessed by the
PLC using defined variable names, as system variables that must not be declared in
the POU declarations.

This part of the interface is described thoroughly in chapter 2.4 of this document.

• CNC interface functions and function blocks


These interface items, implemented as functions and functions blocks within the PLC
programming environment, provide the PLC with access to additional data in the
CNC and to additional commands to the CNC. The basic architecture for the
functions is the PLC makes a request to the CNC that provides an immediate
response or reaction (e.g., the PLC can give the CNC a new S-value for the spindle).
The basic architecture for the function blocks is the PLC makes a request to the CNC
and as it might take a little time, the PLC application will wait for a response signal
(via an output of the function block) from the CNC indicating the data has been
returned successfully (e.g., the PLC can request the CNC to select an NC program
from a disk file; this action takes some time as the CNC must find the file on the disk
and then open it, so there is a DONE output on the function block to indicate to the
PLC that the CNC is done with the request).

This part of the interface is described in chapters 3 and 4 of this document.

• CNC access to data in the host PC


The PLC application is implemented as part of the PLC run-time environment. In that
context, the PLC can access the PC peripherals, like the hard disk or the COM1 port,
but only through the CNC. These interface items, implemented as functions and
functions blocks within the PLC programming environment, provide the PLC with
access to external data in the host PC. The types of external data that are supported
include the COM ports, the LPT port and a hard disk file.

This part of the interface is described in chapter 5 of this document.

PLC Interface Manual


page 13 / 304
MACHINEMATE®

• External access to data in the CNC and PLC Application


The PLC run-time environment includes a DDE Server. This DDE Server will make
available to an external DDE Client any data that the PLC application references
(including all data in the PLC project, as well as any PLC interface data items
referenced by the PLC project). This standard software protocol allows the PLC to
exchange data easily with external software programs.

This part of the interface is described in chapter 6 of this document.

• CNC operator interface data


These interface items, including both signals and defined variables as well as several
functions and functions blocks within the PLC programming environment, provide the
PLC with access to operator interface information in the CNC.

The PLC can only read these interface signals. These signals are accessed by the
PLC using defined variable names, as system variables that must not be declared in
the POU declarations.

This part of the interface is described in chapter 7 of this document.

For convenience, chapter 7 also describes the interface functions that provide the
PLC with access to the time within the host operating system. While not technically
part of the operator interface, these functions are provided in the same library as the
other functions and function blocks described in chapter 7.

• CNC access to SERCOS drives


The PLC application can access the CNC drive’s SERCOS interface but only through
the CNC. These interface items, implemented as functions and functions blocks
within the PLC programming environment, provide the PLC with access to the
SERCOS drive(s) and ring(s) connected to the CNC.

This part of the interface is described in chapter 8 of this document.

This first chapter of the document lists the CNC tables and data that are available to the PLC.
These data items are assigned ‘global’ symbol names for the PLC program to directly read or
write.

PLC variables with the RETAIN attribute (explained in the PLC


Programming Manual) that preserve their values through power cycles will
do that only in a real CNC. If the PLC application is run in the simulation
environment (e.g., on a lap top, not on a real CNC) then there is no physical
battery backed memory (without the CNC card in the system) so the
RETAIN variables do not maintain their contents through power cycles.
The CNC (both software and hardware) provides the support for that RETAIN functionality in
the MachineMate system.

PLC Interface Manual


page 14 / 304
MACHINEMATE®

1.2. Tables and data interface for Station 1


Each station in the CNC is a separate part program path. Each path is a
defined set of interpolated axes. The control can run an individual part program
(the same or different part program for each) for each station simultaneously.
The definition of each CNC station (i.e., its axes, machine parameters, etc.) is
explained in the Start Up Manual. The term CNC channel is synonymous with
CNC station.
The PLC has access to this CNC data in the first CNC station via predefined
variable names for the following items:

Type Symbol Access

P-Parameters - P001, P002, P003, ..., P200 Read, write


cycle parameters

H-corrections – H001, H002, H003, ..., H128 Read, write


length offsets
H-corrections – HW001, HW002, ..., HW128 Read, write
wear offsets
H-corrections in two H001_I and H001_J, …, Read, write
dimensions – length H064_I and H064_J; no axis letter
offsets is used, unlike H1Z from the CNC
H-corrections in two HW001_I and HW001_J, …, Read, write
dimensions – wear HW064_I and HW064_J; no axis
offsets letter is used, unlike HW1Z from
the CNC

D-corrections – D001, D002, D003, ..., D128 Read, write


diameter offsets
D-corrections – DW001, DW002, ..., DW128 Read, write
wear offsets
D-corrections – DR001, DR002, ..., DR128 Read, write
dresser wheel
orientations

G-corrections – part G54_1, G54_2, ..., G54_32, Read, write


zero offsets G55_1, …, G59_32; no axis letter
is used, unlike G54Z from the
CNC

Command position CMD_POS_1, CMD_POS_2, ..., Read


CMD_POS_32
Set position SET_POS_1, SET_POS_2, ..., Read
SET_POS_32; no axis letter is
used, unlike AVZ from the CNC
Actual position ACT_POS_1, ACT_POS_2, ..., Read
ACT_POS_32

PLC Interface Manual


page 15 / 304
MACHINEMATE®

Command feed rate FCOMM Read


Actual feed rate FREAL Read

Active NC program MAINPROGNUMBER Read


number
Active Subroutine SUBPROGNUMBER Read
program number
Active NC program BLOCKNUMBER Read
block number

All axis positions and CNC compensation table


values are provided in microns (mm * 1000,
inches * 25400, degrees * 1000) regardless of
whether G70 or G71 is active. The data type for
all items in this list is LREAL except for the
DR001-DR128 set that is BYTE (which ranges
from 0 to 9).
Note that for the Hx_I and Hx_J values in the H-table the machine parameter
HCorrAxes configures which axis is first and which is second in the table.
ACT_POS is the current axis position in machine coordinates; CMD_POS is
the commanded axis position in machine coordinates; SET_POS is the
commanded axis position in machine coordinates but also including any G92
axis offset. The difference between ACT_POS and CMD_POS will be the
current LAG. The difference between CMD_POS and SET_POS will be the
current G92 offset for that axis. The current part coordinate position of an axis
could be obtained by subtracting the current part zero offset (G-correction) for
the axis from the current axis position (SET_POS). In the case of an axis
affected by an active length compensation, the current H-correction value for
the axis would also have to be subtracted.
ACT_POS for spindles:
After the actual positions of all axes are given in ACT_POS_x, the actual
positions (0 to 360) of the spindles with feedback are given in the following
ACT_POS_x values (always after all axes). This spindle position is valid except
during an M19 orientation sequence (i.e., when finding the marker). These
spindle position values were added in CNC version 2.0 so they were not
available in earlier versions.
ACT_POS for rotary axes:
The ACT_POS value is straightforward with a linear axis. However with a rotary
axis there are variations on the numeric presentation. A rotary axis is an axis
whose position has a range of 360 degrees (it is also called a round axis).
When the axis has 3 decimal places (the default) ACT_POS will range from 0
to 359999 because its displayed position will be seen as ranging from 0.000 to
359.999. Depending on the type of axis and its motions this ACT_POS value
may be positive or negative.
There are two different contexts for the axis.
a) Rotary axis but not closed loop (this could be a spindle or an encoder like on
a turret with mechanical not servo control):
On power up ACT_POS is 0. This is a 'zero' location for the axis.

PLC Interface Manual


page 16 / 304
MACHINEMATE®

As long as the axis has been turned past this initial ‘zero’ position in the
positive direction then these rules apply:
As the encoder moves in the positive direction, ACT_POS counts up until it
reaches 359999 at which time it rolls over to 0 on the next count.
As the encoder moves in the negative direction, ACT_POS counts down until it
reaches 0 at which time it rolls over to 359999 on the next count.
However, once the axis has been turned past this initial ‘zero’ position in the
negative direction then these rules apply:
As the encoder moves in the negative direction, ACT_POS counts down until it
reaches -359999 when it will roll over to 0 on the next count.
As the encoder moves in the positive direction, ACT_POS counts up until it
reaches 0 when it will roll over to -359999 on the next count.
If the axis is turned back and forth across this initial ‘zero’ location, the
ACT_POS value will change from a small positive number to a small negative
number.
If ACT_POS is ever negative then adding 360000 to it results in the correct 0-
to-+360 range of positions.
b) Rotary axis that is closed loop (this is a servo controlled axis):
With a closed loop axis, ACT_POS behaves like described above when it is
moving in the positive direction. If the rotary axis is moved in the negative
direction past the 0 position then it will be a negative value, so moving past 0
one degree is a position of -1000 (with 3 decimal places). However, as soon as
the jogging or moving completes then the CNC automatically corrects the
ACT_POS position back to the 0-to-+360 range, so the -1000 value is
automatically changed to +359000. This automatic conversion of ACT_POS
values does not occur with an open loop axis.

The dresser wheel orientation values in the D-table were added in CNC version
2.0 so they did not exist in earlier versions.
The two feed rate values (FCOMM, FREAL) are the effective feed rates in a
G94 context (inches/min or mm/min in the CNC, but with no decimal point here,
so 100 ipm would be 100000 with 3 decimal places). If the CNC is actually in
G95 mode then the current spindle speed (rpm) has been multiplied by the G95
feed rate (inches/rev or mm/rev) to obtain the effective G94 feed rate provided
in these values. This matches the displayed values in the CNC feed rate box
which always shows the effective feed rates in a G94 context.
The BLOCKNUMBER value is not valid when a part program is not valid. Since
this variable has a value of approximately +1.2e308 when not valid, the PLC
should check for this variable’s value to be less than 999999 (or the
appropriate range given the maximum number of digits for the letter N) before
using it for any further processing (e.g., as an integer).

PLC Interface Manual


page 17 / 304
MACHINEMATE®

1.3. Tables and data interface for Station 2


The PLC has access to this CNC data via predefined variable names for the
following items for CNC station 2:

Type Symbol Access

Command position c2CMD_POS_1, c2CMD_POS_2, Read


..., c2CMD_POS_32
Machine position c2SET_POS_1, c2SET_POS_2, Read
..., c2SET_POS_32
Actual position c2ACT_POS_1, c2ACT_POS_2, Read
..., c2ACT_POS_32

Command feed rate c2FCOMM Read


Actual feed rate c2FREAL Read

Active NC program c2MAINPROGNUMBER Read


number
Active Subroutine c2SUBPROGNUMBER Read
program number
Active NC program c2BLOCKNUMBER Read
block number

Some of the CNC data items are defined with variable names only for station 1
(including the cycle parameters and the compensation data tables). These data
items do not have variable names within the other stations. The PLC can
access these CNC data items for other stations using the functions described
in chapter 4.2.

The standard CNC control comes with the


configuration for only one CNC station. The
capability of more than one CNC station is a
control option, with the maximum ranging from
1 to 8, depending on the control model.

1.4. Tables and data interface for Stations 3 to 8


The same variable names as above are used for the CNC stations 3 to 8 except that the
variable names for CNC station 3 will begin with “c3” rather than “c2”, station 4 names will
begin with “c4”, and so on.

PLC Interface Manual


page 18 / 304
MACHINEMATE®

1.5. Electrical data – switches, lights, voltages


The electrical data in a machine or control, such as input switches, output
lights, input voltages or output voltages, do not have assigned variable names
for the PLC. The PLC application assigns names to these input and output
signals. The PLC Programming Manual describes the syntax for a PLC
application written in each of the IEC1131 programming languages, including
the declaration of variable names at an input and output address.

Note that typically all the IO point variables names will be placed in the
Global_Variables segment rather than in any of the PLC POU declarations so
that the CNC Information display shows just the variable name with its IO point
actual state. If an IO point variable is declared within a POU’s variable
declarations then the POU name will be included in the variable name in the
CNC Information display.

Below is a simple example of a PLC application, in Ladder Diagram format,


with a single input switch (located at input byte 1, bit 1) and a single output light
(located at output byte 101, bit 1). This example illustrates the basic syntax for
such Boolean signals.

Figure 2. Light, switch example in Ladder Diagram

PLC Interface Manual


page 19 / 304
MACHINEMATE®

Below is a simple example of a PLC application, in Structured Text format, with


a single input switch (located at input byte 1, bit 1) and a single output light
(located at output byte 101, bit 1). This example illustrates the basic syntax for
such Boolean signals.

Figure 3. Light, switch example in Structured Text

Note that there is nothing in the PLC use of input and output points that define
the IO technology. The PLC declaration of variables for inputs and outputs
works with byte numbers. The IO configuration file (defined in the Start Up
Manual) allows the programmer to define the byte number assignments to the
hardware for the respective IO technologies (such as the Modular IO or one of
the field buses) and there can be no duplicate byte numbers (so a byte number
cannot be both an input byte and an output byte nor could a byte number be
used in a Modular IO device and in a fieldbus device). The CNC takes care of
handling the respective IO technologies. The PLC program just has input bytes
and output bytes. There is nothing required in PLC programming to define an
IO technology associated with an input or output byte. In the above example,
the byte 1 for the input switch could be on a Modular IO 2416 module or it
could be on a fieldbus module; its byte number definition is in the IO
configuration file. The PLC program never defines the IO technology that
services the input and output bytes.

PLC Interface Manual


page 20 / 304
MACHINEMATE®

Below is a simple example of a PLC application, in Ladder Diagram format,


with a single input voltage (located at input byte 10, two bytes represented by
an integer) and a single output voltage (located by output byte 110, two bytes
represented by an integer). The analog voltages in the CNC have a range of
+/- 10VDC. This example illustrates the basic syntax for such Integer signals
including their scaling.

Figure 4. Analog voltages example in Ladder Diagram

PLC Interface Manual


page 21 / 304
MACHINEMATE®

Below is a simple example of a PLC application, in Structured Text format, with


a single input voltage (located at input byte 10, with two bytes represented by
an integer) and a single output voltage (located by output byte 110, with two
bytes represented by an integer). The analog voltages in the CNC have a
range of +/- 10VDC. This example illustrates the basic syntax for such Integer
signals including their scaling.

Figure 5. Analog voltages example in Structured Text

Note that each A/D input or each D/A output requires two consecutive bytes. If
the control in the example above had a second pair of A/D and D/A channels in
use after the first pair (i.e., at byte numbers 10 and 110) the second pair would
be at %IB12 and %QB112 respectively, assuming all were on the same
hardware module.

PLC Interface Manual


page 22 / 304
MACHINEMATE®

2. Signal interface

2.1. General

2.1.1. Introduction

In a machine tool, the PLC is usually the "boss" of the equipment since it is
responsible for the adjustment of the machine logic to the CNC and for the
observance of certain functional and operational sequences.

For this purpose, the PLC uses interfaces to the machine and to the CNC. Via
these interfaces it can recognize the current state of the machine and can
initiate the necessary action in the CNC and vice versa.

These machine interfaces are realized usually via I/O modules over which the
digital signals or analog signals can be transferred.

On the CNC control, the PLC is already built-in to the controller so no additional
I/O boards are necessary for the PLC to communicate with the CNC. For this
communication an internal interface is provided, called the signal-interface.

The PLC Program (or Project) is made up of one or more Program


Organization Units (POUs). The POU’s in the PLC program “communicate”
with the operating system of the CNC via this internal interface. This signal-
interface includes many predefined system variable names that are not
declared in the PLC application; the PLC programming tool resolves all these
system variable names during the project’s compilation. The CNC operating
system (sometimes called the CNC kernel) ensures that information about
current CNC states is provided and that action initiated by the PLC is executed.

The PLC application is run by the CNC in a manner similar to other PLC
products. At the start of the PLC ‘scan’ (or the execution of the PLC
application), all inputs are captured (as well as any forced values). At the end
of the PLC scan, all outputs are updated. Therefore a physical input that
changes its state during the few milliseconds of the PLC scan will not be
detected until the next PLC scan. Any changes in the state of a physical output
by the PLC application will not occur until the end of the PLC scan (so the
placement of output statements within the PLC source code will not affect the
actual timing of any output state changes).

PLC Interface Manual


page 23 / 304
MACHINEMATE®

2.1.2. Signal-interface
This interface is a parallel, digital interface. Single-state signals (or “bits”) are
transferred with a direct state or function assignment. These single-state
signals ("bits") are put together in groups of 32 to form "DWORDS" and can be
addressed by the PLC Program individually (as bits) or as a group (as a
DWORD).
Typical applications are:

- Start and stop of a NC program processing

- Closing and opening of the CNC control loops

- Recognizing of the auxiliary functions ("BCD's") programmed in


the NC Program.

These interface is shortly described in the following chapters. The remainder of


this chapter 2 is dedicated to the signal-interface. For a short summary see
chapter 2.2 "signal-interface summary". For a detailed description of the inputs
see chapter 2.3 "signal-interface, CNC-inputs". For the outputs see chapter 2.4
"signal-interface, CNC-outputs”.

The signal-interface is made up of two parts:

- the CNC inputs, which the PLC Program POUs can only write
and the CNC can only read;

- the CNC outputs, which the PLC Program POUs can only read
and the CNC can only write.

Some of the signals can be treated in isolation, others are positioned in


connection with other signals (as a group), while others can only be treated
jointly. These are dealt with separately in the individual descriptions.

Some of the signals work statically, others dynamically. In other words, there
are signals at which the respective current value is important, and there are
signals at which mainly the change of their value is important. In the following
descriptions for the signal-interface, for all relevant signals their effects (at CNC
inputs) or their causes (at CNC outputs) at

- the value 0
- the value 1
- the value change of 0 on 1
- the value change of 1 on 0
are given.
In addition, notes and instructions are given which must be observed for the
correct treatment of the signal-interface.

PLC Interface Manual


page 24 / 304
MACHINEMATE®

2.1.3. Interface typography


Some of the signals described in these instructions are inverted, so-called
"low-active" signals (or negative logic). These are marked by a "n" at the end of
the signal name. Such signals have the meaning "active" (or “true”) if their
value is 0 ("low"). Non inverted signals, so-called "high-active" signals, have
the meaning "active" (or “true”) if their value is 1 (" high").
Examples:

INEMERGENCn 0 EMERGENCY STOP state is active


1 EMERGENCY STOP state is not active
ON_RESET 0 CONTROL RESET is not active
1 CONTROL RESET is active

2.1.4. Interface terminology


Within the individual signal-descriptions, the term "CONTROL RESET" is used
repeatedly.
The CONTROL RESET state of the control occurs after any of:

1 after turning on the control

2 after loading the machine parameters into the CNC

3 after processing the M30 or M02 block in a main program

4a after pressing: AUTOmatic, then F3: Program process 2 and then


F6: initial state
4b after pressing: CTRL-R key combination on the keyboard with the
HMI running (or CTRL-C with the MMI on NT)
4c after pressing: CTRL-RESET key combination on the operator
front panel
4d after PLC: often as a result of an operator panel input switch
for a control reset, IN_EXTMODE:=6
In the CONTROL RESET of the control the preset G-codes are active. These
preset G-codes can be determined by the Machine Parameter GCodeAppl
located in the InitialState group.
The active G-codes can be read in the operating mode "INFOrmation" in the G-
code window.
If the CONTROL RESET is selected as described in state 4 above, the
program processing as well as the axis travel movements are cancelled.
The CONTROL RESET can be produced by the PLC Program via the external
CNC-operating mode (see chapter 2.4.8.1 “dword 9“).
Further information on the "CONTROL RESET" can be found in the signal-
description CONTROL RESET (see chapter 2.4.1.11 “dword 1“).

PLC Interface Manual


page 25 / 304
MACHINEMATE®

2.2. Signal-interface summary


All the signals and all the DWORDs, which contain these signals, have
predefined variable names. The term ‘predefined variable name’ means that
the PLC Program POUs can access any of these data items directly, without
any additional effort on the part of the PLC programmer (such as adding them
to the PLC project’s variable declarations).

The variable names for the CNC input signals and their corresponding
DWORDs of the first CNC station begin with
IN ( Input to the CNC).

The variable names for the other CNC stations begin with
I2 , I3 , ... I8.
Just as there is a signal named IN_START for the first station, there is a signal
named I2_START for the second station. This manual will describe all the
signals for the interface to the first station. All those explanations apply to the
similarly named interface signal for the other stations.

The variable names for the CNC output signals and their corresponding
DWORDs of the first CNC station begin with
ON ( Output from the CNC).

The variable names for the other CNC stations begin with
O2 , O3 , ... O8.
Just as there is a signal named ON_EMERG for the first station, there is a
signal named O2_EMERG for the second station. This manual will describe all
the signals for the interface to the first station. All those explanations apply to
the similarly named interface signal for the other stations.

Note that while the CNC interface signals are associated with each station the
physical IO points or IO byte assignments (like for analog voltages) are never
associated with a particular CNC station. The PLC logic defines any behaviors
associated with the IO points.

The interface has a fixed layout (i.e., no machine parameters or integrator effort
are required for its definition) so the interface has 128 DWORDS to make all
the features inside the CNC available at the same time. One DWORD contains
32 bits so it can contain up to 32 signals.
The PLC-CNC interface is defined for up to 32 axes on one CNC-station.

The rest of this chapter 2.2 lists the defined signal names for the defined
DWORD names in the interface for the first CNC station. The ‘free’ designation
indicates the particular signal or DWORD is not used at this time.

PLC Interface Manual


page 26 / 304
MACHINEMATE®

2.2.1. DWORD 1 (INGENERAL1, ONGENERAL1)

DW 1 INGENERAL1 ONGENERAL1
Bit NC – Input NC-Output

1 INEMERGENCn ON_CYCLEON
2 IN_START ON_STOPNCn
3 IN_STOPn ON_STARTNC
4 IN_TRANSF ON_AUTO
5 IN_ENABLE ON_SINGLE
6 IN_NO_HDW_RESET ON_MDI
7 Free ON_JOGMODE
8 INPLAYBACK ON_HOMING
9 IN_AFC_EN ON_INC_JOG
10 Free ON_CONT_JOG
11 Free ON_CNC_CHAN_ACT
12 Free ON_EMERG
13 Free ON_PRG_STP
14 Free ON_PRG_END
15 Free ON_RESET
16 Free ON_NO_CNTR
17 Free ON_HOME_OK
18 Free ON_NCERROR
19 Free ON_ADDKEY1
20 IN_BLOCK_DEL ON_ADDKEY2
21 IN_BLOCK_DELn ON_PROGRAM
22 IN_G01_OVER ON_ADMISSN
23 IN_G01_OVERn ON_PANEL
24 IN_FORWARD ON_RETREAT
25 IN_BACKWARD ON_BACKW
26 IN_M1STOP ON_TEACHED
27 IN_M1STOPn ON_BLKCHNG
28 IN_WITH_MOVE ON_M1STOP
29 IN_WITH_MOVEn ON_WITH_MOVE
30 IN_PITCHERR ON_G01_OVER
31 IN_PITCHERRn ON_BLOCK_DEL
32 IN_IGNRMSERR ON_PITCHERR

PLC Interface Manual


page 27 / 304
MACHINEMATE®

2.2.2. DWORD 2 (INGENERAL2, ONGENERAL2)

DW 2 INGENERAL2 ONGENERAL2
Bit NC – Input NC-Output

1 IN_REPEAT ON_STAND
2 IN_INTERVA ON_RAPID
3 IN_INSPECT ON_THREAD
4 IN_BCDSTRB2_FWD ON_HOMEOK
5 IN_BCDSTRB2_BW ON_INTVEND
6 Free ON_INTRET
7 Free ON_INTVHLD
8 Free ON_EGB_ACTIVE
9 IN_MIRR_STROBE ON_EGB_SYNC
10 IN_PLC_NO_RETREAT ON_READ_TO_BLK
11 Free ON_HDW_TICKS_LOST1
12 Free ON_HDW_TICKS_LOST2
13 Free ON_HDW_TICKS_LOST3
14 Free ON_TRANSF
15 Free ON_CYCLE_STOP
16 Free Free
17 IN_DIS_ENABLE ON_AUTOFOCUS
18 Free ON_DIST_CTRL
19 Free Free
20 Free Free
-- Free Free
28 Free Free
29 Free ON_STROBE1
30 Free ON_STROBE2
31 Free ON_STROBE3
32 Free ON_STROBE4

PLC Interface Manual


page 28 / 304
MACHINEMATE®

2.2.3. DWORD 3 (IN_DRIVEON, ONBCDWORD1)

DW 3 IN_DRIVEON ONBCDWORD1
Bit NC – Input NC-Output

1 IN_DRON01 ON_BCD01
2 IN_DRON02 ON_BCD02
3 IN_DRON03 ON_BCD03
4 IN_DRON04 ON_BCD04
5 IN_DRON05 ON_BCD05
6 IN_DRON06 ON_BCD06
7 IN_DRON07 ON_BCD07
8 IN_DRON08 ON_BCD08
9 IN_DRON09 ON_BCD09
--
32 IN_DRON32 ON_BCD32

2.2.4. DWORD 4 (IN_DRIVEEN, ONBCDWORD2)

DW 4 IN_DRIVEEN ONBCDWORD2
Bit NC – Input NC-Output

1 IN_DREN01 ON_BCD33
2 IN_DREN02 ON_BCD34
3 IN_DREN03 ON_BCD35
4 IN_DREN04 ON_BCD36
5 IN_DREN05 ON_BCD37
6 IN_DREN06 ON_BCD38
7 IN_DREN07 ON_BCD39
8 IN_DREN08 ON_BCD40
9 IN_DREN09 ON_BCD41
--
32 IN_DREN32 ON_BCD64

PLC Interface Manual


page 29 / 304
MACHINEMATE®

2.2.5. DWORD 5 (IN_HOMING, ONINPOS)

DW 5 IN_HOMING ONINPOS
Bit NC – Input NC-Output

1 IN_HOME01n ON_INP01
2 IN_HOME02n ON_INP02
3 IN_HOME03n ON_INP03
4 IN_HOME04n ON_INP04
5 IN_HOME05n ON_INP05
6 IN_HOME06n ON_INP06
7 IN_HOME07n ON_INP07
8 IN_HOME08n ON_INP08
9 IN_HOME09n ON_INP09
--
32 IN_HOME32n ON_INP32

2.2.6. DWORD 6 (IN_SWLIMIT, ONHOMINGOK)

DW 6 IN_SWLIMIT ONHOMINGOK
Bit NC – Input NC-Output

1 IN_LIMIT01 ON_HOME01
2 IN_LIMIT02 ON_HOME02
3 IN_LIMIT03 ON_HOME03
4 IN_LIMIT04 ON_HOME04
5 IN_LIMIT05 ON_HOME05
6 IN_LIMIT06 ON_HOME06
7 IN_LIMIT07 ON_HOME07
8 IN_LIMIT08 ON_HOME08
9 IN_LIMIT09 ON_HOME09
--
32 IN_LIMIT32 ON_HOME32

PLC Interface Manual


page 30 / 304
MACHINEMATE®

2.2.7. DWORD 7 (IN_STRTPOS, ONPOSAXES)

DW 7 IN_STRTPOS ONPOSAXES
Bit NC – Input NC-Output

1 IN_POS_01 ON_POS_01
2 IN_POS_02 ON_POS_02
3 IN_POS_03 ON_POS_03
4 IN_POS_04 ON_POS_04
5 IN_POS_05 ON_POS_05
6 IN_POS_06 ON_POS_06
7 IN_POS_07 ON_POS_07
8 IN_POS_08 ON_POS_08
9 IN_POS_09 ON_POS_09
--
32 IN_POS_32 ON_POS_32

2.2.8. DWORD 8 (IN_CYCLEB, ONCYCBYTE)

DW 8 IN_CYCLEB ONCYCBYTE
Bit NC – Input NC-Output

1 IN_CYCB_01 ON_CYCB01
2 IN_CYCB_02 ON_CYCB02
3 IN_CYCB_03 ON_CYCB03
4 IN_CYCB_04 ON_CYCB04
5 IN_CYCB_05 ON_CYCB05
6 IN_CYCB_06 ON_CYCB06
7 IN_CYCB_07 ON_CYCB07
8 IN_CYCB_08 ON_CYCB08
9 Free Free
-- Free Free
32 Free Free

PLC Interface Manual


page 31 / 304
MACHINEMATE®

2.2.9. DWORD 9 (IN_EXTMODE, ONEXTMODE)

DW 9 IN_EXTMODE ONEXTMODE
Bit NC – Input NC-Output

1 IN_EXT_01 ON_EXT_01
2 IN_EXT_02 ON_EXT_02
3 IN_EXT_03 ON_EXT_03
4 IN_EXT_04 ON_EXT_04
5 IN_EXT_05 ON_EXT_05
6 IN_EXT_06 ON_EXT_06
7 IN_EXT_07 ON_EXT_07
8 IN_EXT_08 ON_EXT_08
9 IN_EXT_09 ON_EXT_09
--
32 IN_EXT_32 ON_EXT_32

2.2.10. DWORD 10 (IN_DISABLE, ONREADY)

DW 10 IN_DISABLE ONREADY
Bit NC – Input NC-Output

1 IN_DIS_01 ON_READY01
2 IN_DIS_02 ON_READY02
3 IN_DIS_03 ON_READY03
4 IN_DIS_04 ON_READY04
5 IN_DIS_05 ON_READY05
6 IN_DIS_06 ON_READY06
7 IN_DIS_07 ON_READY07
8 IN_DIS_08 ON_READY08
9 IN_DIS_09 ON_READY09
--
32 IN_DIS_32 ON_READY32

PLC Interface Manual


page 32 / 304
MACHINEMATE®

2.2.11. DWORD 11 (IN_SW_AXES, ON_PLCMDONE)

DW 11 IN_SW_AXES ON_PLCMDONE
Bit NC – Input NC-Output

1 IN_SWAX01 ON_PLCMDONE01
2 IN_SWAX02 ON_PLCMDONE02
3 IN_SWAX03 ON_PLCMDONE03
4 IN_SWAX04 ON_PLCMDONE04
5 IN_SWAX05 ON_PLCMDONE05
6 IN_SWAX06 ON_PLCMDONE06
7 IN_SWAX07 ON_PLCMDONE07
8 IN_SWAX08 ON_PLCMDONE08
9 IN_SWAX09 ON_PLCMDONE09
10 IN_SWAX10 ON_PLCMDONE10
11 IN_SWAX11 ON_PLCMDONE11
12 IN_SWAX12 ON_PLCMDONE12
13 IN_SWAX13 ON_PLCMDONE13
14 IN_SWAX14 ON_PLCMDONE14
15 IN_SWAX15 ON_PLCMDONE15
16 IN_SWAX16 ON_PLCMDONE16
17 IN_GEAR01 ON_PLCMDONE17
18 IN_GEAR02 ON_PLCMDONE18
19 IN_GEAR03 ON_PLCMDONE19
20 IN_GEAR04 ON_PLCMDONE20
21 IN_GEAR05 ON_PLCMDONE21
22 IN_GEAR06 ON_PLCMDONE22
23 free ON_PLCMDONE23
24 free ON_PLCMDONE24
25 free ON_PLCMDONE25
26 free ON_PLCMDONE26
27 free ON_PLCMDONE27
28 free ON_PLCMDONE28
29 free ON_PLCMDONE29
30 free ON_PLCMDONE30
31 free ON_PLCMDONE31
32 free ON_PLCMDONE32

PLC Interface Manual


page 33 / 304
MACHINEMATE®

2.2.12. DWORD 12 (IN_SPINDLE, ONSPINDLE)

DW 12 IN_SPINDLE ONSPINDLE
Bit NC – Input NC-Output

1 IN_NULLV01 ON_STAND01
2 IN_NULLV02 ON_STAND02
3 IN_NULLV03 ON_STAND03
4 IN_NULLV04 ON_STAND04
5 IN_NULLV05 ON_STAND05
6 IN_NULLV06 ON_STAND06
7 IN_NULLV07 ON_STAND07
8 IN_NULLV08 ON_STAND08
9 IN_NULLV09 ON_STAND09
10 IN_NULLV10 ON_STAND10
11 IN_NULLV11 ON_STAND11
12 IN_NULLV12 ON_STAND12
13 IN_NULLV13 ON_STAND13
14 IN_NULLV14 ON_STAND14
15 IN_NULLV15 ON_STAND15
16 IN_NULLV16 ON_STAND16
17 IN_REV_01 ON_MOVE01
18 IN_REV_02 ON_MOVE02
19 IN_REV_03 ON_MOVE03
20 IN_REV_04 ON_MOVE04
21 IN_REV_05 ON_MOVE05
22 IN_REV_06 ON_MOVE06
23 IN_REV_07 ON_MOVE07
24 IN_REV_08 ON_MOVE08
25 IN_REV_09 ON_MOVE09
26 IN_REV_10 ON_MOVE10
27 IN_REV_11 ON_MOVE11
28 IN_REV_12 ON_MOVE12
29 IN_REV_13 ON_MOVE13
30 IN_REV_14 ON_MOVE14
31 IN_REV_15 ON_MOVE15
32 IN_REV_16 ON_MOVE16

PLC Interface Manual


page 34 / 304
MACHINEMATE®

2.2.13. DWORD 13 (IN_PARKING, ONCONTROL)

DW 13 IN_PARKING ONCONTROL
Bit NC – Input NC-Output

1 IN_PARK01 ON_CONTR01
2 IN_PARK02 ON_CONTR02
3 IN_PARK03 ON_CONTR03
4 IN_PARK04 ON_CONTR04
5 IN_PARK05 ON_CONTR05
6 IN_PARK06 ON_CONTR06
7 IN_PARK07 ON_CONTR07
8 IN_PARK08 ON_CONTR08
9 IN_PARK09 ON_CONTR09
--
32 IN_PARK32 ON_CONTR32

2.2.14. DWORD 14 (IN_MIRROR, ONMIRROR)

DW 14 IN_MIRROR ONMIRROR
Bit NC – Input NC-Output

1 IN_MIRR01 ON_MIRR01
2 IN_MIRR02 ON_MIRR02
3 IN_MIRR03 ON_MIRR03
4 IN_MIRR04 ON_MIRR04
5 IN_MIRR05 ON_MIRR05
6 IN_MIRR06 ON_MIRR06
7 IN_MIRR07 ON_MIRR07
8 IN_MIRR08 ON_MIRR08
9 IN_MIRR09 ON_MIRR09
--
32 IN_MIRR32 ON_MIRR32

PLC Interface Manual


page 35 / 304
MACHINEMATE®

2.2.15. DWORD 15 (IN_OVERRIDE, ONCMND_P)

DW 15 IN_OVERRIDE ONCMND_P
Bit NC – Input NC-Output

1 IN_OVERR01 ON_CMNDP01
2 IN_OVERR02 ON_CMNDP02
3 IN_OVERR03 ON_CMNDP03
4 IN_OVERR04 ON_CMNDP04
5 IN_OVERR05 ON_CMNDP05
6 IN_OVERR06 ON_CMNDP06
7 IN_OVERR07 ON_CMNDP07
8 IN_OVERR08 ON_CMNDP08
9 IN_OVERR09 ON_CMNDP09
--
32 IN_OVERR32 ON_CMNDP32

2.2.16. DWORD 16 (IN_IPOMVMT, ONCMND_M)

DW 16 IN_IPOMVMT ONCMND_M
Bit NC – Input NC-Output

1 IN_IPOMT01 ON_CMNDM01
2 IN_IPOMT02 ON_CMNDM02
3 IN_IPOMT03 ON_CMNDM03
4 IN_IPOMT04 ON_CMNDM04
5 IN_IPOMT05 ON_CMNDM05
6 IN_IPOMT06 ON_CMNDM06
7 IN_IPOMT07 ON_CMNDM07
8 IN_IPOMT08 ON_CMNDM08
9 IN_IPOMT09 ON_CMNDM09
--
32 IN_IPOMT32 ON_CMNDM32

PLC Interface Manual


page 36 / 304
MACHINEMATE®

2.2.17. DWORD 17 (IN_HDWHEEL, ONHANDWH)

DW 17 IN_HDWHEEL ONHANDWH
Bit NC – Input NC-Output

1 IN_HDAX01 ON_HANDW01
2 IN_HDAX02 ON_HANDW02
3 IN_HDAX03 ON_HANDW03
4 IN_HDAX04 ON_HANDW04
5 IN_HDAX05 ON_HANDW05
6 IN_HDAX06 ON_HANDW06
7 IN_HDAX07 ON_HANDW07
8 IN_HDAX08 ON_HANDW08
9 IN_HDAX09 ON_HANDW09
10 IN_HDAX10 ON_HANDW10
11 IN_HDAX11 ON_HANDW11
12 IN_HDAX12 ON_HANDW12
13 IN_HDAX13 ON_HANDW13
14 IN_HDAX14 ON_HANDW14
15 IN_HDAX15 ON_HANDW15
16 IN_HDAX16 ON_HANDW16
17 IN_HDAX17 ON_HANDW17
18 IN_HDAX18 ON_HANDW18
19 IN_HDAX19 ON_HANDW19
20 IN_HDAX20 ON_HANDW20
21 IN_HDAX21 ON_HANDW21
22 IN_HDAX22 ON_HANDW22
23 IN_HDAX23 ON_HANDW23
24 IN_HDAX24 ON_HANDW24
25 IN_HDAX25 ON_HANDW25
26 IN_HDAX26 ON_HANDW26
27 IN_HDAX27 ON_HANDW27
28 IN_HDAX28 ON_HANDW28
29 IN_HDAX29 ON_HANDW29
30 IN_HDW1_DISABLE ON_HANDW30
31 IN_HDW2_DISABLE ON_HANDW31
32 IN_HDW3_DISABLE ON_HANDW32

PLC Interface Manual


page 37 / 304
MACHINEMATE®

2.2.18. DWORD 18 (IN_FASTIO, ON_CAM1_4)

DW 18 IN_FASTIO ON_CAM1_4
Bit NC – Input NC-Output

1 INFSIGNAL01 ON_CAM1_01
2 INFSIGNAL02 ON_CAM2_01
3 INFSIGNAL03 ON_CAM3_01
4 INFSIGNAL04 ON_CAM4_01
5 INFSIGNAL05 ON_CAM5_01
6 INFSIGNAL06 ON_CAM6_01
7 INFSIGNAL07 ON_CAM7_01
8 INFSIGNAL08 ON_CAM8_01
9 INFSIGNAL09 ON_CAM1_02
10 INFSIGNAL10 ON_CAM2_02
11 INFSIGNAL11 ON_CAM3_02
12 INFSIGNAL12 ON_CAM4_02
13 INFSIGNAL13 ON_CAM5_02
14 INFSIGNAL14 ON_CAM6_02
15 INFSIGNAL15 ON_CAM7_02
16 INFSIGNAL16 ON_CAM8_02
17 INFMASK01 ON_CAM1_03
18 INFMASK02 ON_CAM2_03
19 INFMASK03 ON_CAM3_03
20 INFMASK04 ON_CAM4_03
21 INFMASK05 ON_CAM5_03
22 INFMASK06 ON_CAM6_03
23 INFMASK07 ON_CAM7_03
24 INFMASK08 ON_CAM8_03
25 INFMASK09 ON_CAM1_04
26 INFMASK10 ON_CAM2_04
27 INFMASK11 ON_CAM3_04
28 INFMASK12 ON_CAM4_04
29 INFMASK13 ON_CAM5_04
30 INFMASK14 ON_CAM6_04
31 INFMASK15 ON_CAM7_04
32 INFMASK16 ON_CAM8_04

PLC Interface Manual


page 38 / 304
MACHINEMATE®

2.2.19. DWORD 19 (IN_FASTSELECT, ON_CAM5_8)

DW 19 IN_FASTSELECT ON_CAM5_8
Bit NC – Input NC-Output

1 INFSELECT01 ON_CAM1_05
2 INFSELECT02 ON_CAM2_05
3 INFSELECT03 ON_CAM3_05
4 INFSELECT04 ON_CAM4_05
5 INFSELECT05 ON_CAM5_05
6 INFSELECT06 ON_CAM6_05
7 INFSELECT07 ON_CAM7_05
8 INFSELECT08 ON_CAM8_05
9 INFSELECT09 ON_CAM1_06
10 INFSELECT10 ON_CAM2_06
11 INFSELECT11 ON_CAM3_06
12 INFSELECT12 ON_CAM4_06
13 INFSELECT13 ON_CAM5_06
14 INFSELECT14 ON_CAM6_06
15 INFSELECT15 ON_CAM7_06
16 INFSELECT16 ON_CAM8_06
17 free ON_CAM1_07
18 free ON_CAM2_07
19 free ON_CAM3_07
20 free ON_CAM4_07
21 free ON_CAM5_07
22 free ON_CAM6_07
23 free ON_CAM7_07
24 free ON_CAM8_07
25 free ON_CAM1_08
26 free ON_CAM2_08
27 free ON_CAM3_08
28 free ON_CAM4_08
29 free ON_CAM5_08
30 free ON_CAM6_08
31 free ON_CAM7_08
32 free ON_CAM8_08

PLC Interface Manual


page 39 / 304
MACHINEMATE®

2.2.20. DWORD 20 (IN_JPLS, ON_CAM9_12)

DW 20 IN_JPLS ON_CAM9_12
Bit NC – Input NC-Output

1 IN_JPLS_01 ON_CAM1_09
2 IN_JPLS_02 ON_CAM2_09
3 IN_JPLS_03 ON_CAM3_09
4 IN_JPLS_04 ON_CAM4_09
5 IN_JPLS_05 ON_CAM5_09
6 IN_JPLS_06 ON_CAM6_09
7 IN_JPLS_07 ON_CAM7_09
8 IN_JPLS_08 ON_CAM8_09
9 IN_JPLS_09 ON_CAM1_10
10 IN_JPLS_10 ON_CAM2_10
11 IN_JPLS_11 ON_CAM3_10
12 IN_JPLS_12 ON_CAM4_10
13 IN_JPLS_13 ON_CAM5_10
14 IN_JPLS_14 ON_CAM6_10
15 IN_JPLS_15 ON_CAM7_10
16 IN_JPLS_16 ON_CAM8_10
17 IN_JPLS_17 ON_CAM1_11
18 IN_JPLS_18 ON_CAM2_11
19 IN_JPLS_19 ON_CAM3_11
20 IN_JPLS_20 ON_CAM4_11
21 IN_JPLS_21 ON_CAM5_11
22 IN_JPLS_22 ON_CAM6_11
23 IN_JPLS_23 ON_CAM7_11
24 IN_JPLS_24 ON_CAM8_11
25 IN_JPLS_25 ON_CAM1_12
26 IN_JPLS_26 ON_CAM2_12
27 IN_JPLS_27 ON_CAM3_12
28 IN_JPLS_28 ON_CAM4_12
29 IN_JPLS_29 ON_CAM5_12
30 IN_JPLS_30 ON_CAM6_12
31 IN_JPLS_31 ON_CAM7_12
32 IN_JPLS_32 ON_CAM8_12

PLC Interface Manual


page 40 / 304
MACHINEMATE®

2.2.21. DWORD 21 (IN_JMNS, ON_CAM13_16)

DW 21 IN_JMNS ON_CAM13_16
Bit NC – Input NC-Output

1 IN_JMNS_01 ON_CAM1_13
2 IN_JMNS_02 ON_CAM2_13
3 IN_JMNS_03 ON_CAM3_13
4 IN_JMNS_04 ON_CAM4_13
5 IN_JMNS_05 ON_CAM5_13
6 IN_JMNS_06 ON_CAM6_13
7 IN_JMNS_07 ON_CAM7_13
8 IN_JMNS_08 ON_CAM8_13
9 IN_JMNS_09 ON_CAM1_14
10 IN_JMNS_10 ON_CAM2_14
11 IN_JMNS_11 ON_CAM3_14
12 IN_JMNS_12 ON_CAM4_14
13 IN_JMNS_13 ON_CAM5_14
14 IN_JMNS_14 ON_CAM6_14
15 IN_JMNS_15 ON_CAM7_14
16 IN_JMNS_16 ON_CAM8_14
17 IN_JMNS_17 ON_CAM1_15
18 IN_JMNS_18 ON_CAM2_15
19 IN_JMNS_19 ON_CAM3_15
20 IN_JMNS_20 ON_CAM4_15
21 IN_JMNS_21 ON_CAM5_15
22 IN_JMNS_22 ON_CAM6_15
23 IN_JMNS_23 ON_CAM7_15
24 IN_JMNS_24 ON_CAM8_15
25 IN_JMNS_25 ON_CAM1_16
26 IN_JMNS_26 ON_CAM2_16
27 IN_JMNS_27 ON_CAM3_16
28 IN_JMNS_28 ON_CAM4_16
29 IN_JMNS_29 ON_CAM5_16
30 IN_JMNS_30 ON_CAM6_16
31 IN_JMNS_31 ON_CAM7_16
32 IN_JMNS_32 ON_CAM8_16

PLC Interface Manual


page 41 / 304
MACHINEMATE®

2.2.22. DWORD 22 (free, ON_CAM17_20)

DW 22 free ON_CAM17_20
Bit NC – Input NC-Output

1 free ON_CAM1_17
2 free ON_CAM2_17
3 free ON_CAM3_17
4 free ON_CAM4_17
5 free ON_CAM5_17
6 free ON_CAM6_17
7 free ON_CAM7_17
8 free ON_CAM8_17
9 free ON_CAM1_18
10 free ON_CAM2_18
11 free ON_CAM3_18
12 free ON_CAM4_18
13 free ON_CAM5_18
14 free ON_CAM6_18
15 free ON_CAM7_18
16 free ON_CAM8_18
17 free ON_CAM1_19
18 free ON_CAM2_19
19 free ON_CAM3_19
20 free ON_CAM4_19
21 free ON_CAM5_19
22 free ON_CAM6_19
23 free ON_CAM7_19
24 free ON_CAM8_19
25 free ON_CAM1_20
26 free ON_CAM2_20
27 free ON_CAM3_20
28 free ON_CAM4_20
29 free ON_CAM5_20
30 free ON_CAM6_20
31 free ON_CAM7_20
32 free ON_CAM8_20

PLC Interface Manual


page 42 / 304
MACHINEMATE®

2.2.23. DWORD 23 (free, ON_CAM21_24)

DW 23 free ON_CAM21_24
Bit NC – Input NC-Output

1 free ON_CAM1_21
2 free ON_CAM2_21
3 free ON_CAM3_21
4 free ON_CAM4_21
5 free ON_CAM5_21
6 free ON_CAM6_21
7 free ON_CAM7_21
8 free ON_CAM8_21
9 free ON_CAM1_22
10 free ON_CAM2_22
11 free ON_CAM3_22
12 free ON_CAM4_22
13 free ON_CAM5_22
14 free ON_CAM6_22
15 free ON_CAM7_22
16 free ON_CAM8_22
17 free ON_CAM1_23
18 free ON_CAM2_23
19 free ON_CAM3_23
20 free ON_CAM4_23
21 free ON_CAM5_23
22 free ON_CAM6_23
23 free ON_CAM7_23
24 free ON_CAM8_23
25 free ON_CAM1_24
26 free ON_CAM2_24
27 free ON_CAM3_24
28 free ON_CAM4_24
29 Free ON_CAM5_24
30 Free ON_CAM6_24
31 Free ON_CAM7_24
32 Free ON_CAM8_24

PLC Interface Manual


page 43 / 304
MACHINEMATE®

2.2.24. DWORD 24 (free, ON_CAM25_28)

DW 24 Free ON_CAM25_28
Bit NC – Input NC-Output

1 Free ON_CAM1_25
2 Free ON_CAM2_25
3 Free ON_CAM3_25
4 Free ON_CAM4_25
5 Free ON_CAM5_25
6 Free ON_CAM6_25
7 Free ON_CAM7_25
8 Free ON_CAM8_25
9 Free ON_CAM1_26
10 Free ON_CAM2_26
11 Free ON_CAM3_26
12 Free ON_CAM4_26
13 Free ON_CAM5_26
14 Free ON_CAM6_26
15 Free ON_CAM7_26
16 Free ON_CAM8_26
17 Free ON_CAM1_27
18 Free ON_CAM2_27
19 Free ON_CAM3_27
20 Free ON_CAM4_27
21 Free ON_CAM5_27
22 Free ON_CAM6_27
23 Free ON_CAM7_27
24 Free ON_CAM8_27
25 Free ON_CAM1_28
26 Free ON_CAM2_28
27 Free ON_CAM3_28
28 Free ON_CAM4_28
29 Free ON_CAM5_28
30 Free ON_CAM6_28
31 Free ON_CAM7_28
32 Free ON_CAM8_28

PLC Interface Manual


page 44 / 304
MACHINEMATE®

2.2.25. DWORD 25 (free, ON_CAM29_32)

DW 25 Free ON_CAM29_32
Bit NC – Input NC-Output

1 Free ON_CAM1_29
2 Free ON_CAM2_29
3 Free ON_CAM3_29
4 Free ON_CAM4_29
5 Free ON_CAM5_29
6 Free ON_CAM6_29
7 Free ON_CAM7_29
8 Free ON_CAM8_29
9 Free ON_CAM1_30
10 Free ON_CAM2_30
11 Free ON_CAM3_30
12 Free ON_CAM4_30
13 Free ON_CAM5_30
14 Free ON_CAM6_30
15 Free ON_CAM7_30
16 Free ON_CAM8_30
17 Free ON_CAM1_31
18 Free ON_CAM2_31
19 Free ON_CAM3_31
20 Free ON_CAM4_31
21 Free ON_CAM5_31
22 Free ON_CAM6_31
23 Free ON_CAM7_31
24 Free ON_CAM8_31
25 Free ON_CAM1_32
26 Free ON_CAM2_32
27 Free ON_CAM3_32
28 Free ON_CAM4_32
29 Free ON_CAM5_32
30 Free ON_CAM6_32
31 Free ON_CAM7_32
32 Free ON_CAM8_32

PLC Interface Manual


page 45 / 304
MACHINEMATE®

2.2.26. DWORD 26 (free, ONPANEL)

DW 26 Free ONPANEL
Bit NC – Input NC-Output

1 Free ON_PANEL01
2 Free ON_PANEL02
3 Free ON_PANEL03
4 Free ON_PANEL04
5 Free ON_PANEL05
6 Free ON_PANEL06
7 Free ON_PANEL07
8 Free ON_PANEL08
9 Free Free
--- Free Free
32 Free Free

2.2.27. DWORD 27 (IN_IPR, ON_IPR)

DW 27 IN_IPR ON_IPR
Bit NC – Input NC-Output

1 IN_CANCELBLK ON_CANCELBLK
2 IN_SINGLE_STEP ON_MEMORY_MODE
3 IN_IPR_DO_STEP ON_MEMORY_OPERATION
_ACTIVE
4 IN_PLC_SET_AXPOS ON_SINGLE_STEP
5 IN_HIDE_IMBLK ON_IPR_DO_STEP
6 IN_HIDE_INBLKn ON_PLC_SET_AXPOS
7 IN_HIDE_CYBLK ON_HIDE_IMBLK
8 IN_HIDE_CYBLKn ON_HIDE_CYBLK
9 IN_FINISH_ACT_BLK Free
10 IN_DEL_MAN_OFFS ON_DEL_MAN_OFFS
11 IN_MP_CHANGE_ACK ON_MP_CHANGE
12 Free Free
--- Free Free
32 Free Free

PLC Interface Manual


page 46 / 304
MACHINEMATE®

2.2.28. DWORD 28 (free, ON_SWAX)

DW 28 Free ON_SWAX
Bit NC – Input NC-Output

1 Free ON_SWAX01
2 Free ON_SWAX02
3 Free ON_SWAX03
4 Free ON_SWAX04
5 Free ON_SWAX05
6 Free ON_SWAX06
7 Free Free
8 Free Free
9 Free Free
--- Free Free
32 Free Free

2.2.29. DWORD 29 (IN_FASTM_MASK, ON_FASTM)

DW 29 IN_FASTM ON_FASTM
Bit NC – Input NC-Output

1 IN_FASTM_BIT1 ON_FASTM_BIT1
2 IN_FASTM_BIT2 ON_FASTM_BIT2
3 IN_FASTM_BIT3 ON_FASTM_BIT3
4 IN_FASTM_BIT4 ON_FASTM_BIT4
5 IN_FASTM_BIT5 ON_FASTM_BIT5
6 IN_FASTM_BIT6 ON_FASTM_BIT6
7 IN_FASTM_BIT7 ON_FASTM_BIT7
8 IN_FASTM_BIT8 ON_FASTM_BIT8
9 Free Free
-- Free Free
32 Free Free

PLC Interface Manual


page 47 / 304
MACHINEMATE®

2.2.30. DWORD 30 (IN_TOOL, free)

DW 30 IN_TOOL Free
Bit NC – Input NC-Output

1 IN_TOOLRELEASE Free
2 IN_TOOLCHANGE Free
3 IN_TOOLPOS Free
4 IN_TOOLACTIVE Free
5 IN_TOOLREMOVE Free
6 Free Free
--- Free Free
32 Free Free

2.2.31. DWORD 31 (IN_TOOLPLACE, ONTOOL)


The input DWORD 31 IN_TOOLPLACE represents only a decimal value, not a
bit coded value.

DW 31 IN_TOOLPLACE ONTOOL
Bit NC – Input NC-Output

1 ON_TOOLPOINT
2 ON_TOOLWARNING
3 ON_TOOLLIFEEND
4 ON_TOOLREF
5 ON_TOOLSTART
6 ON_TOOLDIR
7 ON_TOOLERROR
8 ON_TOOLANSWER
9 ON_TOOLINPOS
10 ON_TOOL_IS_ACT
11 ON_TOOL_NOTFND
12 ON_SPARENOTFND
13 ON_SP_NOTEMPTY
14 ON_GP_NOTEMPTY
15 ON_NP_NOTEMPTY
16 ON_OP_NOTEMPTY
17 ON_PLACE_NOTVAL
18 Free
-- Free
32 Free

PLC Interface Manual


page 48 / 304
MACHINEMATE®

2.2.32. DWORD 32 (IN_TOOLREQ, ON_TOOLPLACE)

The input DWORD 32 IN_TOOLREQ represents only a decimal value, not a bit
coded value.
The output DWORD 32 ON_TOOLPLACE represents only a decimal value, not
a bit coded value.

2.2.33. DWORD 33 (free, ON_TOOLTABLE)


The output DWORD 33 ON_TOOLTABLE represents only a decimal value, not
a bit coded value.

2.2.34. DWORD 34 (free, free)

2.2.35. DWORD 35 (free, free)

PLC Interface Manual


page 49 / 304
MACHINEMATE®

2.2.36. DWORD 36 (free, ON_EGBMOTION)

DW 36 Free ON_EGBMOTION
Bit NC – Input NC-Output

1 Free ON_EGBM01
2 Free ON_EGBM02
3 Free ON_EGBM03
4 Free ON_EGBM04
5 Free ON_EGBM05
6 Free ON_EGBM06
7 Free ON_EGBM07
8 Free ON_EGBM08
9 Free ON_EGBM09
--
32 Free ON_EGBM32

2.2.37. DWORD 37 (IN_FIVEAXES, ON_EGBCONTROL)

DW 37 IN_FIVEAXES ON_EGBCONTROL
Bit NC – Input NC-Output

1 IN_NO_TCP ON_EGBC01
2 IN_TCP_ACTIVE ON_EGBC02
3 IN_TCP_COORD ON_EGBC03
4 IN_COORD_DEF ON_EGBC04
5 IN_BACK_TRAFO_OFF ON_EGBC05
6 IN_BACK_TRAFO_ON ON_EGBC06
7 Free ON_EGBC07
8 Free ON_EGBC08
9 Free ON_EGBC09
--
32 Free ON_EGBC32

PLC Interface Manual


page 50 / 304
MACHINEMATE®

2.2.38. DWORD 38 (free, ON_FIVEAXES)

DW 38 Free ON_FIVEAXES
Bit NC – Input NC-Output

1 Free ON_NO_TCP
2 Free ON_TCP_ACTIVE
3 Free ON_TCP_COORD
4 Free ON_COORD_DEF
5 Free ON_BACK_TRAFO
6 Free Free
-- Free Free
32 Free Free

2.2.39. DWORD 39 (IN_IR_RD_IO, ON_IR_RD_IO)

DW 39 IN_IR_RD_IO ON_IR_RD_IO
Bit NC – Input NC-Output

1 IN_IR_RDIO_01 ON_IR_RDIO_01
2 IN_IR_RDIO_02 ON_IR_RDIO_02
3 IN_IR_RDIO_03 ON_IR_RDIO_03
4 IN_IR_RDIO_04 ON_IR_RDIO_04
5 IN_IR_RDIO_05 ON_IR_RDIO_05
--
32 IN_IR_RDIO_32 ON_IR_RDIO_32

2.2.40. DWORD 40 (IN_IR_EN, ON_IR_EN)

DW 40 IN_IR_EN ON_IR_EN
Bit NC – Input NC-Output

1 IN_IR_EN_01 ON_IR_EN_01
2 IN_IR_EN_02 ON_IR_EN_02
3 IN_IR_EN_03 ON_IR_EN_03
4 IN_IR_EN_04 ON_IR_EN_04
5 IN_IR_EN_05 ON_IR_EN_05
--
32 IN_IR_EN_32 ON_IR_EN_32

PLC Interface Manual


page 51 / 304
MACHINEMATE®

2.2.41. DWORD 41 (IN_IR_ACT, ON_IR_ACT)

DW 41 IN_IR_ACT ON_IR_ACT
Bit NC – Input NC-Output

1 IN_IR_ACT_01 ON_IR_ACT_01
2 IN_IR_ACT_02 ON_IR_ACT_02
3 IN_IR_ACT_03 ON_IR_ACT_03
4 IN_IR_ACT_04 ON_IR_ACT_04
5 IN_IR_ACT_05 ON_IR_ACT_05
--
32 IN_IR_ACT_32 ON_IR_ACT_32

2.2.42. DWORD 42 (free, ON_IR_PROG_ACT)

DW 42 Free ON_IR_PROG_ACT
Bit NC – Input NC-Output

1 Free ON_IR_PROG_ACT_01
2 Free ON_IR_PROG_ACT_02
3 Free ON_IR_PROG_ACT_03
4 Free ON_IR_PROG_ACT_04
5 Free ON_IR_PROG_ACT_05
--
32 Free ON_IR_PROG_ACT_32

2.2.43. DWORD 43 (free, ON_PLC_IPO_ACT)

DW 43 Free ON_PLC_IPO_ACT
Bit NC – Input NC-Output

1 Free ON_PLC_IPO_ACT_01
2 Free ON_PLC_IPO_ACT_02
3 Free ON_PLC_IPO_ACT_03
4 Free ON_PLC_IPO_ACT_04
5 Free ON_PLC_IPO_ACT_05
--
32 Free ON_PLC_IPO_ACT_32

PLC Interface Manual


page 52 / 304
MACHINEMATE®

2.2.44. DWORD 44 (free, ON_PLC_IPO_ENDP)

DW 44 Free ON_PLC_IPO_ENDP
Bit NC – Input NC-Output

1 Free ON_PLC_IPO_ENDP_01
2 Free ON_PLC_IPO_ENDP_02
3 Free ON_PLC_IPO_ENDP_03
4 Free ON_PLC_IPO_ENDP_04
5 Free ON_PLC_IPO_ENDP_05
--
32 Free ON_PLC_IPO_ENDP_32

2.2.45. DWORD 45 (free, ON_PLC_POS_ACT)

DW 45 Free ON_PLC_POS_ACT
Bit NC – Input NC-Output

1 Free ON_PLC_POS_ACT_01
2 Free ON_PLC_POS_ACT_02
3 Free ON_PLC_POS_ACT_03
4 Free ON_PLC_POS_ACT_04
5 Free ON_PLC_POS_ACT_05
6 Free Free
--
32 Free Free

2.2.46. DWORD 46 (free, ON_PLC_POS_ENDP)

DW 46 Free ON_PLC_POS_ENDP
Bit NC – Input NC-Output

1 Free ON_PLC_POS_ENDP_01
2 Free ON_PLC_POS_ENDP_02
3 Free ON_PLC_POS_ENDP_03
4 Free ON_PLC_POS_ENDP_04
5 Free ON_PLC_POS_ENDP_05
6 Free Free
--
32 Free Free

PLC Interface Manual


page 53 / 304
MACHINEMATE®

2.2.47. Summary of all inputs

The following is a summary of the (CNC) input interface signals:

Dword 1 INGENERAL1:
General control signals 1
INEMERGENCn EMERGENCY STOP
IN_START NC-START (or CYCLE START)
IN_STOPn FEED HOLD (or CYCLE STOP)
IN_TRANSF BLOCK TRANSFER ENABLE
IN_ENABLE FEED ENABLE ALL AXES
IN_NO_HDW_RESET NO HANDWHEEL RESET when HMI CNC Station is changed
INPLAYBACK PLAYBACK – teach in program
IN_AFC_EN Analog Feed Control ENABLE
IN_BLOCK_DEL PLC: activate Block Delete (/)
IN_BLOCK_DELn PLC: deactivate Block Delete (/)
IN_G01_OVER PLC: activate G01 override
IN_G01_OVERn PLC: deactivate G01 override
IN_FORWARD PLC: forward NC block processing
IN_BACKWARD PLC: backward NC block processing
IN_M1STOP PLC: activate M01 stop
IN_M1STOPn PLC: deactivate M01 stop
IN_WITH_MOVE PLC: NC program runs ‘with movement’
IN_WITH_MOVEn PLC: NC program runs ‘without movement’
IN_PITCHERR PLC: activate Pitch Error Comp
IN_PITCHERRn PLC: deactivate Pitch Error Comp
IN_IGNRMSERR IGNORE AXIS FEEDBACK ERRORS

Dword 2 INGENERAL2:
General control signals 2
IN_REPEAT EDM function control signal
IN_INTERVA EDM function control signal
IN_INSPECT EDM function control signal
IN_BCDSTRB2_FWD BCD strobes requested when Backward program is in forward
IN_BCDSTRB2_BW BCD strobes requested when Backward program is in backward
IN_MIRR_STROBE IN_MIRROR SIGNALS VALID
IN_PLC_NO_RETREAT PLC axis move requires no retreat
IN_DIS_ENABLE DISTANCE CONTROL ENABLE

Dword 3 IN_DRIVEON
Control loop enable signals
IN_DRON01...32 DRIVE ON 1st...32nd AXIS

Dword 4: IN_DRIVEEN
Feed enable signals
IN_DREN01...32 FEED ENABLE 1st...32nd AXIS

Dword 5: IN_HOMING
Homing control signals (only for analog axes)
IN_HOME01n...32 HOME POSITION 1st...32nd AXIS

PLC Interface Manual


page 54 / 304
MACHINEMATE®

Dword 6: IN_SWLIMIT
Axes software limits
IN_LIMIT01...32 SOFTWARE LIMIT 1st...32nd AXIS

Dword 7: IN_ STRTPOS


Positioning axes control signals
IN_POS_01...05 START 1st...5th POSITIONING AXIS

Dword 8: IN_CYCLEB
Cycle input signals
IN_CYCB_01...08 CYCLE INPUT BYTE 1...8

Dword 9: IN_EXTMODE
External CNC control signals
IN_EXT_01...10 EXTERNAL OPERATION MODE BITS 1...10
IN_EXT_17...24 EXTERNAL PROGRAM SELECTION BITS 17...24

Dword 10: IN_DISABLE (actually not supported)


Disable sercos axes signals
IN_DIS_01...32 DISABLE 1st...32nd SERCOS AXIS

Dword 11: IN_SW_AXES


Spindle and switching spindles/axes control signals
IN_SWAX01...06 SPINDLE/AXES SWITCH 1...6
IN_GEAR01...06 GEAR BOX STAGE SELECTION 1...6

Dword 12: IN_SPINDLE


Spindle control signals
IN_NULLV01..06 SPINDLE 0 VOLT 1...6
IN_REV_01...06 SPINDLE REVERSE 1...6

Dword 13: IN_PARKING


Parking control signals
IN_PARK01..32 PARKING AXIS 1...32

Dword 14: IN_MIRROR


Mirroring control signals
IN_MIRR01..32 MIRRORING AXIS 1...32

Dword 15: IN_OVERRIDE


Override signals
IN_OVERR01..6 FEED OVERRIDE 1...6
IN_OVERR09..14 SPINDLE OVERRIDE 1...6

Dword 16: IN_IPOMVMT


Interpolated axis movement from PLC control signals
IN_IPOMT01..32 INTERPOLATED AXIS MOVE AXIS 1...32

PLC Interface Manual


page 55 / 304
MACHINEMATE®

Dword 17: IN_HDWHEEL


Handwheel control signals
IN_HDAX01..29 HANDWHEEL AXIS 1...29
IN_HDW1_DISABLE PLC DISABLE HANDWHEEL 1
IN_HDW2_DISABLE PLC DISABLE HANDWHEEL 2
IN_HDW3_DISABLE PLC DISABLE HANDWHEEL 3

Dword 18: IN_FASTIO


Probe digital input signals
INFSIGNAL01..16 PLC PROBE DIGITAL INPUT 1...16
INFMASK01..16 PLC PROBE DIGITAL INPUT MASK 1...16

Dword 19: IN_FASTSELECT


Probe digital input select signals
INFSELECT01..16 PROBE DIGITAL INPUT SOURCE SELECT 1...16

Dword 20,21 IN_JPLS, IN_JMNS


Simultaneous multiple axis jog from PLC control signals
IN_JPLS_01..32 MULTIPLE AXIS JOG PLUS AXIS 1...32
IN_JMNS_01..32 MULTIPLE AXIS JOG MINUS AXIS 1...32

Dword 27: IN_IPR


PLC to NC block interpreter control signals
IN_CANCELBLK CANCEL THE ACTIVE BLOCK
IN_SINGLE_STEP PUT PROGRAM IN SINGLE STEP MODE
IN_IPR_DO_STEP SINGLE STEP THE ACTIVE PART PROGRAM
IN_PLC_SET_AXPOS PLC SETTING AXIS POSITION
IN_HIDE_IMBLK HIDE INTERMEDIATE BLOCKS
IN_HIDE_INBLKn INHIBIT OPERATOR FOR HIDE INTERMEDIATE BLOCKS
IN_HIDE_CYBLK HIDE CYCLE BLOCKS
IN_HIDE_CYBLKn INHIBIT OPERATOR FOR HIDE CYCLE BLOCKS
IN_FINISH_ACT_BLK FINISH THE ACTIVE BLOCK (CANCEL REMAINING MOTION)
IN_DEL_MAN_OFFS DELETE ANY MANUAL OFFSETS (JOG OFF AUTO PATH)
IN_MP_CHANGE_ACK ACKNOWLEDGE MPF CHANGE

Dword 29: IN_FASTM_MASK


Fast output signals
IN_FASTM_BIT1..8 FAST OUTPUT SIGNALS 1...8

Dword 30: IN_TOOL


Tool management signals
IN_TOOLRELEASE TOOL CHANGE DONE
IN_TOOLCHANGE ACTIVE TOOL RETURNED TO MAGAZINE
IN_TOOLPOS REQUEST MOVE TO A MAGAZINE LOCATION
IN_TOOLACTIVE TOOL LIFE OF ACTIVE TOOL TO BE DECREMENTED
IN_TOOLREMOVE TOOL REMOVED

Dword 31: IN_TOOLPLACE


Tool location signals
IN_TOOLPLACE NEW MAGAZINE LOCATION
(a decimal value, not a bit coded value)

PLC Interface Manual


page 56 / 304
MACHINEMATE®

Dword 32: IN_TOOLREQ


Tool request signals
IN_TOOLREQ TOOL TABLE REQUEST
(a decimal value, not a bit coded value)

Dword 37: IN_FIVEAXES


Five axis processing signals
IN_NO_TCP TOOL CENTER POINT PROGRAMMING OFF
IN_TCP_ACTIVE TCP PROGRAMMING ON
IN_TCP_COORD TCP PROG. WITH ROTATED COORDINATE SYSTEM ON
IN_COORD_DEF DEFINITION OF ROTATED COORDINATE SYSTEM
IN_BACK_TRAFO_OFF BACK TRANSFORMATION OFF
IN_BACK_TRAFO_ON BACK TRANSFORMATION ON

2.2.48. Summary of all outputs


The following is a summary of the (CNC) output interface signals:

Dword 1 ONGENERAL1:
General state signals 1
ON_CYCLEON CYCLE ON
ON_STOPNCn FEED HOLDn (or CYCLE STOP)
ON_STARTNC NC CYCLE START
CNC operating mode signals
ON_AUTO CNC in Auto Sequential block
ON_SINGLE CNC in Auto Single block
ON_MDI CNC in Auto MDI (manual NC)
ON_JOGMODE CNC in Manual jog mode
ON_HOMING CNC in Manual Move to Ref. Pt..
CNC jog mode signals
ON_INC_JOG CNC in Incremental Jog Mode
ON_CONT_JOG CNC in Continuous Jog Mode
ON_CNC_CHAN_ACT This CNC station/channel IS ACTIVE ON HMI
ON_EMERG CNC Emergency stop ACTIVE
ON_PRG_STP PROGRAM Operator STOP ACTIVE
ON_PRG_END END OF PROGRAM ACTIVE
ON_RESET CONTROL RESET ACTIVE
ON_NO_CNTR NO FEEDBACK CONTROL
ON_HOME_OK HOME POSITION OK
ON_NCERROR NC PROGRAM ERROR
ON_ADDKEY1 AUXILIARY PUSH-BUTTON 1
ON_ADDKEY2 AUXILIARY PUSH-BUTTON 2
ON_PROGRAM NC PROGRAM ACTIVE
ON_ADMISSN ADMISSION (TEACH PANEL)
ON_PANEL TEACH PANEL ACTIVE
ON_RETREAT RETREAT ACTIVE
ON_BACKW BACKWARD ACTIVE
ON_TEACHED TEACH-Editor is Open
ON_BLKCHNG BLOCKCHANGE (EDM)
ON_M1STOP WILL STOP ON M01
ON_WITH_MOVE AXES MOVE DURING PROGRAM
ON_G01_OVER G01 OVERRIDE ACTIVE
ON_BLOCK_DEL BLOCK DELETE (/) ACTIVE
ON_PITCHERR PITCH ERROR COMP ACTIVE

PLC Interface Manual


page 57 / 304
MACHINEMATE®

Dword 2 ONGENERAL2:
General control signals 2
ON_STAND STANDSTILL
ON_RAPID RAPID TRAVERSE
ON_THREAD G33/G34 ACTIVE
ON_HOMEOK HOMEOK
ON_INTVEND EDM function
ON_INTRET EDM function
ON_INTVHLD EDM function
ON_EGB_ACTIVE EGB (Gear Hobber) ACTIVE
ON_EGB_SYNC EGB TABLE SYNCHRONIZED
ON_READ_TO_BLK ‘READ TO BLOCK’ IN PROGRESS
ON_HDW_TICKS_LOST1 HANDWHEEL 1 LOST TICKS AFTER RAPID SPIN
ON_HDW_TICKS_LOST2 HANDWHEEL 2 LOST TICKS AFTER RAPID SPIN
ON_HDW_TICKS_LOST3 HANDWHEEL 3 LOST TICKS AFTER RAPID SPIN
ON_TRANSF NC BLOCK TRANSFER ENABLE STATUS
ON_CYCLE_STOP NC CYCLE STOP (FEED HOLD) STATUS
ON_AUTOFOCUS DISTANCE CONTROL FEATURE
ON_DIST_CTRL DISTANCE CONTROL FEATURE ACTIVE
ON_STROBE1 ... 4 BCD Strobes

Dword 3,4 ONBCDWORD1, 2


BCD-codes
ONBCDWORD1, 2 ACTIVE BCD VALUE
(a binary coded decimal value, not a bit coded value)

Dword 5: ONINPOS
Axis in position state signals
ON_INP01 .. 32 IN POSITION 1st...32nd AXIS

Dword 6: ONHOMINGOK
Homing state signals
ON_HOME01 .. 32 HOMING STATE 1st...32nd AXIS

Dword 7: ONPOSAXES
Positioning axes-state signals
ON_POS_01 .. 05 SIGNAL 1st...5th POSITIONING AXIS

Dword 8: ONCYCBYTE
Cycle output signals
ON_CYCB01 .. 08 CYCLE OUTPUT BYTE 1...8

Dword 9: ONEXTMODE
External CNC state signals
ON_EXT_01 .. 10 EXTERNAL OPERATION MODE STATE ON 1...10
ON_EXT_17 .. 24 EXTERNAL PROGRAM SELECTION STATE ON 1...8

Dword 10: ONREADY


Sercos drive ready signals
ON_READY01 .. 32 SERCOS READY STATE 1st...32nd AXIS

PLC Interface Manual


page 58 / 304
MACHINEMATE®

Dword 11: ON_PLCMDONE


Measuring done for PLC command - state signals
ON_PLCMDONE01 .. 32 MEASURING DONE FOR PLC 1st...32nd AXIS

Dword 12: ONSPINDLE


Spindle state signals
ON_STAND01 .. 6 SPINDLE STANDSTILL 1st...6th SPINDLES
ON_MOVE01 .. 6 SPINDLE SPEED REACHED 1st...6th SPINDLES

Dword 13: ONCONTROL


Sercos drive control signals
ON_CONTR01 .. 32 SERCOS CONTROL 1st...32nd DRIVE

Dword 14: ONMIRROR


Mirroring state signals
ON_MIRR01 .. 32 MIRRORING 1st...32nd AXIS

Dword 15,16: ONCMND_P, ONCMND_M


Motion command Plus/Minus signals
ON_CMNDP01 .. 32 nd
MOTION COMMAND Plus 1st...32 DRIVE
ON_CMNDM01.. 32 nd
MOTION COMMAND Minus 1st...32 DRIVE

Dword 17: ONHANDWH


Handwheel state signals
ON_HANDW01 .. 32 HANDWHEEL STATE 1st...32nd AXIS

Dword 18: ON_CAM1_4


Software CAM signals – axes 1 to 4
ON_CAM1_01 .. ON_CAM8_01 SOFTWARE CAM STATES 1st AXIS
ON_CAM1_02 .. ON_CAM8_02 SOFTWARE CAM STATES 2nd AXIS
ON_CAM1_03 .. ON_CAM8_03 SOFTWARE CAM STATES 3rd AXIS
ON_CAM1_04 .. ON_CAM8_04 SOFTWARE CAM STATES 4th AXIS

Dword 19: ON_CAM5_8


Software CAM signals – axes 5 to 8
ON_CAM1_05 .. ON_CAM8_05 SOFTWARE CAM STATES 5th AXIS
ON_CAM1_06 .. ON_CAM8_06 SOFTWARE CAM STATES 6th AXIS
ON_CAM1_07 .. ON_CAM8_07 SOFTWARE CAM STATES 7th AXIS
ON_CAM1_08 .. ON_CAM8_08 SOFTWARE CAM STATES 8th AXIS

Dwords 20-25: ON_CAM9_12, ON_CAM13_16, ON_CAM17_20,


ON_CAM21_24, ON_CAM25_28, ON_CAM29_32
Software CAM signals – axes 9 to 32
ON_CAM1_09 .. ON_CAM8_09 SOFTWARE CAM STATES 9th AXIS
to
ON_CAM1_32 .. ON_CAM8_32 SOFTWARE CAM STATES 32nd AXIS

Dword 26: ONPANEL


Teach panel PLC function key signals
ON_PANEL01 .. 8 TEACH PANEL PLC FUNCTION SIGNALS 1..8

PLC Interface Manual


page 59 / 304
MACHINEMATE®

Dword 27: ON_IPR


NC block interpreter to PLC status signals
ON_CANCELBLK CANCELLING THE ACTIVE NC BLOCK
ON_MEMORY_MODE CNC is in an internal memory mode (teaching)
ON_MEMORY_OPERATION_ACTIVE CNC has an active memory operation
(e.g., remote file transfer request)
ON_SINGLE_STEP SINGLE STEP MODE ACTIVE
ON_IPR_DO_STEP SINGLE STEP COMMANDED BY PLC
ON_PLC_SET_AXPOS AXIS POSITION SET BY PLC
ON_HIDE_IMBLK INTERMEDIATE BLOCKS HIDDEN
ON_HIDE_CYBLK CYCLE BLOCKS HIDDEN
ON_DEL_MAN_OFFS MANUAL OFFSETS DELETED
ON_MP_CHANGE MACHINE PARAMETER FILE CHANGED

Dword 28: ON_SWAX


Switching spindle/axis control state signals
ON_SWAX01 .. 6 SWITCHING SPINDLE/AXIS CONTROL STATE SIGNALS 1...6

Dword 29: ON_FASTM


Fast output signals
ON_FASTM_BIT1 .. 8 FAST OUTPUT SIGNALS 1...8

Dword 31: ONTOOL


Tool management signals
ON_TOOLPOINT MAGAZINE MOVED TO POSITION
ON_TOOLWARNING ACTIVE TOOL WARNING LIMIT REACHED
ON_TOOLLIFEEND ACTIVE TOOL LIFE HAS ENDED (LESS THAN ZERO)
ON_TOOLSTART MAGAZINE WILL MOVE TO REQUESTED LOCATION
ON_TOOLREF MAGAZINE WILL MOVE TO POSITION 1
ON_TOOLDIR DIRECTION FOR MAGAZINE (0=negative, 1=positive)
ON_TOOLERROR ERROR AFTER TOOL READ OR MAGAZINE POSITION
ON_TOOLANSWER TOOL CHANGE HAS COMPLETED
ON_TOOLINPOS MAGAZINE IS IN POSITION
ON_TOOL_IS_ACT TOOL SELECTION IS FOR THE ACTIVE/SPINDLE TOOL
ON_TOOL_NOTFND SELECTED TOOL NOT FOUND
ON_SPARENOTFND SPARE TOOL NOT FOUND
ON_SP_NOTEMPTY SPINDLE IS NOT EMPTY
ON_GP_NOTEMPTY GRIPPER IS NOT EMPTY
ON_NP_NOTEMPTY NEW PLACE IS NOT EMPTY
ON_OP_NOTEMPTY OLD PLACE IS NOT EMPTY
ON_PLACENOTVAL PLACE IS NOT VALID

Dword 32: ON_TOOLPLACE


Current magazine location signals
ON_TLOC01 .. 32 TOOL MAGAZINE LOCATION SIGNALS 1...32
(a binary coded decimal value, not a bit coded value)

Dword 33: ON_TOOLTABLE


Tool table signals
ON_TACT01 .. 32 TOOL TABLE SIGNALS 1...32
(a binary coded decimal value, not a bit coded value)

Dword 36: ON_EGBMOTION


Electronic Gear Box motion signals
PLC Interface Manual
page 60 / 304
MACHINEMATE®

ON_EGBM01 .. 32 EGB MOTION SIGNALS 1st...32nd AXIS

Dword 37: ON_EGBCONTROL


Electronic Gear Box control signals
ON_EGBC01 .. 32 EGB CONTROL SIGNALS 1...32

Dword 38: ON_FIVEAXES


Five axis processing signals
ON_NO_TCP TOOL CENTER POINT PROGRAMMING OFF
ON_TCP_ACTIVE TCP PROGRAMMING ACTIVE
ON_TCP_COORD TCP ROTATED COORDINATE SYSTEM ACTIVE
ON_COORD_DEF DEFINITION OF ROTATED COORD. SYS. ACTIVE
ON_BACK_TRAFO BACK TRANSFORMATION IS ACTIVE

Dword 43: ON_PLC_IPO_ACT


PLC control of interpolated axes – status signals
ON_PLC_IPO_ACT_01 .. 32 st nd
PLC IPO axis control status 1 ...32 AXIS

Dword 44: ON_PLC_IPO_ENDP


PLC motion of interpolated axes – end point status signals
ON_PLC_IPO_ENDP_01 .. 32 st
PLC IPO axis move end status 1 ...32 AXIS
nd

Dword 45: ON_PLC_POS_ACT


PLC control of positioning axes – status signals
ON_PLC_POS_ACT_01 .. 05 st th
PLC POS axis control status 1 ...5 AXIS

Dword 46: ON_PLC_POS_ENDP


PLC motion of positioning axes – end point status signals
ON_PLC_POS_ENDP_01 .. 05 PLC POS axis move end status 1st ...5th AXIS

PLC Interface Manual


page 61 / 304
MACHINEMATE®

2.2.49. Critical signals in this interface


There are many interface signals described in this manual. Some are required
in all or nearly all applications while others are used only when the relevant
feature is part of the application. This manual defines all the signals, functions
and function blocks within this interface between the PLC and the CNC. This
manual is organized by the order these items are defined in the interface, not in
any other order such as urgency or priority.
Chapter 8 in the Start Up Manual lists the minimum required PLC interface
signals. A valid PLC project must exist for the completion of the start up
activities described in the Start Up Manual. That section of the manual also
contains brief explanations of these critical signals (not as comprehensive as
the explanations in this manual).
Appendix B in the Start Up Manual is a template PLC application, written in the
Structured Text programming language, using these critical interface signals.
Appendix C is the same template but written in the Ladder Diagram
programming language. Either of these templates can be used as the
foundation for the actual PLC application. In addition to the interface signals
they also provide an example of several interface functions, involving the
display of operator messages from the PLC (a common requirement). Each
template provides the overhead for all the critical signals in this interface.

PLC Interface Manual


page 62 / 304
MACHINEMATE®

2.3. Signal-Interface, CNC inputs

The variable names for the CNC input signals and their corresponding
DWORDs begin with
IN ( Input to the CNC).

2.3.1. INGENERAL 1 (dword 1), general control signals 1

Several control signals, with which the PLC-PROGRAM can address basic
functions of the CNC, are summed in this dword:

Bit
1 INEMERGENCn EMERGENCY STOPn
2 IN_START NC CYCLE START
3 IN_STOPn FEED HOLDn (CYCLE STOP)
4 IN_TRANSF BLOCK TRANSFER ENABLE
5 IN_ENABLE FEED ENABLE ALL AXES
6 IN_NO_HDW_RESET HANDWHEEL NOT RESET WHEN THIS
CNC STATION NOT ACTIVE
7 Free
8 INPLAYBACK PLAYBACK INPUT (TEACH A POINT)
9 IN_AFC_EN ANALOG FEED CONTROL ENABLE
10
... Free
19
20 IN_BLOCK_DEL PLC: Activate Block Delete (/)
21 IN_BLOCK_DELn PLC: Deactivate Block Delete (/)
22 IN_G01_OVER PLC: Activate G01 Override
23 IN_G01_OVERn PLC: Deactivate G01 Override
24 IN_FORWARD PLC: Forward NC block processing
25 IN_BACKWARD PLC: Backward NC block processing
26 IN_M1STOP PLC: Activate M01 Operator Stop
27 IN_M1STOPn PLC: Deactivate M01 Operator Stop
28 IN_WITH_MOVE PLC: NC program runs ‘with movement’
29 IN_WITH_MOVEn PLC: NC program runs ‘without movement’
30 IN_PITCHERR PLC: Activate pitch error comp
31 IN_PITCHERRn PLC: Deactivate pitch error comp
32 IN_IGNRMSERR IGNORE AXIS FEEDBACK ERRORS

The individual signals can be set to 0 or 1 independent from each other and are
separately described in the following pages.
Note: The signals for bits 6, 20 through 32 were added in CNC version 2.0 so
they did not exist in earlier versions.

PLC Interface Manual


page 63 / 304
MACHINEMATE®

2.3.1.1. INEMERGENCn -- EMERGENCY STOP

This signal is used to inform the CNC, whether at the machine an


EMERGENCY STOP state exists or not. Such a state is reached usually by the
interruption of the EMERGENCY STOP loop, either through manually pressing
an EMERGENCY STOP button or through the drop of a safety-relay.
This signal is automatically locked within the CNC. The given effects are
therefore held until the locking is cancelled by a control reset.

Value Meaning
---------------------------------------------------------------------------------------------------
0 EMERGENCY STOP State active
1 EMERGENCY STOP State not active

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 - Output of 0 volt at all D/A outputs (Analog) or Stop updating Position or
Velocity command (Sercos).
- Activation of the EMERGENCY STOP locking in the CNC.
- Discontinuance and interlock of all CNC term functions like NC program
processing, manual operation or position control.
- The signal ON_NO_CNTR (no feedback control, see chapter 2.4.1.12)
receives the value 1.
- On the monitor the display EMERGENCY STOP appears in the line of
the header of the basic menu screen of the CNC - operating modes
AUTOMATIC, MANUAL, and INFORMATION, also, the machine's
positions of the axes are displayed instead of the set positions.

1 - No direct effect because of the EMERGENCY STOP locking in the CNC.


Is only used for "CONTROL RESET".

0→ 1 No direct effect.
1→ 0 No direct effect.

Note:
• The current EMERGENCY STOP state at the machine should
always be communicated via this signal to the CNC, otherwise
- Safety functions of the CNC are not activated and
- The CNC could possibly output error messages which can
result in false interpretations.

• The EMERGENCY STOP locking in the CNC can only be


overridden by "CONTROL RESET".
• The path measuring loops of the CNC also remain active during an
EMERGENCY STOP state so there is no loss of position feedback.
Thus a homing cycle after termination of the EMERGENCY STOP
state is not necessary.
• EMERGENCY STOP is not interlocked in the CNC and works
unconditionally. This signal has no influence on the CNC's safety-
relay ("NC-READY").

PLC Interface Manual


page 64 / 304
MACHINEMATE®

2.3.1.2. IN_START -- NC CYCLE START

The PLC program can instruct the CNC to execute one "start" via this signal. A
"start" is absolutely necessarily for the activation of certain safety relevant NC-
functions such as:

- Processing of a NC program;
- Homing cycle.

There is no other possible way to cause the CNC to "start". Also the CNC
cannot "start" on its own (see chapter 2.4.1.3 “dword 1, ON_STARTNC - NC-
Start (Cycle Start)") if the CNC is monitoring the Cycle Start push button.

Value Meaning
---------------------------------------------------------------------------------------------------
0 "Start" is not demanded
1 "Start" demanded

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 - No direct effect.
1 No direct effect.

0→ 1 - The feed rate hold locking of the CNC is overridden (see chapter 2.3.1.3
"dword 1, IN_STOPn (feed hold)").
- If one of the "start" requirements is available in the CNC (see table), then
"start" is executed and the signal ON_CYCLEON receives the value 1
(see chapter 2.4.1.1 "dword 1, ON_CYCLEON" ). Besides that, the
display CYCLE ON appears in the line of the header of the basic menu
screen of the CNC-operating modes AUTOMATIC, MANUAL and
INFORMATION.

1→ 0 No direct effect.

Note:
• Before the PLC Program initiates a "start", ensure, by suitable
interlocks in the PLC logic, that:
- all safety loops are sharply controlled and do not report any
errors;
- The CNC is in the operating state desired by the operator;
all necessary requirements are satisfied for the action to be
"started" on the machine side.

• The signal IN_START (NC cycle start) is not processed if:

PLC Interface Manual


page 65 / 304
MACHINEMATE®

- The EMERGENCY STOP locking in the CNC is active (see


chapter 2.3.1.1 "dword 1, INEMERGENCn (emergency
stop)");
- The test operation "without motion" is active;
- The signal IN_STOPn (feed hold) has the value 0 (see
chapter 2.3.1.3 " dword 1, IN_STOPn " );
- The CNC is in the CNC-operating mode - memory.

• It is recommended that the execution of the "start" via the signal


ON_CYCLEON (see chapter 2.4.1.1 “dword 1“) is monitored and
that the signal IN_START (NC cycle start) is set again to 0 if
ON_CYCLEON has the value 1 or a determined time
corresponding to the application has expired

"Start"-requirements in the CNC and effects of the "start" in the CNC.

The subsequently described effects of the "start" on NC blocks and


their execution relate to pure NC blocks and not to cycle blocks.
If one or more cycle blocks precede a pure NC block then they are
treated as belonging to the following NC block
The term "basic condition" as used in the following descriptions of
the requirements and effects, means that after selection of the
relevant CNC-operating mode still no other operations or activities
other than those explicitly mentioned have been made.

Requirements Effects
---------------------------------------------------------------------------------------------------
The CNC is in the CNC-operating mode The interrupted movement of the
MANUAL-hand operation, incremental axis is continued.
processing was active and was then
interrupted by IN_STOPn (feed hold).

The CNC is in the CNC-operating mode The homing cycle of the selected
MANUAL-homing in the basic condition, axes are started.
at least one axis has been selected with
homing duty.

The CNC is in the CNC-operating mode The interrupted homing cycle is


MANUAL-homing. continued.
A homing cycle was active, which was
interrupted by IN_STOPn (feed hold).

The CNC is in the CNC-operating mode The processing of the NC-


AUTOMATIC-next block in the basic PROGRAM is started. NC block
condition, an executable NC exchanges are performed (see
PROGRAM from the NC program chapter 2.3.1.4 "dword 1,
memory is selected. IN_TRANSF (transfer enable)")
and NC blocks are executed (see
chapter 2.3.1.5 "dword 1,
PLC Interface Manual
page 66 / 304
MACHINEMATE®

IN_ENABLE (feed enable all


axes)").

The CNC is in the CNC-operating mode The processing of the NC


AUTOMATIC-single mode in the basic PROGRAM is started, one NC
condition, an executable NC block exchange is performed (see
PROGRAM memory is selected. chapter 2.3.1.4 "dword 1,
IN_TRANSF (transfer enable)"),
but still no NC block is executed.
Note:
To execute the 1st NC block of a
NC PROGRAM in the CNC-
operating mode AUTOMATIC-
single mode, two "start" signals
are necessary.

The CNC is in the CNC-operating mode The processing of the NC-


AUTOMATIC-next block or PROGRAM is started, even if not
AUTOMATIC-single mode in the basic yet sufficient NC-BLOCKS have
condition. An NC-PROGRAM on a data arrived from the data carrier (e.g.,
carrier is selected via the function via the serial interface). NC block
"External device" (selection of F10: exchanges (see chapter 2.3.1.4
AUTOMATIC → F1: Program selection "dword 1, IN_TRANSF (transfer
F6: External device). enable)") are performed
automatically, according to the
active CNC-operating mode, as
soon as the preset quantity of NC
data has arrived.

The CNC is in the CNC-operating mode An NC block exchange is


AUTOMATIC-Manual-NC, no NC- performed (see chapter 2.3.1.4
BLOCK is active. "dword 1, IN_TRANSF (transfer
enable)") if necessary also with
one "empty" NC-BLOCK.
Note:
To execute an individual NC block
in the CNC-operating mode
AUTOMATIC-Manual-NC two
"start" signals are necessary.

The CNC is in the CNC-operating The execution of the NC blocks is


modeAUTOMATIC-next block, or continued (see chapter 2.3.1.5
AUTOMATIC-single mode or “dword 1,IN_ENABLE feed enable
AUTOMATIC-Manual-NC. all axes"). If the NC-BLOCK was
An NC-BLOCK was active and was already terminated, then NC block
then interrupted by IN_STOPn (feed exchanges (see chapter 2.3.1.4
hold). “dword1, IN_TRANSF (transfer
enable)") are performed according
to the active CNC-operating mode.

The CNC is in the CNC-operating mode The processing of NC blocks is


AUTOMATIC-next block, AUTOMATIC- continued with the following NC
PLC Interface Manual
page 67 / 304
MACHINEMATE®

single mode or AUTOMATIC-Manual- block. NC block exchanges (see


NC. chapter 2.3.1.4 “dword 1
The processing of NC blocks was IN_TRANSF (transfer enable)")
active and was stopped by the codes are performed according to the
M00 or M01 (see chapter 2.4.1.9 active CNC-operating mode.
"dword1, ON_PRG_STP (program
stop)”).

The CNC is in the CNC-operating mode The interpolation of the positioning


AUTOMATIC-next block axes is started again if necessary
Positioning axes was active and the parallel to other effects as
interpolation was interrupted by mentioned.
IN_STOPn (feed hold, see chapter
2.3.1.3 “dword 1”).

2.3.1.3. IN_STOPn -- FEED HOLDn (CYCLE STOP)

Via this signal, the PLC Program can instruct the CNC to execute a feed rate
hold.
This signal is used mainly to interrupt actions that were activated with
IN_START (NC cycle start, see chapter 2.3.1.2 “dword 1“).
This signal is locked in the CNC. The given effects are therefore held until the
locking is cancelled by the indicated measure (e.g., a cycle start).
Also the CNC cannot "stop" on its own (see chapter 2.4.1.2 “dword 1,
ON_STOPNCn - Feed Holdn (Cycle Stop)") if the CNC is monitoring the Cycle
Stop push button.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Feed rate hold demanded
1 Feed rate hold not demanded

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 - The signal IN_START (NC cycle start, see chapter 2.3.1.2 “dword 1”) is
not processed. The feed rate hold locking cannot be overridden.
1 No direct effect because of the feed rate hold locking in the CNC.

1→ 0 - Halt all axes via the preset deceleration ramp if necessary on the
programmed path.
- Activate the feed rate hold locking in the CNC.
- Feed rate block for all axes.
- Transfer block for pure NC blocks.
- If all axes have come to the standstill, the signal ON_CYCLEON (see
chapter 2.4.1.1 “dword 1“) receives the value 0 and the signal

PLC Interface Manual


page 68 / 304
MACHINEMATE®

ON_STAND (standstill, see chapter 2.4.2.1 “dword 2“ ) receives the


value 1.
0→ 1 No direct effect.

Note:
• If thread cutting (G33, G34) is active then the signal IN_STOPn
(feed hold) does not work immediately, instead the effects and the
locking are noted and then activated when the active (or the last if
several are programmed in a direct sequence) G33/34 block is
terminated.

This signal is therefore not suited for a "stop in any case". If G33/G34 is active
(chapter 2.4.2.3 see "dword 2, ON_THREAD (thread cutting (G33/G34)
active)"), the path interpolation can be prematurely stopped only by the signal
IN_NULLV01..06 (spindle 0 volt, see chapter 2.3.12.1 “dword 12“ ).

If "feed rate per rotation" (G95) is active, the axes are stopped without a
deceleration ramp.
IN_STOPn (feed hold) also works if the test operation "without motion" is
active.
IN_STOPn (feed hold) works also on active positioning axes.
The output of an active spindle-set value is not influenced through IN_STOPn
(feed hold).
If the spindle is also to be stopped at feed rate hold, it is recommended that the
signal IN_NULLV01..06 (spindle 0 volt, see chapter 2.3.12.1 “dword 12“) is
given the value 1, when the signal ON_CYCLEON (see chapter 2.4.1.1 “dword
1“ ) receives the value 0.

The execution of ON_CYCLEON is not influenced by IN_STOPn (feed hold).


The feed rate hold locking can be overridden
- by CONTROL RESET;
- by the signal IN_START (NC cycle start, see chapter
2.3.1.2 “dword 1“) if the test operation "without motion" is
not active;
- by the operation "test start" if the test operation "without
motion" is active.

The CNC position control loops also remain active at IN_STOPn (feed hold).

PLC Interface Manual


page 69 / 304
MACHINEMATE®

2.3.1.4. IN_TRANSF -- BLOCK TRANSFER ENABLE

The exchange of NC blocks from the preparation level to the execution level in
the CNC can be blocked via this signal and thus the execution of the NC blocks
is blocked. This signal is used mainly for short-term interruptions of the NC-
program processing such as if it is necessary to wait for the result of an
external event (e.g., termination of a machine switch or function).

Value Meaning
---------------------------------------------------------------------------------------------------
0 NC block exchanges blocked
1 NC block exchanges enabled

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 - No NC block exchanges can be performed. The execution of NC
blocks is interrupted if the active NC block is terminated.
- If the axes are positioned with G09 (Look Ahead), they are
decelerated via the preset deceleration ramp at the end position of
the active NC block.
- The signal ON_STAND (standstill, see chapter 2.4.2.1 “dword 2“)
receives the value 1 if all path axes were stopped.

1 No direct effect.

0→ 1 - If the CNC itself is in the CNC-operating mode AUTOMATIC-next


block, AUTOMATIC-single mode or AUTOMATIC-Manual-NC, the
signal ON_CYCLEON (see chapter 2.4.1.1 “dword 1“) has the value
1 and the active NC block is already terminated, then a NC block
exchange is made and the next NC block is executed.
1→ 0 No other effect.

Note:
• Under the following conditions it is not guaranteed, that no more
NC block exchanges are undertaken, although IN_TRANSF
(transfer enable) has the value 0:

1) If an interpolation with G09 (Look Ahead) is active and


the path velocity so high, that under observance of the
preset deceleration ramp the axes cannot be slowed
down to the end position of the active NC blocks, then
further NC block exchanges continue to be executed until
the axes have come to a standstill at the end position.

2) If thread cutting (G33, G34) is active and several


G33/34-blocks are programmed in direct sequence, then
further NC block exchanges continue to be executed until
the last G33/34-block is terminated.

PLC Interface Manual


page 70 / 304
MACHINEMATE®

• In the CNC-operating modes MANUAL-hand operation and


MANUAL-homing, IN_TRANSF (transfer enable) is not
processed.

• IN_TRANSF (transfer enable) also works if the test operation


"without motion" is active .

• The interpolation of positioning axes is not influenced by


IN_TRANSF (transfer enable).

• The signal ON_CYCLEON (see chapter 2.4.1.1 “dword 1“ ) is


not influenced by IN_TRANSF (transfer enable).

• The execution of cycle blocks are not influenced by


IN_TRANSF (transfer enable).

2.3.1.5. IN_ENABLE -- FEED ENABLE ALL AXES

With this signal the PLC Program can enable or block the path interpolation of
the CNC during the execution of NC blocks.
This signal is then mainly used if the execution of NC block should not be
blocked on principal but only for travel movements.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Path interpolation blocked
1 Path interpolation enabled

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 No path interpolation can be performed. The axes involved in a path
interpolation are stopped via the preset deceleration ramp if necessary
on the programmed path. If all path axes have come to a standstill, the
signal ON_STAND (standstill, see chapter 2.4.2.1 " dword 2") receives
the value 1.

1 No direct effect.

0→ 1 If the CNC itself is in the CNC-operating mode AUTOMATIC-next block,


AUTOMATIC-single mode or AUTOMATIC-Manual-NC, the signal
ON_CYCLEON (see chapter 2.4.1.1 "dword 1") has the value 1 and an
interpolation is programmed in the active NC block, then this
interpolation is activated and the involved axes start moving.

1→ 0 No other effect.

PLC Interface Manual


page 71 / 304
MACHINEMATE®

Note:
• If thread cutting (G33, G34) is active, the blocking of the path
interpolation does not work immediately, but after the active (the
last if several are programmed in direct sequence) G33/34-block
is terminated. This signal is therefore not suited for a "stop in any
case" application.

• If thread cutting G33/G34 is active (chapter 2.4.2.3 see "dword 2,


ON_THREAD"), the path interpolation can be prematurely
stopped only by the signal IN_NULLV01..06 (spindle 0 volt, see
chapter 2.3.12.1 "dword 12").

• If "feed rate per rotation" (G95) is active, the axes are stopped
without a deceleration ramp.

• In the CNC-operating modes MANUAL-hand operation and


MANUAL-homing, IN_ENABLE (feed enable all axes) is not
processed.

• IN_ENABLE (feed enable all axes) also works if the test


operation "without motion" is active.

• The interpolation of positioning axes is not influenced by


IN_ENABLE (feed enable all axes).

• The signal ON_CYCLEON (see chapter 2.4.1.1 "dword 1") is not


influenced by IN_ENABLE (feed enable all axes).

• If this signal is FALSE when the CNC is not in emergency stop,


the status on the Manual and Automatic mode displays will
indicate FEED ENABLE MISSING.

• This signal is sometimes used when the PLC affects axis motion
while handling a BCD code (e.g., an M-code). By setting bit 16 in
the BCDStrobeTime (i.e., 8000-hex), the axis motion commands
in the block will be delayed until after that BCD letter has been
processed by the PLC so that machine parameter takes care of
the interaction rather than using IN_ENABLE. If the PLC tries to
set IN_ENABLE to FALSE at the moment of a BCD code without
having set BCDStrobeTime bit 16 for that BCD number then it will
always happen just a little too late (so there might be a very small
axis move) because the CNC would begin interpolation before
the PLC can respond to the BCD. If the changes in spindle speed
should occur prior to axis motion in that block then the PLC logic
typically uses ON_MOVE01 in its management of IN_ENABLE
because ON_MOVE01 will be FALSE whenever the spindle
speed is changing (when the spindle has feedback).

PLC Interface Manual


page 72 / 304
MACHINEMATE®

2.3.1.6. IN_NO_HDW_RESET -- NO RESET OF HANDWHEEL

This signal can prevent the reset of a free handwheel. When the operator
changes the active CNC station selection, the default behavior is for the CNC
to reset the current free handwheel assignment. This is due to the assumption
that the operator will not want a previous handwheel assignment to remain
intact with the new active CNC station on the display. This signal allows the
PLC to direct the CNC to maintain a handwheel assignment even if the CNC
station that is active on the display is changed.
A free handwheel is one that is not assigned to a specific axis; a free
handwheel can be assigned by the operator selection of an axis or by the PLC.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The current free handwheel assignment will be reset if this CNC station is
no longer active in the HMI (the operator display)
1 The current free handwheel assignment will not be reset even if this CNC
station is no longer active in the HMI. Another action is required to reset
that assignment (such as a control reset or a PLC command).

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 No direct effect.
1 CNC keeps this handwheel active even if the operator changes the active
station in the HMI.

0→ 1 No effect.

1→ 0 No effect.

2.3.1.7. INPLAYBACK -- PLAYBACK, TEACH A POINT

This signal can initiate one "Playback" process. The “playback” is the recording
of axis positions in a part program format, that could be “played back” later as a
part program. Each playback activation results in another NC block added to
the part program, with the current axis position(s). Those axes that have
changed their position since the last playback activation have their position
added to the NC block. This part program can be edited, with G-codes, M-
codes, feed rates and spindle speeds, to run the part whose points were
recorded in this manner.

Value Meaning
---------------------------------------------------------------------------------------------------
0 No meaning
1 No meaning

PLC Interface Manual


page 73 / 304
MACHINEMATE®

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 No effect.
1 No effect.

0→ 1 "Playback" is triggered and the axis coordinates are recorded


automatically in the next block of the selected NC PROGRAM.

1→ 0 No effect.

Note:
• This signal is only effective if the "Playback" process was
prepared via inputs to the control panel and the CNC is in the
CNC-operating mode MANUAL-hand operation or MANUAL-
homing or memories.
After the part program has been specified and the “Playback”
feature has been activated via the MMI and the CNC is in the
correct operating mode, then each time the PLC triggers this
signal to the CNC, the CNC will add an NC statement to the part
program with the current axis coordinates. This allows the
operator to manually ‘teach’ a part program.
This CNC feature is described in more detail in the Operator’s
Manual.

2.3.1.8. IN_AFC_EN -- AFC ENABLE

This signal activates the Analog Feed Control (AFC) function.


The effect of the analog feed control feature is the feed rate is controlled via an
external analog signal that is provided to the CNC.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Analog Feed Control is disabled
1 Analog Feed Control is enabled

There are several machine parameters involved in the configuration of the


Analog Feed Control feature and they are in the AnalogFeedControl group.

This feature (as well as the configuration of the machine parameters for this
feature) is described in the Start Up Manual.

PLC Interface Manual


page 74 / 304
MACHINEMATE®

2.3.1.9. IN_BLOCK_DEL, IN_BLOCK_DELn – BLOCK DELETE ON OR


OFF

These signals allow the PLC to activate or deactivate the Block Delete (/) mode
in the CNC.

These two signals interact with the feature’s activation from the CNC’s operator
interface (MMI). The chart below illustrates the effects of these two signals.

IN_BLOCK_DEL IN_BLOCK_DELn Description


FALSE FALSE PLC has no influence on this mode. The
MMI command is enabled.
FALSE TRUE PLC deactivates the “Block delete (/)" mode
(it is OFF). The MMI command is disabled.
TRUE FALSE PLC activates the "Block delete (/)” mode (it
is ON). The MMI command is disabled.
TRUE TRUE PLC does not command a mode change
(i.e., the actual mode will be unchanged)
and the MMI command is disabled.

The signal ON_BLOCK_DEL (see 2.4.1.27) contains the current CNC mode
setting.

2.3.1.10. IN_G01_OVER, IN_G01_OVERn – G01 OVERRIDE ON OR OFF

These signals allow the PLC to activate or deactivate the G01 Override mode
in the CNC.

These two signals interact with the feature’s activation from the CNC’s operator
interface (MMI). The chart below illustrates the effects of these two signals.

IN_G01_OVER IN_G01_OVERn Description


FALSE FALSE PLC has no influence on this mode. The MMI
command is enabled.
FALSE TRUE PLC deactivates the “G01 override” mode (it is
OFF). The MMI command is disabled.
TRUE FALSE PLC activates the "G01 override” mode (it is
ON). The MMI command is disabled.
TRUE TRUE PLC does not command a mode change (i.e.,
the actual mode will be unchanged) and the
MMI command is disabled.

The signal ON_G01_OVER (see 2.4.1.26) contains the current CNC mode
setting.

PLC Interface Manual


page 75 / 304
MACHINEMATE®

2.3.1.11. IN_FORWARD, IN_BACKWARD – NC PROGRAM BLOCK


PROCESSING DIRECTION

These signals allow the PLC to direct the CNC to process the NC blocks in the
program in the forward or backward direction.
These two signals interact with the Backward feature’s activation from the
CNC’s operator interface (MMI). The chart below illustrates the effects of these
two signals.

IN_FORWARD IN_BACKWARD Description


FALSE FALSE PLC has no influence on this mode. The MMI
Backward command is enabled.
FALSE TRUE PLC commands backward block processing. The
MMI Backward command is disabled.
TRUE FALSE PLC commands forward block processing. The
MMI Backward command is disabled.
TRUE TRUE PLC does not command the direction for block
processing and the MMI Backward command is
disabled.

The signal ON_BACKW (see 2.4.1.21) contains the current CNC mode setting.
In the cases where running a program backward is not acceptable the choices
are either the PLC always has IN_FORWARD set to true or the soft key is
removed from the CNC operator interface. If the Backward soft key should be
enabled only at certain times then an operator switch or a pair of M-codes
(on/off of the soft key enable) is advised.

2.3.1.12. IN_M1STOP, IN_M1STOPn – M01 OPTIONAL STOP ON OR OFF

These signals allow the PLC to activate or deactivate the M01 Optional Stop
mode in the CNC.
These two signals interact with the feature’s activation from the CNC’s operator
interface (MMI). The chart below illustrates the effects of these two signals.

IN_M1STOP IN_M1STOPn Description


FALSE FALSE PLC has no influence on this mode. The MMI
command is enabled.
FALSE TRUE PLC deactivates the M01 optional stop mode (it is
OFF). The MMI command is disabled.
TRUE FALSE PLC activates the M01 optional stop mode (it is ON).
The MMI command is disabled.
TRUE TRUE PLC does not command a mode change (i.e., the
actual mode will be unchanged) and the VMI command
is disabled.

The signal ON_M1STOP (see 2.4.1.24) contains the current CNC mode
setting.

PLC Interface Manual


page 76 / 304
MACHINEMATE®

2.3.1.13. IN_WITH_MOVE, IN_WITH_MOVEn – RUN PROGRAMS WITH OR


WITHOUT MOVEMENT

These signals allow the PLC to activate the ‘test run with movement’ or ‘test
run without movement’ modes in the CNC.

These two signals interact with the feature’s activation from the CNC’s operator
interface (MMI). The chart below illustrates the effects of these two signals.

IN_WITH_MOVE IN_WITH_MOVEn Description


FALSE FALSE PLC has no influence on this mode. The
MMI command is enabled.
FALSE TRUE PLC activates the "test run without
movement" mode. The MMI command is
disabled.
TRUE FALSE PLC activates the "test run with movement"
mode. The MMI command is disabled.
TRUE TRUE PLC does not command a mode change
(i.e., the actual mode will be unchanged) and
the MMI command is disabled.

The signal ON_WITH_MOVE (see 2.4.1.25) contains the current CNC mode
setting.

2.3.1.14. IN_PITCHERR, IN_PITCHERRn – PITCH ERROR COMP ON OR


OFF

These signals allow the PLC to activate or deactivate the ‘Pitch Error
Compensation’ mode in the CNC.

These two signals interact with the feature’s activation from the CNC’s operator
interface (MMI). The chart below illustrates the effects of these two signals.

IN_PITCHERR IN_PITCHERRn Description


FALSE FALSE PLC has no influence on this mode. The MMI
command is enabled.
FALSE TRUE PLC deactivates the “pitch error comp” mode (it
is OFF). The MMI command is disabled.
TRUE FALSE PLC activates the "pitch error comp” mode (it is
ON). The MMI command is disabled.
TRUE TRUE PLC does not command a mode change (i.e., the
actual mode will be unchanged) and the MMI
command is disabled.

The signal ON_PITCHERR (see 2.4.1.28) contains the current CNC mode
setting.

PLC Interface Manual


page 77 / 304
MACHINEMATE®

2.3.1.15. IN_IGNRMSERR – IGNORE AXIS FEEDBACK ERRORS

This signal allows the PLC to override the normal checks by the CNC for errors
in the axis feedback system. RMS represents the Rotary Measurement
System, as often the drive’s feedback system is an encoder mounted on the
axis motor. If an error is detected in the feedback system, the CNC enters into
Emergency Stop.

With some drives, there might be such problems during a start up. If the PLC
sets this bit then the CNC will ignore these errors. However, because there is
no way to reset the hardware that detects these errors, this bit must remain set
if an RMS error was detected (or an Emergency Stop will result).

Value Meaning
---------------------------------------------------------------------------------------------------
0 CNC will perform usual checks in feedback hardware
1 CNC will not perform the usual checks in feedback hardware

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 CNC will perform its usual checks in the encoder feedback hardware. If an
error is detected, an Emergency Stop will result.
1 CNC will ignore an RMS error detected by the encoder feedback hardware.

0→ 1 No direct effect.
1→ 0 No direct effect.

PLC Interface Manual


page 78 / 304
MACHINEMATE®

2.3.2. INGENERAL 2 (dword 2), general control signals 2

Several control signals, with which the PLC-PROGRAM can address basic
functions of the CNC, are summed in this dword:

Bit
1 IN_REPEAT REPEAT EDM - function
2 IN_INTERVA INTERVAL control
3 IN_INSPECT INSPECT signals
4 IN_BCDSTRB2_FWD BCD strobes during Backward program
running forward
5 IN_BCDSTRB2_BW BCD strobes during Backward program
running backward
6 Free
7 Free
8 Free
9 IN_MIRR_STROBE Mirroring Strobe signal
10 IN_PLC_NO_RETREAT PLC Axis move requires no retreat signal
11
... Free
16
17 IN_DIS_ENABLE Distance control signal
18
... Free
32

The individual signals can be set to 0 or 1 independent from each other and are
separately described below.
Note: The signal for bit 10 was added in CNC version 2.1 so it did not exist in
earlier versions. The signals for bits 4 and 5 were added in CNC version 2.3 so
they did not exist in earlier versions.

2.3.2.1. IN_REPEAT -- EDM Repeat

This signal is reserved for an EDM application.

2.3.2.2. IN_INTERVA -- EDM Interval

This signal is reserved for an EDM application.

2.3.2.3. IN_INSPECT -- EDM Inspect

This signal is reserved for an EDM application.

PLC Interface Manual


page 79 / 304
MACHINEMATE®

2.3.2.4. IN_MIRR_STROBE -- MIRRORING STROBE Signal

This signal tells the CNC when the mirroring control signals (see chapter
2.3.14, IN_MIRROR (dword 14)) are valid.

Value Meaning
---------------------------------------------------------------------------------------------------
0 CNC will ignore the IN_MIRROR inputs
1 CNC will act on the IN_MIRROR input signals

2.3.2.5. IN_PLC_NO_RETREAT -- PLC Axis Move of IPO Axis


Requires No Retreat

This signal is used in conjunction with the MOVE_INTERPOLATING_AXIS


function (see 3.20) that allows the PLC to move an interpolating axis (i.e., an
axis normally moved by a part program command, to be interpolated with the
other axes in the program) to a specified position.

The normal operation for the CNC with this PLC function is that when the PLC
has indicated it has completed its commands for this axis, the CNC will return
that axis to its position prior to the PLC activity. By setting this signal, which is a
command not to return the axis to its prior position, the CNC will not perform
that subsequent axis motion.

Note: The ‘retreat’ condition is synonymous with the ‘axes will return to the
programmed path’ condition.

Value Meaning
---------------------------------------------------------------------------------------------------
0 CNC will return to path any of the interpolating axes that had been moved by
the PLC
1 CNC will not return to path any of the interpolating axes that had been
moved by the PLC; the axes will remain where the PLC had moved them

Note: If IN_PLC_NO_RETREAT is set in an NC block when the IN_IPOMVMT


(see 2.3.16) action is initiated, at the end of the block the CNC will repeat the
NC block because it will evaluate the axis positions again before continuing
with the next NC block in the part program. Therefore it is critical that the PLC
logic evaluate whether the axes must be moved because if the PLC repeats
that axis move(s) again then the block will remain in this endless loop (moving
to the same target position(s) each time the block is repeated). If the
IN_IPOMVMT action is initiated in response to an M-code in the block then the
M-code’s PLC processing must recognize this repeat of the NC block when
IN_PLC_NO_RETREAT is set to TRUE and one or more interpolating axes are
moved in the block.

PLC Interface Manual


page 80 / 304
MACHINEMATE®

Also, a G10 (the G-code that prevents the block look ahead beyond its block) is
always required in the NC block after the NC block that performs the
IN_PLC_NO_RETREAT action with IN_IPOMVMT because the CNC will be
checking the axis positions at the end of the block and the block look ahead
should be inhibited for this activity.

2.3.2.6. IN_DIS_ENABLE -- Distance Control Enable

This signal is used in a Distance Control application.


The effect of Distance Control regulation is that the distance between the tool
tip and the work piece is regulated to a constant value when a programmed
path is traveled. This enables compensation of deviations in the actual work
piece geometry from the programmed work piece geometry. This feature
requires an analog input signal to the CNC that provides the distance between
the tool tip and the work piece. The path information is provided via NC
program parameters.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Distance control regulation is disabled
1 Distance control regulation is enabled (but its operation requires
activation via a BCD code)

Distance control regulation is performed if the distance control regulation


function is enabled by the configured BCD code and the value of this signal,
IN_DIS_ENABLE, is TRUE. This state-signal has no meaning without the
activation of distance regulation function through the activation BCD code that
is configured by the machine parameter DistContrMCodeOn in the
DistanceControl group.

This signal is ignored by the CNC unless this PLC signal has been enabled by
the machine parameter DistSignalByte in the same group. If that parameter is
0 then the Distance Control feature is managed only by the part program (the
feature’s M-codes for on/off and G-code for its vector).

If the signal IN_DIS_ENABLE is set to FALSE then the compensation value


built up by then is maintained. However distance control regulation is no longer
performed and the monitoring of the input analog voltage is stopped.

There are several machine parameters involved in the configuration of the


Distance Control feature and they are in the DistanceControl group.

PLC Interface Manual


page 81 / 304
MACHINEMATE®

2.3.3. IN_DRIVEON (dword 3), control loop enable signals


In this dword the enable-signals for the axis position control loops of the CNC
are summed for all axes, up to a maximum of 32:
Bit
1 IN_DRON01 DRIVE ON 1st axis
2 IN_DRON02 DRIVE ON 2nd axis
3 IN_DRON03 DRIVE ON 3rd axis
4 IN_DRON04 DRIVE ON 4th axis
...
32 IN_DRON032 DRIVE ON 32nd axis

The individual axis position control loops, apart from those at gantry axes, are
independent of each other. The individual signals can therefore be treated
separately.
These signals are mainly used if the axis position control loops have to be
opened without an EMERGENCY STOP state, e.g., at clamped axes.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Open position control loop
1 Close position control loop

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 - Open the position control loop of the axis and thus output 0 volt at the
D/A- output of the axis (Analog) or Stop updating Position or
Velocity command (Sercos).
- If the EMERGENCY STOP locking is not active, the display DRIVE
ON MISSING appears in the lines of the header of the screen for
MANUAL and AUTOMATIC when this signal is 0 for an axis.
- If the test operation "without motion" is not active, the signals
ON_INP01..32 (in-position, see chapter 2.4.4 "dword 5") of the
concerned axis receives the value 1 and the machine's position of
the concerned axis is displayed on the monitor instead of the set
position.
1 Position control loop is closed for this axis.
0→ 1 - If the EMERGENCY STOP locking (see chapter 2.3.1.1 "dword 1,
INEMERGENCn ") in the CNC is not active, the geometric
preparation is synchronized with the final read in machine positions
of all axes.
- If additionally, the test operation "without motion" is not active the
control loop of the concerned axis is closed and all axes are
regulated to their final read in machine positions, provided that their
control loops are closed.
1→ 0 No other effect.

Note:
• With gantry axes a missing position control loop enable of the
leading axis also works on the slave axis and vice versa.

PLC Interface Manual


page 82 / 304
MACHINEMATE®

• In the CNC-operating modes AUTOMATIC-next block,


AUTOMATIC-single mode and AUTOMATIC-Manual-NC a value
change 0 → 1 may only appear if no NC blocks have been
processed yet or if the M-code for closing the position control
loops is programmed in the active NC block.

The machine parameter DriveOnAppl (in the AxisControl group)


identifies specific M-code used in the PLC for this manipulation of
the IN_DRONxx signals. This machine parameter is very
important for the PLC to change these signals to the CNC during
an active NC block. This parameter is not important if the PLC
only changes these signals during emergency stop transitions
(when there is no active NC block due to the control reset
recovery mechanism).

• This machine parameter is very important. Otherwise the


synchronization of the geometry preparation and the subsequent
non-execution of the already prepared NC blocks can give rise to
error messages in the CNC and to travel movements and
switching conditions in the machine which were not anticipated
by the programmer of the NC Program!

• Typically the drive is checked for a ready condition before closing


the position loop for the axis. With SERCOS drives, the signals in
ONREADY (SERCOS drive ready signals) indicate the individual
drives are ready (see chapter 2.4.9 "dword 10"). For analog
drives, a discrete input signal would be required.

• The signal ON_NO_CNTR (no feedback control, see chapter


2.4.1.12 "dword 1") is not influenced by the position control loop
enable signals.

• Even if the position control loop of an axis is opened, this axis


can be interpolated in the CNC-operating modes MANUAL and
AUTOMATIC. In this case the CNC handles the concerned axes
with a following error of 0.

• The set value output for the spindle is not influenced by a position
control loop enable signal.

• This signal is set to close the position control loop for a stepper
axis.
With an analog axis, there is typically an 24V output to the drive to enable its
operation, for it to follow the analog voltage representing the required velocity.
With a SERCOS axis, this signal represents that enable signal to the drive, for
it to follow the new axis position command.
Since the status of ‘Drive On Missing’ will occur with an open-loop axis (like a
position only axis, such as on a clamp) or with an indexing axis that is
intermittently switching between open loop and closed loop, it might be
desirable for the PLC to prevent this ‘Drive On Missing’ status on the display. If
the BOOL variable named PLC_PRG.DriveOnLock (that variable in that POU;
see chapter 6.1) is set to TRUE (or 1) then the CNC will inhibit that particular
status from the Manual and Automatic mode displays. This interface signal
became available starting in CNC version 2.2.8.

PLC Interface Manual


page 83 / 304
MACHINEMATE®

2.3.4. IN_DRIVEEN (dword 4), FEED enable signals

In this dword the enable signals for axis-interpolation outside the path
interpolation are summed for all axes, to a maximum of 32:
Bit
1 IN_DREN01 FEED ENABLE 1st axis
2 IN_DREN02 FEED ENABLE 2nd axis
3 IN_DREN03 FEED ENABLE 3rd axis
4 IN_DREN04 FEED ENABLE 4th axis
...
32 IN_DREN032 FEED ENABLE 32nd axis

The individual feed rate enable signals are independent of each other and can
therefore be treated separately.

These signals can also be used to control, with the corresponding preset via
setup data, the motion sequence of the axes in Manual Mode, such as at the
homing cycle depending on the current machine state of the PLC Program (see
chapter 2.3.5 "dword 5, IN_HOMING").

Value Meaning
---------------------------------------------------------------------------------------------------
0 Single axis interpolation blocked
1 Single axis interpolation enabled

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 Prevents the single axis interpolation of the concerned axis.
1 No direct effect.

0→ 1 If the concerned axis is to be interpolated in a single axis interpolation


and the signal ON_CYCLEON has the value 1, then the interpolation is
executed and the axis will move.

1→ 0 If the concerned axis is interpolated in a single axis interpolation, the


interpolation and the axis is stopped via the preset deceleration ramp.

Note:
• In the AUTOMATIC CNC operating modes of the CNC the feedrate
enable signals only work on positioning axes or if a programmed
homing (G74) is active. In Automatic mode, the IN_DRENxx signals
will not prevent axis motion except for a positioning axis. To stop
axis interpolation in Automatic mode, use the signal IN_ENABLE
(see chapter 2.3.1.5 "dword 1").
• In the Manual operating mode, the IN_DREN01..32 signals will
prevent the axis motion.
• The IN_DREN01..32 (feed rate enable) signals also work if the test
operation "without motion" is active.
• The signal ON_CYCLEON (see chapter 2.4.1.1 "dword 1") is not
PLC Interface Manual
page 84 / 304
MACHINEMATE®

influenced by the feed rate enable signals.


• The set value output for the spindle is not influenced by a feed rate
enable signal.
• With SERCOS drives, the signals in ONCONTROL (SERCOS
axis control state signals) indicate the individual drives have their
position loop closed and so are ready to be moved (see chapter
2.4.12 "dword 13").

2.3.5. IN_HOMING (dword 5), homing control signals

This function has a significance only for analog axes.


In this dword the homing control signals are summed for all axes, with a
maximum of 32 axes:

Bit
1 IN_HOME01n HOMINGn 1st axis
2 IN_HOME02n HOMINGn 2nd axis
3 IN_HOME03n HOMINGn 3rd axis
4 IN_HOME04n HOMINGn 4th axis
...
32 IN_HOME32n HOMINGn 32nd axis

These signals are used to control the homing of each axis by the CNC. They
assumed to be “active low” signals (usually obtained from a normally closed
input switch). They indicate the state of the homing input and are usually only
passed through to the CNC and not interpreted by PLC logic.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Home input switch active
1 Home input switch not active

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
The effects of the signal state on the CNC depend on the current state
the respective homing cycle.

Note:
• Each signal works if the homing cycle of the respective axis is
active. The machine parameter RefAxesAppl (in the
ReferencePointCycle group) configures which axes require
homing. The other parameters in this group define how the
respective axes are homed (e.g., the direction and velocity) and
in which order.

The machine parameter RefAddressAppl (also in the

PLC Interface Manual


page 85 / 304
MACHINEMATE®

ReferencePointCycle group) is usually 0 for each axis, defining


the home switch input comes from the PLC (via the above
signals) rather than the CNC directly reading a specified input
byte number.

2.3.6. IN_SWLIMIT (dword 6), axes software limits

In this dword, the control state signals for the second set of software limits are
summed, with a maximum of 32 axes:
Bit
1 IN_LIMIT01 Switch to second software limits 1st axis
2 IN_LIMIT02 Switch to second software limits 2nd axis
3 IN_LIMIT03 Switch to second software limits 3rd axis
4 IN_LIMIT04 Switch to second software limits 4th axis
...
32 IN_LIMIT32 Switch to second software limits 32nd axis

These signals are used to switch to a second pair of software limits for each
axis. Each axis can be set individually.
Further, with a machine parameter it will be decided whether these switches
are only effective in manual operating mode or also in automatic operation
mode.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Do not switch to the second pair of limits
1 Switch to the second pair of software limits for the indicated axis

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 The first (standard) pair software limits for this axis is effective.
1 The second pair of software limits for this axis is effective.

Note:
• The required machine parameters are :
SoftwareLimitPlus, SoftwareLimitMinus,
SoftwareLimitPlus2, SoftwareLimitMinus2 (these four
are in the AxisControl group; there are two sets of travel
limits for each axis).

PLC Interface Manual


page 86 / 304
MACHINEMATE®

2.3.7. IN_STRTPOS (dword 7), positioning axes control


signals

In this dword the control signals are summed for a maximum of 5 positioning
axes:
Bit
1 IN_POS_01 START 1st POS.AXIS
2 IN_POS_02 START 2nd POS.AXIS
3 IN_POS_03 START 3rd POS.AXIS
4 IN_POS_04 START 4th POS.AXIS
5 IN_POS_05 START 5th POS.AXIS
6
Reserved
32

These signals are used to execute the NC blocks of the individual positioning
axes that have been put in the positioning memory. Each positioning axis can
be treated separately.
The control of a positioning axis is slightly different whether the command for
the positioning axis comes from the positioning axis memory (i.e., a series of
part program statements, that are activated by a block with G188 in the main
program) or from the PLC application function MOVE_POSITIONING_AXIS.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Do not process positioning memory
1 Process positioning memory

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 - No NC block exchanges can be performed in the positioning memory
of the respective positioning axis, the processing the positioning
memory is interrupted, when the active NC block is terminated.

This effect (of inhibiting a block exchange in the positioning memory)


corresponds to that of the signal IN_TRANSF (transfer enable, see
chapter 2.3.1.4 "dword 1") for path axes.

When the command for the positioning axis is from


MOVE_POSITIONING_AXIS, this 0 value prevents the command
from becoming active (i.e., the 1 value makes it active).

1 When the positioning axis is getting its command from positioning axis
memory, then this value enables subsequent blocks to be processed
(just like IN_TRANSF). Note that with this signal at 1, the IN_START
and IN_STOPn signals will resume and feed hold, respectively, the
positioning axis motion (just like for interpolating axis motion since
both motions get their commands from part program statements).
PLC Interface Manual
page 87 / 304
MACHINEMATE®

When the command for the positioning axis is from


MOVE_POSITIONING_AXIS, this 1 value allows the motion to
continue to its completion (i.e., the 0 value after the motion has
begun will halt the motion and will cancel the command).

0→ 1 If the positioning memory of the respective positioning axes is filled and its
processing is enabled, but has not yet been started, then

- the processing from the positioning memory is started;

- NC block exchanges in the positioning memory are performed;

- NC blocks of the positioning axis are executed;

- the signal ON_CYCLEON (see chapter 2.4.1.1 "dword 1") receives the
value 1.
This effect corresponds to that of the signal IN_START (NC cycle start,
see chapter 2.3.1.2 "dword 1") for the processing of NC Programs for
path axes.

- If the processing of the positioning memory of the respective


positioning axis was active, the signal ON_CYCLEON (see chapter
2.4.1.1 "dword 1") has the value 1 and the active NC block of the
positioning axis is already terminated, then an NC block exchange is
made in this positioning memory and the next NC block of this
positioning axis is executed
This effect corresponds to that of the signal IN_TRANSF (transfer
enable, see chapter 2.3.1.4 " dword 1") for path axes.

1→ 0 No other effect.

Note:
• If the positioning axis is jogged, homed or moved via an external
operating mode selection, the movement command from the PLC
will be deleted and new PLC commands will be ignored as long
as this axis is selected for movement.
• When the positioning axis movement is initiated via
IN_POS_01..05, the movement commands come from the CNC
positioning axis stack. New PLC movement commands will be
delayed until all CNC-stack moves are completed.
• During the movement of a positioning axis through the stack of
NC blocks, the signal ON_POS_01..05 (see chapter 2.4.6 "dword
7") will be set when the G98 block is encountered.
• During the active command for a positioning axis, the appropriate
signal ON_CMNDP01..32 or ON_CMNDM01..32 (see chapter
2.4.13 "dwords 15,16") will be set indicating the polarity of the
active motion.
• When the positioning axis command has reached its end
position, the appropriate ON_INP01..32 signal (see chapter 2.4.4
"dword 5") will be set to indicate the axis is in position.

PLC Interface Manual


page 88 / 304
MACHINEMATE®

2.3.8. IN_CYCLEB (dword 8), cycle input signals

In this dword the 8 input signals are summed, which can be evaluated with the
NC part program cycle instruction IB (Input-Byte):

Bit
1 IN_CYCB_01 Cycle Output to CNC Bit 1
2 IN_CYCB_02 Cycle Output to CNC Bit 2
3 IN_CYCB_03 Cycle Output to CNC Bit 3
4 IN_CYCB_04 Cycle Output to CNC Bit 4
5 IN_CYCB_05 Cycle Output to CNC Bit 5
6 IN_CYCB_06 Cycle Output to CNC Bit 6
7 IN_CYCB_07 Cycle Output to CNC Bit 7
8 IN_CYCB_08 Cycle Output to CNC Bit 8
9
... Reserved
32

These signals can be scanned by the part program as cycle parameters and
are used for the controller of the NC program. The effect of the individual
signals in the CNC is therefore dependent on the currently active cycle
program.
If the CNC requires a real-world digital input signal, typically it can read it
directly (after the feature is configured using the machine parameters in the
ProbingLogic group for inputs used for probing where an M-code is assigned to
each of 16 possible inputs in two defined byte numbers or machine parameters
in the CycleParameter group for an input directly from a single byte number
using the IBx syntax in a cycle block) rather than getting it through the PLC
using these signals.
Note that if the machine parameter WCycleByteNo defines an input byte
number for the cycle block IB syntax (so the CNC reads an input byte directly
th
for the part program, where IB1 is the 1st bit in that byte and IB8 is the 8 bit in
that byte) then the PLC interface signals above are ignored by the CNC.

Further information about this can be found in the NC Programming Manual, in


the chapter about general cycle programming (regarding the use of the CNC
part program cycle parameters).

PLC Interface Manual


page 89 / 304
MACHINEMATE®

2.3.9. IN_EXTMODE (dword 9), external CNC mode control


signals
This dword is divided in two different word (16 bits). The first word (bit 1 ... 16)
defines the external CNC operation mode selection and the second word (Bit
17 ... 32) defines the external program selection.

2.3.9.1. External CNC operating mode control signals (word 1)

With this word the PLC Program can initiate the function "External CNC-
operating mode" (ext. o. m.) of the CNC.

Bit
1 IN_EXT_01 External Operating Mode Bit 1
2 IN_EXT_02 External Operating Mode Bit 2
3 IN_EXT_03 External Operating Mode Bit 3
4 IN_EXT_04 External Operating Mode Bit 4
5 IN_EXT_05 External Operating Mode Bit 5
6 IN_EXT_06 External Operating Mode Bit 6
7 IN_EXT_07 External Operating Mode Bit 7
8 IN_EXT_08 External Operating Mode Bit 8
9 IN_EXT_09 External Operating Mode Bit 9
10 IN_EXT_10 External Operating Mode Bit 10
11
... Reserved
16

Besides the selection of CNC-operating modes an external manual operating


mode and addition-functions like "homing" and "manual enable" can also be
realized. This word is not binary encoded, but the meaning of the individual bits
depends on the value of the other bits in this dword. Therefore this word must
always be treated as whole.
The information about word 1 of dword 9 in this chapter is arranged into
following points:

• Basic functions
• External manual operation
• External CNC operating mode selection

The CNC output signals of this word, external CNC operating mode state
signals, display replies of the CNC to requests of the PLC for the function.
These output signals are thus positioned in direct connection with the input
signals and are therefore also described here.

PLC Interface Manual


page 90 / 304
MACHINEMATE®

2.3.9.1.1. Basic functions

The function "External CNC-operating mode" has 3 basic conditions:


- Inactive
- external manual operation active
- external CNC operating mode selection active

Which basic condition is active is determined by the 3 lowest value bits.

Coding:

10 9 8 7 6 5 4 3 2 1 Bit
X X X X X X X
0 0 0 = Inactive
X X 1 = External manual operation
active
1 1 0 = External CNC operating
mode selection active

The bit assignment of the first CNC output word of dword 9 (ONEXTMODE,
see 2.4.8) corresponds exactly to that of the first input word of dword 9, so that
this and the following displays of the word are always valid for both directions.

In this output word (i.e., the CNC's reply in ONEXTMODE), the same bits as in
the input word (i.e., the request of the PLC) have the value 1 if the function
requested by the input was activated.
Therefore it is generally valid:

Output word not equal to input word:


Function not yet or not yet completely active
Output word equal to input word:
Function completely active and/or acknowledged

What is not yet active in the 1st case, can be recognized from those bits that
have a different value in the output word as in the input word.

The function external CNC-operating mode has a higher priority than operator
inputs. Therefore the CNC can be "forced" into a certain CNC-operating mode
via this PLC function even if the operator tries to change the CNC-operating
mode.

PLC Interface Manual


page 91 / 304
MACHINEMATE®

2.3.9.1.2. External manual operating mode

With this basic function the following can be activated:


- Switching the CNC to the CNC operating mode MANUAL-hand
operation.
- Selection of an axis in this operating mode
- Preparation of this axis for positioning with the electronic hand
wheel with one of 4 preset hand wheel increments
- Continuous positioning of this axis in both directions with one of 4
preset feed stages
- Incremental positioning of this axis in both directions with one of
4 preset increments
The type of process is selected with bit 2 and 3, the hand wheel evaluation
element and the feed stage are selected with the bits 4 and 5, and the axis is
selected with the bits 6-10. A table with the complete coding can be found on
the next page.

The selection of a axis motion for either continuous positioning or incremental


positioning is accomplished via the external CNC operating mode selection
(see 2.3.9.1.3). This selection becomes modal so that if another axis is
specified for the motion, that motion is done in that same mode (i.e.,
continuous or incremental). The feedrate override value applies to the motion
for the continuous positioning activation (e.g., the override at 0% will hold that
motion).

PLC Interface Manual


page 92 / 304
MACHINEMATE®

Coding:

10 9 8 7 6 5 4 3 2 1

1
0 0 = no positioning
0 1 = positioning to +
1 0 = positioning to –
(continuous or
incremental;see
2.3.9.1.3)
1 1 = Positioning with
handwheel

By previously selected continuous positioning:


0 0 = 1st feed stage
0 1 = 2nd feed stage
1 0 = 3rd feed stage
1 1 = 4th feed stage

By previously selected incremental positioning:


0 0 = 1st jog increment
0 1 = 2nd jog increment
1 0 = 3rd jog increment
1 1 = 4th jog increment

By positioning with hand wheel:


0 0 = 1st hand wheel factor
0 1 = 2nd hand wheel factor
1 0 = 3rd hand wheel factor
1 1 = 4th hand wheel factor

10 9 8 7 6 5 4 3 2 1

0 0 0 0 0 = 1st axis
0 0 0 0 1 = 2nd axis
0 0 0 1 0 = 3rd axis
0 0 0 1 1 = 4th axis
0 0 1 0 0 = 5th axis
0 0 1 0 1 = 6th axis
... ... ... ... ... .......
1 1 1 1 1 = 32nd axis

PLC Interface Manual


page 93 / 304
MACHINEMATE®

Examples:

Desired function Bit in the input word


10 9 8 7 6 5 4 3 2 1
The 4th axis is continuously
positioned with the 2nd feed rate 0 0 0 1 1 0 1 1 0 1
stage in minus direction
= 6DH = 109

The 1st axis is continuously positioned


with the 1st feed rate stage in positive 0 0 0 0 0 0 0 0 1 1
direction
= 3H = 3

The 2nd axis with the 3rd feed rate


stage is selected but not positioned 0 0 0 0 1 1 0 0 0 1
= 31H = 49

Prepare the 3rd axis for positioning


with the hand wheel with the 3rd hand 0 0 0 1 0 1 0 1 1 1
wheel evaluation element
= 57H = 87

Prepare the 8th axis for positioning


with the hand wheel with the 4th hand 0 0 1 1 1 1 1 1 1 1
wheel evaluation element.
= 0FFH = 255

Deselect external manual operation 0 0 0 0 0 0 0 0 0 0

= 0H = 0
Notes:
• The function is first executed when the same bit patterns are
returned via the output word (ONEXTMODE) as were in the input
word (IN_EXTMODE).
The reply can be made under some conditions that the individual
bits are not set immediately (e.g., if the current state must be
terminated before the next state can become active).
It is therefore recommended to monitor the execution of a
function over a time that is appropriate for the particular
application.

• For the continuous positioning via ExtMode (either + or -), the


feed rates for the four feed stages (bits 4 and 5) are configured in
the machine parameter ExtModeManFeed in the PLCFunctions
group. The values in this parameter define a percentage of the
jogging feed rate. The values for this machine parameter typically
range from 100 to 10000, representing from 1% to 100% of the
SAxisFeedAppl manual jog rate value. The actual limit for this
parameter is 65535, allowing up to 655% of the manual jog rate,
but not exceeding the maximum feed rate for the axis.

PLC Interface Manual


page 94 / 304
MACHINEMATE®

Note: IN_OVERRIDE takes priority over the feed stage selection.


For the feed stage to be active IN_OVERR01 must be FALSE.

For the incremental positioning via ExtMode (either + or -), the


four jog increments (bits 4 and 5) are configured in the machine
parameter ExtModeJogInkr in the PLCFunctions group. These
factors are often 1, 10, 100 and 1000 for the most common jog
increments.

For the handwheel positioning via ExtMode (either + or -), the


four handwheel factors (bits 4 and 5) are configured in the
machine parameter ExtModeHandwheelFeed in the
PLCFunctions group. These factors are often 1, 10, 100 and
1000 for the most common handwheel increments.

• When using the handwheel jog by the PLC (i.e., IN_EXTMODE


bits 1, 2, 3 are all set to 1/TRUE) the PLC must indicate to the
CNC when the handwheel action is no longer desired. Otherwise
the selected axis will still move when the handwheel is turned
even if the PLC sets IN_EXTMODE to be 0. The PLC should set
the ‘no positioning’ mode (i.e., IN_EXTMODE := 1) before setting
the no command mode (i.e., IN_EXTMODE := 0) when the active
PLC handwheel action is cancelled.

• The external operating mode command for no positioning (value


of 1) will result in the operator display changing to that mode, if
possible (depends on what mode or dialog is active at the time).
The no positioning command is also used for multiple axis
jogging (see IN_JPLS and IN_JMNS, 2.3.20 and 2.3.21).

• If the requested function is not executed, the following causes


should be considered:
The function is not available if:
- "Positioning with hand wheel" is requested but the
controller has no hand wheel.
- An axis is selected which is not available.

• If the IN_EXTMODE remains non-zero, it continues to be a


command to the CNC. For example, if IN_EXTMODE stays at a
value of 1 the CNC has a command to remain in Manual mode. If
the operator tries to change the display to Automatic mode by
selecting that front panel button (or by clicking on that button on
the display) the CNC will not change modes because the PLC
command takes priority over the operator selection.

Beware leaving IN_EXTMODE non-zero unless required to do so


by its function. A value of 0 means no command to the CNC.

If an EMERGENCY STOP to the CNC is active (see chapter 2.3.1.1,


INEMERGENCn), then no selection of axes and no positioning will be possible.
If the feed enable all axes to the CNC is not active (see chapter 2.3.1.5,
IN_ENABLE), if the axis feed enable signal is not active for the particular axis
(see 2.3.4, IN_DRIVEEN) or if the feed hold signal is active (see 2.3.1.3,
IN_STOPn) then no axis positioning is possible.

PLC Interface Manual


page 95 / 304
MACHINEMATE®

If the signal ON_CYCLEON (see chapter 2.4.1.1) has the value 1, then no
changing of the CNC-operating mode or of the axis selection is possible.

2.3.9.1.3. External CNC operating mode selection

The following can be activated with this basic function:

1) Activation of the additional functions


- Control reset
- Manual enable (hand release)
- Jog mode to continuous positioning
- Jog mode to incremental positioning
- Retreat (return to interrupted part program path)

2) Switching of the CNC to the CNC-operating mode


- MANUAL homing
- AUTOMATIC next block
- AUTOMATIC single mode

3) Selection of the homing cycle of a single axis in the CNC-


operating mode MANUAL homing.

The CNC operating mode or additional function is selected with bit 4 and 5, the
axis or the additional function itself is selected with the bits 6 to 10.
The operating mode selection of either ‘move continuous’ or ‘move incremental’
with bits 6 to 10 does not result in the corresponding motion for any axis. The
motion will occur only when commanded as defined in the external manual
operating mode (see 2.3.9.1.2) that defines both the axis and the direction for
the motion.
A table with the complete coding follows.
Coding:

10 9 8 7 6 5 4 3 2 1

1 1 0

0 0 = Additional function
0 1 = CNC operating mode
HOMING
1 0 = CNC operating mode
AUTOMATIC
single block (22d)
1 1 = CNC operating mode
AUTOMATIC
sequential block (30d)

With additional function:

PLC Interface Manual


page 96 / 304
MACHINEMATE®

0 0 0 0 0 = Ctrl Reset (initial state) (6d)


0 0 0 0 1 = Hand release (38d)
0 0 0 1 0 = Move continuous (70d)
0 0 0 1 1 = Move incremental (102d)
0 0 1 0 0 = Retreat activation (134d)
0 0 1 0 1 = Retreat deactivation (166d)
0 0 1 1 0 = Manual positioning activation
in AUTOmatic mode (198d)
0 0 1 1 1 = Manual positioning deactivation
in AUTOmatic mode (230d)
0 1 0 0 0 = without meaning
... ... ... ... ... .......
1 1 1 1 1 = without meaning

with HOMING mode (14d):

0 0 0 0 0 = homing cycle 1st axis


0 0 0 0 1 = homing cycle 2nd axis
0 0 0 1 0 = homing cycle 3rd axis
0 0 0 1 1 = homing cycle 4th axis
0 0 1 0 0 = homing cycle 5th axis
0 0 1 0 1 = homing cycle 6th axis
0 0 1 1 0 = homing cycle 7th axis
... ... ... ... ... .......
1 1 1 1 1 = homing cycle 32nd axis

Examples:

Desired function Bit in the input word


10 9 8 7 6 5 4 3 2 1
Select CNC-operating mode
AUTOMATIC next block. 0 0 0 0 0 1 1 1 1 0
= 1EH = 30

Select CNC-operating mode


AUTOMATIC single mode. 0 0 0 0 0 1 0 1 1 0
= 16H = 22

Select CNC-operating mode


MANUAL homing and the 0 0 0 0 0 0 1 1 1 0
homing cycle of the 1st axis.
= 0EH = 14

Select CNC-operating mode


MANUAL homing and the 0 0 0 1 0 0 1 1 1 0
homing cycle of the 3rd axis.
= 4EH = 78

Execute CTRL RESET


(initial state) 0 0 0 0 0 0 0 1 1 0
= 6H = 6

Turn on MANUAL enable 0 0 0 0 1 0 0 1 1 0


= 26H = 38

PLC Interface Manual


page 97 / 304
MACHINEMATE®

Note:
• The function is executed when the same bit patterns are
returned via the output word as were in the input word
The reply can be made under conditions so that the individual
bits are set first gradually. This is the case if the requested
function is executed by steps in the CNC.
It is therefore recommended to monitor the execution of a
function over a time that is appropriate for the application.

• To perform the homing of a single axis from the PLC, after the
correct IN_EXTMODE value has been set (according to the
Coding table above), the PLC must set IN_START to activate
the homing sequence for that axis. It is very important that the
proper IN_EXTMODE value is present when the IN_START
signal is set by the PLC. With IN_EXTMODE at 0 (zero) then
the setting of IN_START signal (see 2.3.1.2) while in the
MANUAL operating mode is interpreted to mean that the
complete automatic homing sequence for all mandatory homed
axes will commence (as configured by the machine parameters
in the ReferencePointCycle group).

If hand release was established (value of 38) to jog before a


home and later the PLC must perform the complete automatic
homing sequence (rather than a single axis homing command
with IN_EXTMODE), the PLC must establish the CNC homing
mode prior to the IN_START signal. This can be done by the
operator using the Manual mode soft key for Moving to
reference point. If the PLC must get to the homing mode
without the operator, then a momentary command for a homing
cycle of an axis will place the CNC in the homing mode, ready
for the IN_START to perform a complete homing sequence.

Remember that the IN_START signal becoming TRUE when


IN_EXTMODE has an axis homing cycle command results in
only that one axis homing. If IN_START becomes TRUE when
IN_EXTMODE is 0 and the CNC is in a homing mode, then the
complete automatic homing sequence for all axes commences.

• The ‘manual positioning activation in AUTOmatic mode’ is a


command from the PLC to CNC to interrupt the active part
program with a manual motion, but the active part program
should remain active. After the manual motion, the part program
can be resumed in AUTOmatic mode.
This command corresponds to the operator responding ‘no’ to
the CNC prompt – ‘do you wish to terminate the active part
program, yes/no?’ when MANUAL mode is selected during an
active part program. This external operating mode selection by
the PLC prevents that operator dialog.

• The ‘retreat activation’ is a command from the PLC to CNC to


signal a return to the active part program path upon the next
cycle start. If the operator interrupted an active part program
with a manual motion, the activation of retreat enables the CNC
to return to the original program path. This motion to the path is
executed before the active part program block.
This command corresponds to the operator making the soft key
PLC Interface Manual
page 98 / 304
MACHINEMATE®

selection. This command does not cause the motion, just the
condition. Upon the cycle start, the CNC will return to the
program path if retreat is activated. If retreat is not activated,
then the CNC resumes the program from its current axis
positions.

• The two operating mode commands (22 or 30) will result in the
operator display changing to that mode, if possible (depends on
what mode or dialog is active at the time).

• If the requested function is not executed, the following causes


should be considered:

The function is not available if:


- The homing cycle of an axis is selected which is not
available or is not mandatory homing.

- The manual enable should be switched on although the


homing of all mandatory homing axes has already been
performed.

- The homing has not yet been performed for all


mandatory homing axes. In this case switching to the
CNC operating mode AUTOMATIC next block or
AUTOMATIC single mode cannot be made.

- The signal ON_CYCLEON (see chapter 2.4.1.1 "dword


1") has the value 1.
In this case changing of the CNC operating mode other
than between AUTOMATIC next block and AUTOMATIC
single mode is not possible.

2.3.9.2. External program selection control signals (word 2)

With the second word of dword 9 the PLC Program can initiate the function
"External program selection" of the CNC:

Bit number (based on the dword)


17 IN_EXT_17 External Program Select Bit 1
18 IN_EXT_18 External Program Select Bit 2
19 IN_EXT_19 External Program Select Bit 3
20 IN_EXT_20 External Program Select Bit 4
21 IN_EXT_21 External Program Select Bit 5
22 IN_EXT_22 External Program Select Bit 6
23 IN_EXT_23 External Program Select Bit 7
24 IN_EXT_24 External Program Select Bit 8
25
... reserved
32

PLC Interface Manual


page 99 / 304
MACHINEMATE®

With this function, in the CNC operating modes AUTOMATIC next block and
AUTOMATIC single block, NC PROGRAMS can be selected from the NC
program memory of the CNC for execution. This word is not binary encoded,
but the meaning of the individual bits depends on the value of other bits of this
word. Therefore this word must always be treated as whole.

The information about word 2 from dword 9 in this chapter is arranged into
following points:
- Basic functions
- Multiplex mode
- Direct mode
- Replies of the CNC
- Error possibilities

2.3.9.2.1. Basic functions for external program selection

With the function "External program selection" NC PROGRAMS can be


selected for execution, in that the number of the desired NC PROGRAM is
entered via this word. There are two possible ways of doing this:

• the multiplex mode for all program numbers of 1 to 999999;

• the direct mode for the program numbers 1 to 79.

In direct mode an NC PROGRAM can be selected in one-step (i.e., with a


single value) while in the multiplex mode several steps are required, to submit
the individual digits of the program number.

In both modes the lowest value bit is used both on the input side as well as on
the output side as "Strobe" (i.e., the word is valid) if this bit 17 has the value 1.

Coding:

24 23 22 21 20 19 18 17 Bit no. (based on the dword 9)


X X X X X X X
0 = second word is not valid
1 = second word is valid

2.3.9.2.2. Multiplex mode for program selection

In contrast to the direct mode, the multiplex mode must be started and
terminated. This is achieved as the seven higher value bits get the value 0 or
the value 1 respectively.

PLC Interface Manual


page 100 / 304
MACHINEMATE®

After the start of the multiplex mode the program number is submitted in steps,
in that at each step a digit of the program number is submitted. It must begin
with the highest value position and end with the lowest in a complete
sequence.
Leading zeros of the program number do not have to be submitted in this
sequence.
The current position is submitted with the bits 18-20, the digit of this position is
submitted with the bits 21-24.
After the last step the multiplex mode must be terminated.
At each individual step and also at the start and end, the reply of the CNC must
be waited for before a new step can be performed. The NC PROGRAM is first
selected when the CNC has reported back the last step, the termination of the
multiplex mode, without errors. After that the function can be deselected.
Coding:
24 23 22 21 20 19 18 17

1
1 = sequential strobe

0 0 0 0 0 0 0 1 = start multiplex mode


1 1 1 1 1 1 1 1 = end multiplex mode

| | | = digits of the actual position of


the program number
0 0 0 = invalid
0 0 1 = 1st highest value position
0 1 0 = 2nd position
0 1 1 = 3rd position
1 0 0 = 4th position
1 0 1 = 5th position
1 1 0 = 6th lowest value position
1 1 1 = invalid

| | | | = digits of the actual position of


the program number
0 0 0 0 =0
0 0 0 1 =1
0 0 1 0 =2
0 0 1 1 =3
0 1 0 0 =4
0 1 0 1 =5
0 1 1 0 =6
0 1 1 1 =7
1 0 0 0 =8
1 0 0 1 =9
1 0 1 0 = invalid
1 0 1 1 = invalid
1 0 1 1 = invalid
1 1 0 0 = invalid
1 1 0 1 = invalid
1 1 1 0 = invalid
1 1 1 1 = invalid

PLC Interface Manual


page 101 / 304
MACHINEMATE®

Example: Select NC PROGRAM 436790

Desired function Bit in the input word


24 23 22 21 20 19 18 17

1st step: start multiplex mode 0 0 0 0 0 0 0 1


= 10000H = 65536

2nd step: 1st position = 4 0 1 0 0 0 0 1 1


= 430000H = 4390912

3rd step: 2nd position = 3 0 0 1 1 0 1 0 1


= 350000H = 3473408

4th step: 3rd position = 6 0 1 1 0 0 1 1 1


= 670000H = 6750208

5th step: 4th position = 7 0 1 1 1 1 0 0 1


= 790000H = 7929856

6th step: 5th position = 9 1 0 0 1 1 0 1 1


= 9B0000H = 10158080

7th step: 6th position = 0 0 1 0 0 1 1 0 1


= 4D0000H = 851968

8th step: end multiplex mode 1 1 1 1 1 1 1 1


= 0FF0000H =16711680

9th step: deselect function 0 0 0 0 0 0 0 0


= 0H = 0

Example: Select NC PROGRAM 000082

Desired function Bit in the input word


24 23 22 21 20 19 18 17

1st step: start multiplex mode 0 0 0 0 0 0 0 1


= 10000H = 65536

2nd step: 1st position = 8 1 0 0 0 0 0 1 1


= 830000H = 8585216

3rd step: 2nd position = 2 0 0 1 0 0 1 0 1


= 250000H = 2424832

4th step: end multiplex mode 1 1 1 1 1 1 1 1


= 0FF0000H =16711680

PLC Interface Manual


page 102 / 304
MACHINEMATE®

5th step: deselect function 0 0 0 0 0 0 0 0


= 0H = 0

2.3.9.2.3. Direct mode for program selection

The direct mode is always active except when the multiplex mode has been
started but not yet terminated. In this direct mode, the "units" digit of the
program number is submitted with the bits 18-21, and the "tens" digit of the
program number is submitted with the bits 22-24.
The PLC must wait for the reply of the CNC when in the direct mode before the
function can be deselected. This wait is to ensure the NC PROGRAM is
selected before the deselecting.

Coding:

24 23 22 21 20 19 18 17

| | | | = the "units" digits of the program


0 0 0 0 =0
0 0 0 1 =1
0 0 1 0 =2
0 0 1 1 =3
0 1 0 0 =4
0 1 0 1 =5
0 1 1 0 =6
0 1 1 1 =7
1 0 0 0 =8
1 0 0 1 =9
1 0 1 0 = invalid
1 0 1 1 = invalid
1 1 0 0 = invalid
1 1 0 1 = invalid
1 1 1 0 = invalid
1 1 1 1 = invalid

| | | = the "tens" digits of the program


0 0 0 =0
0 0 1 =1
0 1 0 =2
0 1 1 =3
1 0 0 =4
1 0 1 =5
1 1 0 =6
1 1 1 =7

PLC Interface Manual


page 103 / 304
MACHINEMATE®

Examples:

Desired function Bit in the input word


24 23 22 21 20 19 18 17
Select NC PROGRAM 1

Submit program number 0 0 0 0 0 0 1 1


= 30000H = 196608

Deselect function 0 0 0 0 0 0 0 0
= 0H = 0

Select NC PROGRAM 37

Submit program number 0 1 1 0 1 1 1 1


= 6F0000H = 7274496

Deselect function 0 0 0 0 0 0 0 0
= 0H = 0
Select NC PROGRAM 79

Submit program number 1 1 1 1 0 0 1 1


= F30000H = 15925248

Deselect function 0 0 0 0 0 0 0 0
= 0H = 0

2.3.9.2.4. Replies of the CNC - ONEXTMODE

The replies of the CNC are the same in the multiplex mode as in the direct
mode: If no error has occurred, the bit pattern is output which matches that
entered in the input word (i.e., IN_EXTMODE).
If an error was recognized by the CNC, the bits 18-21 of ONEXTMODE receive
the value 1. Since this is not possible in any other case, the PLC Program can
also recognize this error state and can react accordingly to the evaluation of
the bits 21-24, which specify the cause of error more precisely.
If an error appears, the function of the CNC is deselected and if necessary
must be newly restarted by the PLC Program.
The reply is given as long as the initiating input is available.

PLC Interface Manual


page 104 / 304
MACHINEMATE®

ONEXTMODE Coding:

24 23 22 21 20 19 18 17
1

1 = take over strobe


0 0 0 0 0 0 0 1 = reply start multiplex mode
1 1 1 1 1 1 1 1 = reply end multiplex mode
otherwise
1 1 1 1 1 = errors appeared
1 = handling error
1 = wrong CNC operating mode
1 = program not available
otherwise
| | | | | | | = feedback of the
input values

Error possibilities

Handling errors:
- The signal ON_CYCLEON (see chapter 2.4.1.1 "dword 1")
has the value 1. In this case no program selection is
possible.

- While the function was active, the operator also tried to


select a program.

- An invalid value was submitted as a program digit.

- In the multiplex mode: The sequence of the positions was


not observed. An invalid value was submitted for the
current position.

Wrong CNC operating mode:


- The CNC is not in the CNC operating mode AUTOMATIC
next block or AUTOMATIC single block.

- An NC PROGRAM is already active or started but not yet


terminated.

Program not available:


- No program is found with the submitted number in the NC
program memory of the CNC.

PLC Interface Manual


page 105 / 304
MACHINEMATE®

2.3.10. IN_DISABLE (dword 10), disable Sercos axes (not used)

This dword is reserved for the possible deactivation of a single Sercos axes.
This dword function is not used.

2.3.11. IN_SW_AXES (dword 11), switching axes control signals

This dword is divided in two different word (16 bits). The first word (bit 1 ... 16)
is defined for the function “switch-over spindle/rotational axes”, the second
word (Bit 17 ... 32) for the function “gear box stage selection”.

2.3.11.1. Switch-over spindle/rotational axes for 6 spindles/axes


This function is optional and is not available in all systems.

In the bits 1-6 of this dword the following control signals are summed for the
switch-over axes via the PLC:

Bit
1 IN_SWAX01 Switch-over spindle/rotational axis 1
2 IN_SWAX02 Switch-over spindle/rotational axis 2
3 IN_SWAX03 Switch-over spindle/rotational axis 3
4 IN_SWAX04 Switch-over spindle/rotational axis 4
5 IN_SWAX05 Switch-over spindle/rotational axis 5
6 IN_SWAX06 Switch-over spindle/rotational axis 6
7
... Reserved
16

In the manual operating mode the PLC can activate the operating mode
“spindle” by setting the specified bit (i.e., the bit number corresponds to the axis
number so if the 4th axis can switch over to a spindle then use IN_SWAX04 to
switch the 4th axis to its spindle configuration). The bit is scanned statically. An
axis switch-over is not possible during the operating mode of homing.
There are several machine parameters involved in the configuration of these
axes that can be switched between a spindle and a rotational axis and these
parameters are in the Spindle group.
The dword ON_SWAX (see 2.4.25) contains the current switching spindle/axis
configuration.

PLC Interface Manual


page 106 / 304
MACHINEMATE®

2.3.11.2. IN_GEAR01..06 -- Spindle gear box selection


In the bits 17-22 of this dword the following control signals for a spindle gear box are
summed:

Bit
17 IN_GEAR01 Spindle gear stage 1
18 IN_GEAR02 Spindle gear stage 2
19 IN_GEAR03 Spindle gear stage 3
20 IN_GEAR04 Spindle gear stage 4
21 IN_GEAR05 Spindle gear stage 5
22 IN_GEAR06 Spindle gear stage 6
23
... Reserved
32

Spindle gear stages

The PLC Program reports the current spindle gear stage (or gear
range) to the CNC via these 6 signals.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Relevant gear stage or gear range is not selected
1 Relevant gear stage or gear range is selected

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
≠ correct The CNC initiates a change of the spindle gear stage if it
stage recognizes that a gear stage is required.

Further information about spindle gear stages can be found if


necessary in the NC Programming Manual "automatic gear stage
selection".

Note:
• These signals are only processed if the feature "automatic gear
stage shift" is active. The feature is enabled using the machine
parameter M40Appl in the Gearbox group.

• Only one gear stage signal from the PLC may have the value 1.

2.3.11.2.1. Sequence for spindle gear changes between CNC and PLC

• The CNC switch-over procedure is initiated if the programmed


speed stage does not agree with the PLC feedback message
concerning the currently applied speed stage (via the signals
PLC Interface Manual
page 107 / 304
MACHINEMATE®

IN_GEAR01 to IN_GEAR06). Five temporary blocks are created


for this switch-over to the correct gear stage. The following is
displayed at the block display on the MMI screen:
AUTOMATICALLY INTERMEDIATED BLOCK.

• The first temporary block takes the spindle to the specified


spindle speed for gear shifting (applicable for every speed stage).
A waiting time is also computed internally for this block. Within
this waiting time, the spindle speed is output to the machine. This
speed and delay are configured by the machine parameters
ShiftingSpindleSpeed and SpindleSlopTime in the Gearbox
group (with a value for each parameter for each gear stage).
Same calculation is done for the deceleration time.

In each case (acceleration or deceleration), the time is


proportional to the programmed speed (so a full time delay
occurs when to/from maximum speed, half-time for half speed,
etc.).

• Per the gear stage, a specified acceleration time is used for


calculating the waiting time. That is the time required to
accelerate the spindle speed from 0 up to the maximum speed
for the given speed stage.

• During the second temporary block, the programmed speed


stage is output to the PLC as an M-code. The next NC block
change is suppressed as long as it takes to obtain feedback from
the gearbox via the PLC that it is in the selected speed stage
(i.e., IN_GEARxx).

• The third and fourth temporary blocks are both G10 blocks,
preventing the CNC block look ahead feature from processing
blocks beyond this spindle gear change.

• The fifth temporary block causes the spindle to accelerate to the


programmed speed. Again, a waiting time is internally computed
during which no NC block change is performed. After the delay
the normal NC block processing continues.

• With M40 programming (so M41-M46 are not used in the


program), the CNC will automatically select the correct gear
stage for the S-code in the program from the machine
parameters for the min/max speeds for each gear range and
provide the PLC with the correct M-code (M41-M46) in the
second block. With M41-M46 programming, the part program
specifies the desired gear range.

• If the operator MDI’s a M41 (to M46) with an S-code but the
spindle is stopped (i.e., M05), the M41 (to M46) is not strobed to
the PLC. Only when the spindle is running or it will start (on the
M03/M04) will the M41 (to M46) be strobed to the PLC is a gear
change is required. The same scenario occurs with a part
program if the M41 (to M46) occurs in a block before the M03
block. It is important to note that this internal management of the
spindle gear ranges is activated when the spindle is running or it
is started, not when it is stopped.

PLC Interface Manual


page 108 / 304
MACHINEMATE®

2.3.12. IN_SPINDLE (dword 12), spindle control signals


2.3.12.1. IN_NULLV01 .. 06 -- SPINDLE 0 VOLT
With these signals the PLC Program can block a set value output for the
spindles.
Bit
1 IN_NULLV01 Spindle 1
2 IN_NULLV02 Spindle 2
3 IN_NULLV03 Spindle 3
4 IN_NULLV04 Spindle 4
5 IN_NULLV05 Spindle 5
6 IN_NULLV06 Spindle 6
7
... Reserved
16

In addition to safety functions, this signal can also be used for "spindle orient"
(M19) with a spindle without feedback, so that upon engagement of the
indexing of the spindle (i.e., a shot pin), the spindle is stopped.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Spindle-set value as programmed
1 Spindle-set value is 0 volt

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 No direct effect.
1 The output of a spindle-set value not equal to 0 is prevented.

0→ 1 0 volt is output without ramp at the D/A-converter (Analog) or Stop


updating Position or Velocity command (Sercos). If thread cutting
(G33/34) or feed rate per rotation (G95) is active, then the interpolation
and the axes involved are halted with the spindle.
- with a spindle without feedback without deceleration ramp,
- with a spindle with feedback corresponding to the run out of the
spindle.

1→ 0 At the D/A-converter of the spindle the current spindle-set value is output


without ramp (Analog) or the current Position or Velocity continues
(Sercos).
If thread cutting (G33/34) or feed rate per rotation (G95) is active, then
the interpolation and the positioning of the involved axes is resumed.
- with a spindle without feedback without acceleration ramp,
- with a spindle with feedback corresponding to the starting of the
spindle.

PLC Interface Manual


page 109 / 304
MACHINEMATE®

Note: The signal is not interlocked in the CNC (there is no return signal
from the CNC) and it works unconditionally.

2.3.12.2. IN_REV_01 .. 06 -- SPINDLE REVERSE

With these signals the PLC Program can invert the sign of the set value output
for the respective spindles.

Bit
17 IN_REV_01 Spindle 1
18 IN_REV_02 Spindle 2
19 IN_REV_03 Spindle 3
20 IN_REV_04 Spindle 4
21 IN_REV_05 Spindle 5
22 IN_REV_06 Spindle 6
23
... Reserved
32

This signal can also be used for "spindle orient" (M19) with a spindle without
feedback. A continual value change of the signal rotates the spindle back and
forth and thus facilitating the engagement of the indexing mechanism.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Spindle-set value as programmed
1 Spindle-set value is inverted

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 The sign of the spindle-set value corresponds to the programmed
rotational direction.
1 The sign of the spindle-set value is opposite to the programmed direction.

0→ 1, At the D/A-converter of the spindle the output voltage is inverted without


1→ 0 ramp (Analog) or Command value is the opposite (Sercos).

Note:
• The signal is not interlocked in the CNC and works
unconditionally.

• With SPINDLE REVERSE the current direction of rotation of the


spindle is always changed. The actual, physical direction of
rotation of the spindle is therefore dependent on the programmed
spindle M-code (right-or left run) and on the value of this signal.

PLC Interface Manual


page 110 / 304
MACHINEMATE®

• If feed rate per rotation (G95) is active with a spindle without


feedback and this signal changes its value, this has no influence
on the interpolation since this operates according to the size only.

• If thread cutting (G33/34) or feed rate per rotation (G95) is active


with a spindle with feedback and this signal changes its value, this
has no fundamental influence on the interpolation as the
interpolation operates according to the size only. Since in this case
the interpolation and thus the positioning of the axes involved
however are led by the actual movement of the spindle, the
interpolation and the positioning are slowed down corresponding
to the conduct of the spindle and then they will speed up again.

2.3.13. IN_PARKING (dword 13), parking control signals

In this dword, the control state signals for the parking axes are summed, with a
maximum of 32 axes:

Bit
1 IN_PARK01 Parking 1st axis
2 IN_PARK02 Parking 2nd axis
3 IN_PARK03 Parking 3rd axis
4 IN_PARK04 Parking 4th axis
5 IN_PARK05 Parking 5th axis
6 IN_PARK06 Parking 6th axis
7 IN_PARK07 Parking 7th axis
... ... ...
32 IN_PARK32 Parking 32nd axis

The function parking axis makes it possible to uncouple an axis (especially the
rotary transducer) from the control while the CNC is in the ready state.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Parking is not active for the specified axis
1 Parking is active for the specified axis

The evaluation on the encoder wire break supervision (i.e., “loss of feedback”)
from the measuring system for a parked axis in the CNC will be suppressed
and the accompanying position feedback loop will be switched off. The pulses
of the measuring system for the parked axis will not be evaluated.
Motion commands to a parked axis will not be executed.

PLC Interface Manual


page 111 / 304
MACHINEMATE®

All parked axes will be displayed on the man-machine interface in the status
window of the menu INFO (i.e., PARK X, Z, etc.).
Reintegrated parking axes that are defined with a required home position
function will need a new homing cycle.
The CNC will synchronize after the reintegration of parked axes. This effect in
the CNC results that the blocks in the dynamic block buffer will be deleted. To
avoid this you can set the machine parameter ParkAxesAppl (in the
AxisControl group). This effects that the CNC produce dummy blocks until the
park axes will be integrated.
During the power on of the CNC, there might be the detection of the encoder
‘wire cut’ if the axis has been removed. To prevent this power up detection, the
machine parameter ParkAxesInitialState (in the AxisControl group) is
configured for each of the axes that might be parked. With this setting, during
the start phase of the CNC up to the first initial state after the restart of the
control the encoder wire break supervision for parked axes is not active. After
the first PLC scan, the signals for all parked axes must be set to the correct
states because the control reads these signals to activate the necessary
encoder wire break supervision.

The usual technique for the PLC to handle an axis becoming unparked is:
1. use IN_EXTMODE to place the CNC in manual mode (if homing is
required, then the axis will have to be homed after its reconnection),
2. make sure that the axis encoder feedback is connected (is there an
interlock signal available in the cable?) since the loss of feedback detection
will become enabled again for this axis,
3. reset (with a 0 value) the correct axis park bit (IN_PARKxx) to establish the
CNC connection to the axis.
If the axis is one to be homed, then the operator will have to home the axis
before returning to Automatic mode.

Note:
• Before uncoupling the measuring system of a parking axis the
specific park axis signal must be set.
Conversely, before resetting the park axis signals the axis
measuring system must be connected.

• The required machine parameters are: ParkAxesAppl and


ParkAxesInitialState (in the AxisControl group)

PLC Interface Manual


page 112 / 304
MACHINEMATE®

2.3.14. IN_MIRROR (dword 14), mirroring control signals

In this dword, the control state signals for the mirroring axes are summed, with
a maximum of 32 axes:

Bit
1 IN_MIRR01 Mirroring 1st axis
2 IN_MIRR02 Mirroring 2nd axis
3 IN_MIRR03 Mirroring 3rd axis
4 IN_MIRR04 Mirroring 4th axis
5 IN_MIRR05 Mirroring 5th axis
6 IN_MIRR06 Mirroring 6th axis
7 IN_MIRR07 Mirroring 7th axis
... ... ...
32 IN_MIRR32 Mirroring 32nd axis

With the function mirroring axes single axes can be mirrored.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The specified axis will not be mirrored.
1 The specified axis will be mirrored.

The signal IN_MIRR_STROBE (see chapter 2.3.2, INGENERAL2 (dword2))


tells the CNC when the mirroring control signals are valid.

The CNC will take over the mirroring signals only in the automatic operation
mode (continuous and single block) if no program is running.

The mirrored axes will still be mirrored after “initial state” by setting of the
machine parameter PLCMirrorReset (in the PLCFunctions group) (parameter
= 0 indicates the function is inactive, ≠ 0 function is active).

The mirror values will be set on the “initial state values” only when the CNC
change in the homing or manual operation mode or they will be set on new
values with suitable programming in the automatic operation mode.

Note:
• The required machine parameter is: PLCMirrorReset (in the
PLCFunctions group) to enable the feature.

PLC Interface Manual


page 113 / 304
MACHINEMATE®

2.3.15. IN_OVERRIDE (dword 15), override signals

This dword is divided in four different bytes (8 bits). The first byte (bits 1 ... 8) is
defined for the feed rate override and the second byte (bits 9 ... 16) is for the
spindle speed override. The other two bytes are free.

2.3.15.1. Feed override


With this function a value for the feed override can be selected:
Bit
1 IN_OVERR01 = 0 => this feed override inactive
= 1 => this feed override active
2 IN_OVERR02 These five
3 IN_OVERR03 bits select
4 IN_OVERR04 the feed
5 IN_OVERR05 override value
6 IN_OVERR06 from a table.
7 IN_OVERR07 Free
8 IN_OVERR08 Free

In the bits 2 .. 6 (IN_OVERR02 .. IN_OVERR06) can be entered an index on


two possible tables, in each case with 24 feed rate override percentage values.
The CNC takes in the automatic operation mode the value from the table for
the machine parameter AutoFeedoverride or in the manual operation mode
from the table for the machine parameter ManOverride. Both of these machine
parameters are in the Override parameter group.
This new value takes priority over the feed override rotary switch and of the
selected value from the external CNC operation mode selection (see chapter
2.3.9.1, IN_EXTMODE). However if G63 is active or if OverrideAppl bit 12 is
set to 1 (forcing 100%) then this dword has no effect.

Note:
• When using gray-code switches, the bit 9 (= 100H) in the machine
parameter OverrideAppl (in the Override group) must be set.

• When using switches that deliver values from 1 – 24, the bit 15 (=
4000H) in the machine parameter OverrideAppl must be set.
If the switch delivers values from 0 – 23 then bit 15 must be reset.

• The switches used (for feed override or spindle override) must be


the same, i.e., all gray-code or all linear.

• If the machine parameter AdditionKeyIOAddress (in Override


group) is 0 (meaning the CNC has no override switch to monitor),
OverrideAppl bit 12 is 0 (meaning 100% is not being forced) and
IN_OVERR01 is 0 (meaning the PLC feedrate override is not
active) then the CNC has a feedrate override percentage of 0%
so no axis motion can occur with the single exception of an
IN_EXTMODE continuous axis jog command (which defines its
own feed rate percentage, see 2.3.9.1.2).

PLC Interface Manual


page 114 / 304
MACHINEMATE®

2.3.15.2. Spindle override

With this function a value for the spindle override can be selected:

Bit
9 IN_OVERR09 = 0 => this spindle override inactive
= 1 => this spindle override active
10 IN_OVERR10 These five
11 IN_OVERR11 bits select
12 IN_OVERR12 the spindle
13 IN_OVERR13 override value
14 IN_OVERR14 from a table.
15 IN_OVERR15 Free
16 IN_OVERR16 Free

In the bits 10 .. 14 (IN_OVERR10 .. IN_OVERR14) provide an index to the


table for the machine parameter SpindleOverride that holds a table of 24
spindle override percentage values. The CNC takes the selected value from
this table. This machine parameter is in the Override parameter group.
This new value takes priority over the spindle override rotary switch and of the
selected value from the external CNC operation mode selection (see chapter
2.3.9.1, IN_EXTMODE). However if G63 is active or if OverrideAppl bit 12 is
set to 1 (forcing 100%) then this dword has no effect.

Note:
• When using gray-code switches, the bit 9 (= 100H) in the machine
parameter OverrideAppl (in the Override group) must be set.

• When using switches that delivers value from 1 – 24, the bit 15 (=
4000H) in the machine parameter OverrideAppl must be set.
If the switch delivers values from 0 – 23 then bit 15 must be reset.

• The switches used (for feed override or spindle override) must be


the same, i.e., all gray-code or all linear.

Note:
• The required machine parameters are :
PLCOverrideByteNo (in PLCFunctions group) must be set to
value 0F0Fhex for either the PLC feed override or the PLC
spindle speed override values to be effective and
SpindleOverride (in Override group) must have the table
configuration values set as needed for the desired override
percentages.

PLC Interface Manual


page 115 / 304
MACHINEMATE®

2.3.16. IN_IPOMVMT (dword 16), interpolated axis motion


control signals

In this dword, the enable signals for the movement of interpolated axes as a
result of a PLC command, outside of the part program path interpolation, are
summed, with a maximum of 32 axes:
Bit
1 IN_IPOMT01 PLC move enable 1st axis
2 IN_IPOMT02 PLC move enable 2nd axis
3 IN_IPOMT03 PLC move enable 3rd axis
4 IN_IPOMT04 PLC move enable 4th axis
5 IN_IPOMT05 PLC move enable 5th axis
6 IN_IPOMT06 PLC move enable 6th axis
7 IN_IPOMT07 PLC move enable 7th axis
... ... ...
32 IN_IPOMT32 PLC move enable 32nd axis

The individual feed enable signals are independent of each other and can
therefore be treated separately. Even if two axes are in an active parallel
arrangement moving only the master will not move the follower.
To request the movement of an interpolated axis, the PLC application must
specify the end point for the axis motion using the function
MOVE_INTERPOLATING_AXIS (see 3.18).

Value Meaning
---------------------------------------------------------------------------------------------------
0 Single axis interpolation move by PLC is not enabled.
1 Single axis interpolation move by PLC is enabled.
Value Effect in the CNC
---------------------------------------------------------------------------------------------------
0 Indicates the interpolation axis is controlled by the CNC not PLC.
1 Indicates the interpolation axis is controlled by the PLC command.

0→ 1 If the commanded axis is to be interpolated in a single axis move (as a


result of the PLC command via MOVE_INTERPOLATING_AXIS) and
the control state allows axis motion (including the axis is stopped), then
the interpolation is executed and the axis will move as commanded.
The feed rate for this motion occurs at the rapid feed rate setting for the
axis unless a rate is defined by the PLC via the function
SET_POSITIONING_FEED.
1→ 0 If the commanded axis has completed its PLC command for a single axis
move (from the PLC command MOVE_INTERPOLATING_AXIS) then
the CNC will return the axis to its original position before the PLC
command unless IN_PLC_NO_RETREAT is set. The feed rate for this
return to path motion occurs at the same feed rate used for the
programmed motion (see above).

PLC Interface Manual


page 116 / 304
MACHINEMATE®

If the axis motion is still in progress at this transition, then the axis motion
is immediately stopped via the preset deceleration ramp.
This 1->0 signal transition should occur while the CNC is not in active
interpolation. Even if the PLC commanded axis motion has completed,
the PLC should reset the IN_STOPn signal to force the condition of no
active motion (see 2.3.1.3) for the CNC to synchronize its block
processing. This reset of the IN_STOPn signal should occur before the
IN_IPOMTxx signal is reset.
If this signal is used to move an axis in the middle of an active NC block
then the IN_TRANSF must be 0 during the entire time this IN_IPOMTxx
signal is 1. This IN_IPOMTxx signal must be returned to its normal 0
state before the IN_TRANSF returns to its normal 1 state.

The reset of IN_IPOMTxx indicates to the CNC that the interpolating axis
is reverting back to its normal state as an interpolating axis. During the
time that IN_IPOMTxx is set, the CNC treats the axis as a positioning
axis (i.e., an axis whose motions come from a PLC command).
Note:
• This dword was added in CNC version 1.9 so it did not exist in
earlier versions.

2.3.17. IN_HDWHEEL (dword 17), handwheel control signals

In this dword are the respective handwheel control signals summed:


Bit
1 IN_HDAX01 Handwheel blocked/movement
2 IN_HDAX02 Handwheel axis selection
3 IN_HDAX03 Handwheel factor selection
4, 5 IN_HDAX04, 05 Handwheel factor
6 - 10 IN_HDAX06 – 10 Handwheel axis number
11
... Free
29
30 IN_HDW1_DISABLE Disable first handwheel
31 IN_HDW2_DISABLE Disable second handwheel
32 IN_HDW3_DISABLE Disable third handwheel

This function allows one or several axes with the handwheel in AUTOmatic
mode to move. The movement of the selected axis results in the introduction of
an offset (or correction) to the programmed movement. The axis could be
selected via PLC.

Via this PLC-Interface signal the


- Handwheel blocking
- Axes selection
- Handwheel factor
can be selected.

PLC Interface Manual


page 117 / 304
MACHINEMATE®

Handwheel blocking means that the compensation (or offset) set with the
handwheel is still active, but the handwheel input will not be processed any
longer.
Coding:

10 9 8 7 6 5 4 3 2 1

0 = handwheel
blocked
1 = handwheel
movement

X 0 = axis selection
switch off
X 1 = axis selection
1 X = handwheel factor

0 0 = 1st handwheel factor


0 1 = 2nd handwheel factor
1 0 = 3rd handwheel factor
1 1 = 4th handwheel factor

0 0 0 0 0 = 1st axis
0 0 0 0 1 = 2nd axis
0 0 0 1 0 = 3rd axis
0 0 0 1 1 = 4th axis
... ... ... ... ... .......
1 1 1 1 1 = 32nd axis

The function is only active at the CNC when enabled (by the BCD code that
enables the handwheel offset in automatic mode).

Notes:
• The interface signal will be processed statically so the axis
selection is only active when bit 2 is set.
• When the axis selection via PLC-interface signal is not active (bit
2 = 0), the axis selection via NC-programming will be active
automatically.
• The handwheel factor can only be changed by writing with
another factor.
The handwheel factor cannot be deactivated like the axis
selection.
The factor defined last is used for all axes.
Note:
• The required machine parameters (in the Handwheel group) are :
HandwheelBCDAppl, HandwheelBCDNo (this value specifies
the set of M-codes that control the handwheel in automatic mode)
and HandwheelPLCByte (this value enables this dword to the
CNC).

PLC Interface Manual


page 118 / 304
MACHINEMATE®

2.3.17.1. Disabling handwheels from the PLC

There is a signal (in this dword) allowing the PLC to disable each handwheel.
Each handwheel has an interface signal defined for it. The CNC can handle up
to three handwheels.

Bit
30 IN_HDW1_DISABLE Disable first handwheel
31 IN_HDW2_DISABLE Disable second handwheel
32 IN_HDW3_DISABLE Disable third handwheel

These signals give the PLC control over the individual handwheels.
IN_HDW1_DISABLE If set to 1, the first handwheel is disabled.
IN_HDW2_DISABLE If set to 1, the second handwheel is disabled.
IN_HDW3_DISABLE If set to 1, the third handwheel is disabled.

This PLC action affects the handwheel regardless of whether the handwheel is
a free or assigned to a specific axis and works in both Manual and Automatic
modes.
This PLC command to the CNC can be used to prevent the Manual Mode
handwheel axis selection and its subsequent handwheel activation for the first
free handwheel. Examples for this PLC action with IN_HDW1_DISABLE are:

• The PLC should allow the handwheel activation only through input
switches to PLC logic not through the operator interface. In this case, the
PLC handles the handwheel activities with this dword (IN_HDWHEEL) or
with IN_EXTMODE (see 2.3.9.1.2) or with the HANDWHEEL functions
(see 3.18 through 3.18).

• The PLC should disable the operator’s currently active handwheel


selection when the operator (via System – Change station) or the PLC
(SELECT_NC_STATION; see 3.45) changes the active HMI display
among CNC stations.

Note: The configuration of a handwheel to be freely assigned or to be assigned


to a specific axis is determined by the machine parameter HandwheelNo1Axis
(in the Handwheel group) for the first handwheel (or 1 in the parameter name is
2 or 3 for the other two handwheels).

PLC Interface Manual


page 119 / 304
MACHINEMATE®

2.3.18. IN_FASTIO (dword 18), digital input (probe) signals

This function is optional and is not available in all systems.

In this dword, the PLC is able to provide or manage the digital input (or probe)
signals for the CNC as it manages axis motion with probe input(s). This
optional feature is sometimes called feedrate influencing with digital signals.
The first word of this dword contains the sixteen digital inputs from the PLC.

Bit
1 INFSIGNAL01 PLC probe digital input 1
2 INFSIGNAL02 PLC probe digital input 2
3 INFSIGNAL03 PLC probe digital input 3
4 INFSIGNAL04 PLC probe digital input 4
... ... ...
16 INFSIGNAL16 PLC probe digital input 16

The individual input signals are independent of each other.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Input signal is not active.
1 Input signal is active.

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 Indicates the probe input is active.
1 Indicates the probe input is not active.

0→ 1 If the CNC is monitoring this particular probe input, then the CNC will
react to it as directed (G170, G171, G172).

1→ 0 No direct effect.

Note:
• The required machine parameter (in the ProbingLogic group) is:
FastIOPLCByteIO. This parameter configures whether the PLC
can provide these input signals to the CNC. If this parameter is 0,
then the above signals are ignored by the CNC.

PLC Interface Manual


page 120 / 304
MACHINEMATE®

The second word of this dword contains the mask for the sixteen digital inputs
from the PLC.
Bit
17 INFMASK01 Probe digital input 1 mask
18 INFMASK02 Probe digital input 2 mask
19 INFMASK03 Probe digital input 3 mask
20 INFMASK04 Probe digital input 4 mask
... ... ...
32 INFMASK16 Probe digital input 16 mask

The individual input signals are independent of each other.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Input signal is not enabled – the mask is preventing it from being active.
1 Input signal is enabled – the mask is allowing it to become active.

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 Indicates the probe input for this bit cannot become active.
1 Indicates the probe input for this bit can become active.
This is only a mask for the input bit. The probe input itself is another
signal to the CNC (either read by the CNC directly or provided by the
PLC, in this dword, in the first word).

0→ 1 No direct effect.
1→ 0 No direct effect.

Note:
• The required machine parameter (in the ProbingLogic group) are:
FastIOPLCByteBitMask and FastIOPLCByteOutMask. These
parameters configure whether the PLC can provide this mask of
these input signals to the CNC. If these parameters are 0, then
the above signals are ignored by the CNC.

PLC Interface Manual


page 121 / 304
MACHINEMATE®

2.3.19. IN_FASTSELECT (dword 19), digital input (probe) select


signals

In this dword, the PLC is able to specify whether a digital input (or probe) signal
to the CNC is from the CNC (where the byte number is read directly) or from
the PLC (as an interface signal). This optional feature is sometimes called
feedrate influencing with digital signals.
This dword contains the sixteen select signals that correspond to the sixteen
digital inputs.

Bit
1 INFSELECT01 PLC probe digital input select 1
2 INFSELECT02 PLC probe digital input select 2
3 INFSELECT03 PLC probe digital input select 3
4 INFSELECT04 PLC probe digital input select 4
... ... ...
16 INFSELECT16 PLC probe digital input select 16

The individual input signals are independent of each other.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Input signal is not active – CNC is the source of the probe input signal.
1 Input signal is active – PLC is the source of the probe input signal.

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 Indicates the source of the probe input is the CNC.
1 Indicates the source of the probe input is the PLC.

0→ 1 No direct effect.
1→ 0 No direct effect.

Note:
• The required machine parameter (in the ProbingLogic group) are:
FastIOByteAppl1 and FastIOByteAppl2 (these two parameters
define the byte numbers for the CNC to directly access the probe
input signals) as well as FastIOPLCByteIO (this parameter
enables the PLC to provide the probe input signals to the CNC).
If these parameters do not allow both the CNC and PLC to
provide probe input signals, then the above signals are ignored
by the CNC as there is no selection required for the signal
source.

PLC Interface Manual


page 122 / 304
MACHINEMATE®

2.3.20. IN_JPLS (dword 20), multiple axis jog (plus direction)


control signals

In this dword the plus direction enable signals for multiple axis jogging are
summed for all axes, to a maximum of 32:
Bit
1 IN_JPLS_01 Multiple axis jog in Plus direction 1st axis
2 IN_JPLS_02 Multiple axis jog in Plus direction 2nd axis
3 IN_JPLS_03 Multiple axis jog in Plus direction 3rd axis
4 IN_JPLS_04 Multiple axis jog in Plus direction 4th axis
...
32 IN_JPLS_32 Multiple axis jog in Plus direction 32nd axis

The individual feed enable signals are independent of each other and can
therefore be treated separately. These plus direction signals are interpreted at
the same time as the minus direction signals (IN_JMS_01 – 32) for the control
of jogging for multiple axes.
To control whether the multiple axes are jogging in continuous or incremental
mode, the PLC application must establish the appropriate external CNC
operating mode (see IN_EXTMODE, chapter 2.3.9.1.3). When jogging multiple
axes in incremental mode, then the PLC application can change the default
incremental jog distance (1 mm or 0.03937 in) using the function
SET_JOG_INCREMENTS (see 3.47).

Value Meaning
---------------------------------------------------------------------------------------------------
0 Axis jog in plus direction (simultaneous with other axes) disabled
1 Axis jog in plus direction (simultaneous with other axes) enabled

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 Prevents the axis jog motion of the concerned axis.
1 Enables the axis jog motion of the concerned axis (in coordination with
other axes that may be jogged in the plus or minus direction).

0→ 1 No additional effect.
1→ 0 No additional effect.
Note:
• The PLC application must have IN_EXTMODE set to Manual Mode
operation with no single axis positioning and a feed stage (i.e., a
value of 1 for first feed stage; see 2.3.9.1.2) for these multiple-axis
jog commands to cause motion.
• Both the plus direction and the minus direction enables for a specific
axis (IN_JPLS_xx and IN_JMNS_xx) cannot be set at the same
time.
• This dword was added in CNC version 1.9 so it did not exist in
earlier versions.

PLC Interface Manual


page 123 / 304
MACHINEMATE®

2.3.21. IN_JMNS (dword 21), multiple axis jog (minus direction)


control signals

In this dword the minus direction enable signals for multiple axis jogging are
summed for all axes, to a maximum of 32:
Bit
1 IN_JMNS_01 Multiple axis jog in Minus direction 1st axis
2 IN_JMNS_02 Multiple axis jog in Minus direction 2nd axis
3 IN_JMNS_03 Multiple axis jog in Minus direction 3rd axis
4 IN_JMNS_04 Multiple axis jog in Minus direction 4th axis
...
32 IN_JMNS_32 Multiple axis jog in Minus direction 32nd axis

The individual feed enable signals are independent of each other and can
therefore be treated separately. These minus direction signals are interpreted
at the same time as the plus direction signals (IN_JPLS_01 – 32) for the control
of jogging for multiple axes.
To control whether the multiple axes are jogging in continuous or incremental
mode, the PLC application must establish the appropriate external CNC
operating mode (see IN_EXTMODE, chapter 2.3.9.1.3). When jogging multiple
axes in incremental mode, then the PLC application can change the default
incremental jog distance (1 mm or 0.03937 in) using the function
SET_JOG_INCREMENTS (see 3.47).

Value Meaning
---------------------------------------------------------------------------------------------------
0 Axis jog in minus direction (simultaneous with other axes) disabled
1 Axis jog in minus direction (simultaneous with other axes) enabled

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 Prevents the axis jog motion of the concerned axis.
1 Enables the axis jog motion of the concerned axis (in coordination with
other axes that may be jogged in the plus or minus direction).

0→ 1 No additional effect.
1→ 0 No additional effect.
Note:
• The PLC application must have IN_EXTMODE set to Manual Mode
operation with no single axis positioning and a feed stage (i.e., a
value of 1 for first feed stage; see 2.3.9.1.2) for these multiple-axis
jog commands to cause motion.
• Both the plus direction and the minus direction enables for a specific
axis (IN_JPLS_xx and IN_JMNS_xx) cannot be set at the same
time.
• This dword was added in CNC version 1.9 so it did not exist in
earlier versions.

PLC Interface Manual


page 124 / 304
MACHINEMATE®

2.3.22. IN_IPR (dword 27), PLC to NC block interpreter control


signals

This dword contains control signals from the PLC to the NC block interpreter.
Bit
1 IN_CANCELBLK Cancel the active NC block
2 IN_SINGLE_STEP Put the program in single step mode
3 IN_IPR_DO_STEP Single step the active part program
4 IN_PLC_SET_AXES Set an axis position
5 IN_HIDE_IMBLK Hide intermediate blocks
6 IN_HIDE_INBLKn Prevent operator hide intermediate blocks
7 IN_HIDE_CYBLK Hide cycle blocks
8 IN_HIDE_CYBLKn Prevent operator hide cycle blocks
9 IN_FINISH_ACT_BLK Finish the active block
10 IN_DEL_MAN_OFFS Delete manual offsets (from jog)
11 IN_MP_CHANGE_ACK Acknowledge machine parameter change
12
... Free
32

Note: This dword was added in CNC version 2.1 so it did not exist in earlier
versions. The signals for bits 2 and 3 were added in CNC version 2.2 so they
did not exist in earlier versions. The signals for bits 4 through 11 were added in
CNC version 2.3 so they did not exist in earlier versions.

2.3.22.1. IN_CANCELBLK -- CANCEL THE ACTIVE BLOCK

This signal (when set) is a command from the PLC to the NC block interpreter
to cancel the active NC block in the part program and to proceed to the next
NC block, if there is one.

Value Meaning
---------------------------------------------------------------------------------------------------
0 No command to the NC block interpreter
1 Command to cancel the active block is active to the NC block interpreter

This signal is handled using a defined handshake with the CNC. When the PLC
requires the active block to be cancelled, it will set IN_CANCELBLK to TRUE.
When the CNC responds with ON_CANCELBLK (see 2.4.25.1) set to TRUE
(acknowledging the command), then the PLC must reset IN_CANCELBLK to
FALSE.

PLC Interface Manual


page 125 / 304
MACHINEMATE®

2.3.22.2. IN_SINGLE_STEP -- PROGRAM IN SINGLE STEP MODE

This signal directs the CNC to place the active NC part program in a single step
mode. This mode is helpful when debugging a part program having many cycle
blocks. Those blocks are handled as part of the block look ahead calculations
so normally it is not possible to do those cycle blocks one at a time. This signal
puts the control in a single step mode and the IN_IPR_DO_STEP signal is the
request to the CNC to do the next block, one step at a time.

Value Meaning
---------------------------------------------------------------------------------------------------
0 No command to the CNC; normal part program operations
1 Command to CNC for the active part program in single step mode

This signal is handled using a defined context for the CNC. The CNC is in
Automatic mode, sequential blocks (i.e., ON_AUTO is on, see 2.4.1.4), usually
by that operator selection with its associated soft key. When the PLC requires
the active part program to be put in single step mode, it will set
IN_SINGLE_STEP to TRUE. The CNC will respond with ON_SINGLE_STEP
(see 2.4.25.4) at TRUE indicating the single step mode is active.
When the PLC is done with this mode, it will reset IN_SINGLE_STEP to
FALSE. The CNC will respond with ON_SINGLE_STEP at FALSE indicating
the single step mode is no longer active. At that time, if there are remaining
blocks in the part program, look ahead processing of those blocks will
commence. Whether they are executed depends on the auto-sequential
(ON_AUTO) or auto-single block (ON_SINGLE) mode of the CNC.

2.3.22.3. IN_IPR_DO_STEP -- SINGLE STEP THE PROGRAM, ONE


BLOCK

This signal directs the CNC to process only one more block from the active NC
part program. This command is recognized only when in the single step mode
(ON_SINGLE_STEP is on; see 2.4.25.4). This single stepping is helpful when
debugging a part program having many cycle blocks. Those blocks are handled
as part of the block look ahead calculations so normally it is not possible to do
those cycle blocks one at a time. This signal allows the control of each part
program block in a single step mode. The operator can monitor the actual block
preprocessing with the operator selection of Automatic mode - Test mode –
Interpolator blocks. If this special test mode display is not activated, the cycle
blocks are not displayed as expected in this single step mode. Cycle blocks are
normally not displayed beyond the bottom block of the three program blocks
shown on the display. With this test mode selection the cycle blocks will be
seen as they sequentially (one single step at a time) progress up the display.
This special single step mode is not the same as single block mode
(ON_SINGLE; see 2.4.1.4). This is a special test mode possible in the CNC to
help debug part programs having cycle blocks for calculations. Cycle blocks
are uniquely identified by their syntax. They always start with *N to indicate a
calculation block. Motion can never occur with a cycle block. Normal part
programs can be executed done one block at a time, just as on most other
CNCs, when Automatic Single block mode is activated.

PLC Interface Manual


page 126 / 304
MACHINEMATE®

Value Meaning
---------------------------------------------------------------------------------------------------
0 No step command to the CNC
1 Single step command to CNC; the next block in the active part program
will be preprocessed by the interpreter in this single step mode

This signal is handled using a defined context for the CNC. The CNC is in
Automatic mode, sequential blocks (i.e., ON_AUTO is on, see 2.4.1.4), usually
by that operator selection with its associated soft key. When the PLC requires
the active part program to be put in single step mode, it will have set
IN_SINGLE_STEP to TRUE. The CNC will respond with ON_SINGLE_STEP at
TRUE indicating the single step mode is active.

This signal is handled using a defined handshake with the CNC. When the PLC
requires the next block to be processed, it will set IN_IPR_DO_STEP to TRUE.
When the CNC responds with ON_IPR_DO_STEP set to TRUE
(acknowledging the command), then the PLC must reset IN_IPR_DO_STEP to
FALSE.

When using this PLC signal for debugging cycle blocks (i.e., a block starting
with *N; these are calculation blocks and cannot result in motion) in a part
program with the Interpolator blocks test mode display active, notice the CNC’s
displayed behavior. When a cycle block appears on the bottom of the three
blocks on the display, at that time it has already been processed by the CNC.
Therefore it is important to know, by watching the block numbers, what is the
next block, not yet visible, to know what will be the next cycle block to be
processed. If the cycle block is visible it has already been processed.
When a non-cycle block (i.e., a block without the *N) appears on the display
(the bottom of the three blocks shown), it will be processed into the dynamic
block buffer. Upon its scrolling off the top of the display it will be processed as
the active block by the CNC, but only if the CNC has been waiting for the next
block to execute. It is possible for the IN_IPR_DO_STEP to be consecutively
toggled so that a number of motion blocks are processed into the dynamic
block buffer. If an early NC block will take some time to complete its motion
then it is possible for the operator to single step through the rest of the program
with this mechanism, perhaps with many other motion blocks seen to scroll
through the display. This single stepping is not affecting the actual execution of
the motion blocks. Its intent is to throttle the execution of the cycle blocks to
monitor their execution. If the operator does not have the Interpolator blocks
test mode display active, then the three active blocks on the Automatic mode
display are still as before, even in this single step mode: the active block is the
top block and those two below it are waiting to execute.

PLC Interface Manual


page 127 / 304
MACHINEMATE®

2.3.23. IN_FASTM (dword 29), fast output signals

This function is optional and is not available in all systems.

This dword enables the possibility to interlock the fast output signals (reference
the machine parameter BCDByteMaskIndex in the LaserPowerControl group
and also reference the information regarding the feature Laser Power Control).

Bit
1 IN_FASTM_BIT1 Enable/disable bit 1
2 IN_FASTM_BIT2 Enable/disable bit 2
3 IN_FASTM_BIT3 Enable/disable bit 3
4 IN_FASTM_BIT4 Enable/disable bit 4
5 IN_FASTM_BIT5 Enable/disable bit 5
6 IN_FASTM_BIT6 Enable/disable bit 6
7 IN_FASTM_BIT7 Enable/disable bit 7
8 IN_FASTM_BIT8 Enable/disable bit 8
9
... Free
32

Value Meaning
---------------------------------------------------------------------------------------------------
0 Fast output signal is disabled
1 Fast output signal is enabled

PLC Interface Manual


page 128 / 304
MACHINEMATE®

2.3.24. IN_TOOL (dword 30), tool management signals

This dword provides a number of state signals for the PLC to work with the
CNC on tool management.

Bit
1 IN_TOOLRELEASE Tool change completed successfully
2 IN_TOOLCHANGE Active tool has been returned to the
magazine
3 IN_TOOLPOS Request the tool magazine to move to a
specific position (for CNC internal axis)
4 IN_TOOLACTIVE Tool life of the active tool is decremented
(in minutes)
5 IN_TOOLREMOVE Not used
6
... Free
32

Some of these signals are also described in the tool change descriptions below
(see 2.3.26.1).

2.3.24.1. IN_TOOLRELEASE -- TOOL IS RELEASED IN SPINDLE


This signal (when set) is a command from the PLC to the CNC that the new
tool has been released in the spindle so the CNC should update the tool table
accordingly.

Value Meaning
---------------------------------------------------------------------------------------------------
0 No command to the CNC regarding the new tool
1 Command to CNC to update tool table because new tool is in the spindle

This signal is handled using a defined handshake with the CNC for tool data
management. After the PLC sets IN_TOOLRELEASE to update the tool table,
the CNC will respond with ON_TOOLANSWER.

2.3.24.2. IN_TOOLCHANGE -- TOOL CHANGE HAS BEGUN


This signal (when set) is a command from the PLC to the CNC that the tool
change has begun and the old tool in the spindle has been returned to its
location in the tool magazine so the CNC should update the tool table
accordingly.

Value Meaning
---------------------------------------------------------------------------------------------------
0 No command to the CNC regarding the old tool
1 Command to CNC to update tool table because old tool has returned to
its location in the magazine

This signal is handled using a defined handshake with the CNC for tool data
management. After the PLC sets IN_TOOLCHANGE to update the tool table,
the CNC will respond with ON_TOOLSTART.
PLC Interface Manual
page 129 / 304
MACHINEMATE®

2.3.24.3. IN_TOOLPOS -- REQUEST TO POSITION TOOL MAGAZINE


This signal (when set) is a command from the PLC to the CNC that the servo-
driven tool magazine should be moved to the location specified in
IN_TOOLREQ

Value Meaning
---------------------------------------------------------------------------------------------------
0 No command to the CNC regarding the tool magazine
1 Command to CNC to move tool magazine to a specified location

This signal is handled using a defined handshake with the CNC for tool data
management. After the PLC sets IN_TOOLPOS for the CNC to move the tool
magazine to the location in IN_TOOLREQ, the CNC will respond with
ON_TOOLPOINT when it has reached the requested tool location.

2.3.24.4. IN_TOOLACTIVE -- TOOL LIFE TRACKING IS ACTIVE


This signal (when set) is a command from the PLC to the CNC that the life for
the tool in the spindle should be decremented.

Value Meaning
---------------------------------------------------------------------------------------------------
0 No command to the CNC regarding the tool in the spindle
1 Command to CNC to decrement the tool life for the tool in the spindle

The PLC will set the IN_TOOLACTIVE according to the desired rules for
tracking tool life (or tool wear). The rules will vary but typically the tool in the
spindle (i.e., the active tool) will accumulate wear (or its remaining life will be
decremented when IN_TOOLACTIVE is TRUE) when these conditions are all
true:
a) the tool has a projected tool life (READ_PLANNED_LIFE, see 3.30),
b) the spindle is turning (NOT ON_STAND01), and
c) the machine is moving by the NC part program but not at rapid
(ON_CYCLEON AND NOT ON_RAPID AND NOT ON_STAND).

PLC Interface Manual


page 130 / 304
MACHINEMATE®

2.3.25. IN_TOOLPLACE (dword 31), tool magazine location


request

This value (an integer not a bit-coded dword) provides the CNC with the current
magazine location.
The PLC should always set the IN_TOOLPLACE value to the actual magazine
location. The CNC will check this magazine position during the tool change
signal handshake (both at IN_TOOLCHANGE when the spindle tool returns to
the magazine and at IN_TOOLRELEASE when the new tool is taken from the
magazine and put into the spindle).

2.3.26. IN_TOOLREQ (dword 32), tool table location request

This value (an integer not a bit-coded dword) provides the CNC with the tool
table location.
The PLC will set the IN_TOOLREQ value to the desired magazine location
when the IN_TOOLPOS signal will be used for the PLC to request the CNC to
move the servo driven magazine.

PLC Interface Manual


page 131 / 304
MACHINEMATE®

2.3.26.1. Tool change sequences for PLC

Depending on the machine type and location coding, the tool change must
be performed differently. The procedures for the tool changes for several
different machine types with location coding are described in this chapter.
Note:
There are two common tool management strategies:
• fixed location tools, where each tool returns to its dedicated pocket,
• variable location tools, where tools migrate in the magazine during
tool changes.

With fixed location tools, there is an assumed procedure for the tool change
processing.
1. If there is a tool in the spindle, the tool magazine would be at the correct
location for that active tool. With fixed location tooling, usually a tool
preselect is not performed (mechanically or in the part program).
2. Upon the M06, the tool in the spindle is returned to its original tool
magazine location. The CNC will move the tool data accordingly.
3. After the tool is returned to the magazine, then the CNC indicates to the
PLC the location of the next tool. Depending on the magazine control,
the PLC (non-servo controlled) or the CNC (servo controlled) will move
the magazine.
4. When the magazine is in position, then the tool is moved from the
magazine to the spindle. The CNC will move the tool data accordingly.

The above sequence is illustrated with a flow chart below. Some of the
signals in IN_TOOL and some of the signals in ONTOOL are represented.

With variable location tools, there is a different assumed procedure for the
tool change processing:
1. With variable location tooling, a tool preselect is often performed so that
the tool change time is minimized. Therefore the next tool is usually
ready prior to the M06. When the T-code is the program, the CNC
indicates to the PLC the location of the next tool. Depending on the
magazine control, the PLC (non-servo controlled) or the CNC (servo
controlled) will move the magazine.
2. Upon the M06, if no tool has been selected prior to this block, the
specified tool will be found in the tool magazine and moved to the tool
change position.
3. After the next tool is ready, the PLC exchanges the tool in the spindle
with the tool in the magazine. The CNC will move the tool data
accordingly.

PLC Interface Manual


page 132 / 304
MACHINEMATE®

2.3.26.1.1. Fixed location coded tools and PLC-controlled magazine

In this situation, the magazine is controlled by the PLC not the CNC (as an
axis). In this case, the location number and the optimal traversing direction
are submitted from the CNC to the PLC via the PLC-CNC interface.

Note:

After inserting the tool into the spindle, the magazine is not moved anymore
by the PLC until the tool is re-inserted into the magazine using an M06
operation.
The PLC always has to set the IN_TOOLPLACE value to the actual
magazine position. The CNC checks the magazine position during the tool
change.

2.3.26.1.1.1. Tool change procedure

T4 is programmed.
T4 shall be inserted into the spindle. A tool is still present in the spindle. For
the tool change it is assumed that the magazine location is already
positioned to the spindle tool’s pocket.
CNC PLC
T4 (BCD output) Prepare to return old tool to
the magazine.
CNC determines the magazine location
number (ON_TOOLPLACE value) and the
traversing direction (ON_TOOLDIR signal)
and submits this information to the PLC via
the interface.
M06 (BCD output) Reset the IN_TRANSF signal.
Perform the tool change with
the old tool.
Set the IN_TOOLCHANGE
signal.
CNC updates the tool table as the old tool
is not active anymore. CNC sets the
ON_TOOLSTART signal.
PLC directs the magazine
controller to move the tool
magazine to the new location.
Upon arrival, PLC inserts the
new tool in spindle.
Set the IN_TOOLRELEASE
signal.
CNC updates the tool table as tool T4
becomes active. Compensations are
updated. CNC sets the
ON_TOOLANSWER (Acknowledgement)
signal.

PLC Interface Manual


page 133 / 304
MACHINEMATE®

Tool change has been


successfully been performed.
Set the IN_TRANSF signal (to
allow the next block).
Reset both the
IN_TOOLCHANGE and
IN_TOOLRELEASE signals (to
indicate completion).
Note:
The ON_TOOLSTART signal is not set by the CNC when the conditions
are not correct. For the spindle tool to return to the magazine, the
magazine must be in the correct position for the active tool (via
IN_TOOLPLACE) and the respective tool types for the tool locations must
be the same (between 100 and 199, decimal, to indicate the tool is in the
spindle). An error message is issued if either condition is wrong.
The ON_TOOLANSWER (acknowledgment) is not set by the CNC if the
desired tool could not be activated by the CNC. In this case an error
message is issued by the CNC and the PLC should not set the
IN_TRANSF signal. This prevents further NC block processing.
If the ON_TOOL_IS_ACT (selected tool is active, in the spindle) is set by
the CNC, then the PLC probably should not begin the tool change
sequence with the IN_TOOLCHANGE signal. The ON_TOOL_IS_ACT
indicates that the CNC concluded that no tool change is not required as no
tool data movement is required.
The ON_TOOLDIR signal is only an indicator for the PLC of the relative
change in the magazine location (see 2.4.28.6).

2.3.26.1.1.2. Tool return procedure

T0 programmed
The active tool shall be returned to the tool magazine. No new tool shall be
inserted.
CNC PLC
T0 (BCD output) Prepare to return old tool to
the magazine.
M06 (BCD output) Reset the IN_TRANSF signal.
Perform the tool change with
the old tool.
Set the IN_TOOLCHANGE
signal.
CNC updates tool table data. CNC sets the
ON_TOOLANSWER (acknowledgment)
signal.
The tool change has been
performed.
Set the IN_TRANSF signal (to
allow next block) .
Reset the IN_TOOLCHANGE
signal (to indicate
completion).

PLC Interface Manual


page 134 / 304
MACHINEMATE®

2.3.26.1.2. Fixed location coded tool and CNC-controlled magazine

With a CNC-controlled magazine (via a servo axis), much of the procedure


for a PLC-controlled magazine situation (described above) remains the
same. Instead of outputting the location, the direction, and the start signal
to the PLC, the CNC controls the movement of the magazine axis. In this
case, the PLC must perform all functions depending on state of the
ON_TOOLPOINT signal.

2.3.26.1.2.1. Tool change procedure

T4 is programmed
T4 shall be inserted into the spindle. A tool is still present in the spindle.
For the tool change it is assumed that the magazine location is already
positioned to.
CNC PLC
T4 (BCD output) Prepare to return the old tool
to the magazine.
M06 (BCD output) Reset the IN_TRANSF signal.
Perform the tool change with
the old tool.
Set the IN_TOOLCHANGE
signal.
CNC moves to new magazine location.
CNC sets the ON_TOOLPOINT signal.
CNC sets the ON_TOOLINPOS signal.
Tool T4 is gripped and
inserted into the spindle.
Set the IN_TOOLRELEASE
signal.
CNC updates the tool table as tool T4 is
activated. Compensations are updated.
CNC sets the ON_TOOLANSWER
(acknowledgment) signal.
Tool change has been
successfully been performed.
Set the IN_TRANSF signal (to
allow next block) .
Set both the
IN_TOOLCHANGE and
IN_TOOLRELEASE signals
(to indicate completion).

PLC Interface Manual


page 135 / 304
MACHINEMATE®

Note:
The ON_TOOLSTART signal is not set by the CNC when the conditions
are not correct. For the spindle tool to return to the magazine, the
magazine must be in the correct position for the active tool (via
IN_TOOLPLACE) and the respective tool types for the tool locations must
be the same (between 100 and 199, decimal, to indicate the tool is in the
spindle). An error message is issued if either condition is wrong.
The ON_TOOLANSWER (acknowledgment) signal is not set by the CNC if
the desired tool could not be activated by the CNC. An error message is
issued by the CNC in this case and the PLC should not set the
IN_TRANSF signal. This prevents further NC block processing.
If the ON_TOOL_IS_ACT (selected tool is active, in the spindle) is set by
the CNC, then the PLC probably should not begin the tool change
sequence with the IN_TOOLCHANGE signal. The ON_TOOL_IS_ACT
indicates that the CNC concluded that no tool change is not required as no
tool data movement is required.

2.3.26.1.2.2. Tool return procedure

T0 programmed
The active tool shall be returned to the tool magazine. No new tool shall be
inserted.
CNC PLC
T0 (BCD output) Prepare to return the old tool
to the magazine.
M06 (BCD output) Reset the IN_TRANSF signal.
Perform the tool change with
the old tool.
Set the IN_TOOLCHANGE
signal.
CNC updates tool table as no tool is active
in spindle.
CNC sets the ON_TOOLANSWER
(acknowledgment) signal.
The tool change has been
performed.
Set the IN_TRANSF signal (to
allow next block) .
Reset the IN_TOOLCHANGE
signal (to indicate
completion).

PLC Interface Manual


page 136 / 304
MACHINEMATE®

2.3.26.1.3. Variable location coded tools and PLC-controlled magazine

The tool data management for variable location coded tools is very similar to
that for fixed location coded tools.
In this situation, the magazine is controlled by the PLC not the CNC (as an
axis). In this case, the location number and the optimal traversing direction
are submitted from the CNC to the PLC via the PLC-CNC interface.

Note:

The magazine is moved to get the new tool so that a swap between the
spindle tool and the previous tool occurs. After this swap, the magazine is
not moved anymore by the PLC.
The PLC always has to set the IN_TOOLPLACE value to the actual
magazine position. The CNC checks the magazine position during the tool
change.

2.3.26.1.3.1. Tool change procedure

T4 is programmed.
T4 shall be inserted into the spindle. A tool is still present in the spindle. For
the tool change it is assumed that the magazine location is already
positioned to the spindle tool’s pocket.
CNC PLC
T4 (BCD output) Prepare to return old tool to
the magazine.
CNC determines the magazine location PLC moves the magazine to
number (ON_TOOLPLACE value) and the the specified position following
traversing direction (ON_TOOLDIR signal) the specified direction. When
and submits this information to the PLC via the magazine is in the correct
the interface. position, the PLC sets the
IN_TOOLPLACE (to be equal
to ON_TOOLPLACE).
M06 (BCD output) Reset the IN_TRANSF signal.
Will perform the tool change
with the old tool.
Set the IN_TOOLCHANGE
signal to begin.
CNC updates the tool table as the old tool
is not active anymore. CNC sets the
ON_TOOLSTART signal.
PLC swaps the spindle tool
with the new tool. The old tool
(from the spindle) is placed in
the new tool’s magazine
location.
Set the IN_TOOLRELEASE
signal.
CNC updates the tool table as tool T4
becomes active (in spindle).
Compensations are updated.
CNC sets the ON_TOOLANSWER
(Acknowledgement) signal.

PLC Interface Manual


page 137 / 304
MACHINEMATE®

Tool change has been


successfully been performed.
Set the IN_TRANSF signal (to
allow the next block).
Reset both the
IN_TOOLCHANGE and
IN_TOOLRELEASE signals (to
indicate completion).
Note:
The ON_TOOLSTART signal is not set by the CNC when the conditions
are not correct. For the spindle tool to return to the magazine, the
magazine must be in the correct position for the active tool (via
IN_TOOLPLACE) and the respective tool types for the tool locations must
be the same (between 100 and 199, decimal, to indicate the tool is in the
spindle). An error message is issued if either condition is wrong.
The ON_TOOLANSWER (acknowledgment) is not set by the CNC if the
desired tool could not be activated by the CNC. In this case an error
message is issued by the CNC and the PLC should not set the
IN_TRANSF signal. This prevents further NC block processing.
If the ON_TOOL_IS_ACT (selected tool is active, in the spindle) is set by
the CNC, then the PLC probably should not begin the tool change
sequence with the IN_TOOLCHANGE signal. The ON_TOOL_IS_ACT
indicates that the CNC concluded that no tool change is not required as no
tool data movement is required.
The ON_TOOLDIR signal is only an indicator for the PLC of the relative
change in the magazine location (see 2.4.28.6).

2.3.26.1.3.2. Tool return procedure

T0 programmed
The active tool shall be returned to the tool magazine. No new tool shall be
inserted.

The same procedure as above is followed by both the CNC and PLC
because the CNC must find an empty magazine location for the tool in the
spindle. Upon the M06, the PLC must move the spindle tool into the empty
magazine location. The same interface signals are used to indicate when
this task is completed.

PLC Interface Manual


page 138 / 304
MACHINEMATE®

2.3.26.1.4. Moving CNC-controlled magazine to location via the PLC

The PLC can request the moving of the magazine to a specific tool location
from the CNC if the CNC controls the axis. To do so, the PLC stores the
required location number in the IN_TOOLREQ value. Then the PLC sets
the IN_TOOLPOS signal for the request. The PLC signal must remain set
until the ON_TOOLPOINT signal is received from the CNC.

PLC CNC
Store the desired location number in the
IN_TOOLREQ value.
Set the IN_TOOLPOS signal.
CNC moves the magazine to
the position in IN_TOOLREQ.
CNC sets the
ON_TOOLPOINT signal if
successful or
if not possible CNC sets the
ON_TOOLERROR signal.
Note:
After issuing a positioning request, the PLC must request a move to the old
tool location if a tool is present in the spindle during the positioning request.
For the next tool change and with location coded tools it is assumed that
the magazine is still located at the old location.

2.3.26.2. CNC tool data interaction with tool management

These tool management signals cause interaction with the CNC tool data
tables. This interaction could affect whether or not these IN_TOOL signals are
even required in the PLC application.
There are two mechanisms available to the CNC operator and CNC
programmer for tool data.
In most applications, the tool length compensation is entered in the H-table
(also called the Length correctors) and the tool radius compensation is entered
in the D-table (also called the Path correctors). The part program will contain
the H-code and the D-code for each tool (which is identified by its T-code). For
example, a part program block could be something like:
N050 T01 D05 H07
These CNC data tables also include wear offset values, so that the operator
can maintain the original value (perhaps from a tool presetter) and just manage
a small change to those initial values, with this small change going into the
appropriate wear offset value. Depending on the machine configuration, the H-
table will have one or two axes of compensation where typically a milling
machine has the length compensation only in Z (only one axis with
compensation) while in a lathe (for turning) the length compensation is both in
X and Z (to accommodate the variations in individual turret positions so two
axes with compensation).
With the common D/H programming applications, with fixed location tooling and
with no tool life management, the PLC will typically not use the tool
management signals. The tool table is set up for each T-number to match its
pocket number and the operator does not use the table after that. The tool

PLC Interface Manual


page 139 / 304
MACHINEMATE®

table does not have to be updated for the spindle location to indicate the active
tool number. The PLC logic can present such status information to the operator
in a cycle parameter if required.
These tool management signals are used when tool life management is desired
(so the CNC requires the active tool information to update its remaining tool
life) or when variable location tooling is used (so the CNC updates the tool
table as the tools migrate into different locations).
The alternate, much less common approach is for the operator to enter the tool
length and tool radius compensation values directly into the tool table. For each
tool there is a Geo.Corr.D column for the radius compensation value and there
is a Geo.Corr.H column for the length compensation value. The tool table does
not contain wear offset values for these compensations nor is there an entry for
a second axis of tool length compensation nor is there an entry for a wheel or
tool tip orientation. For example, a part program block with this programming
approach could be something like:
N050 T05 D01 H01
With this approach D1 and H1 are always used for every length and path
compensation activation rather than the program uniquely identifying a
compensation value within the D or H-table. With this approach the operator is
entering the compensation values into the tool table, not in the D or H-tables.
Upon the movement of a tool into the spindle (using the tool management
signals in IN_TOOL) the CNC will write the Geo.Corr.D and Geo.Corr.H values
into the D1 and H1 values accordingly.
To support this alternate programming approach, the CNC will always write the
Geo.Corr.D and Geo.Corr.H values into the D1 and H1 values every time
IN_TOOLRELEASE indicates that the new tool is now in the spindle.
Therefore, if this alternate approach to tool data is not being used (in other
words, the usual approach is assumed where the part program will indicate the
desired D-code or H-code rather than D1 and H1 always in use) then the PLC
must save the current D1 and H1 values at the start of the tool change
sequence (before IN_TOOLRELEASE is set to true) and then the PLC must
restore those saved values to D1 and H1 after the tool change sequence has
completed. If the PLC does not perform this save/restore, the D1 and H1 will
have the Geo.Corr.D and Geo.Corr.H values for the tool just placed in the
spindle.
This save and restore procedure for D1 and H1 is required only if these tool
management signals (specifically IN_TOOLRELEASE) are being used.

2.3.26.3. Flow chart for tool management signals

The following pages contain a flow chart for the various tool management
signals for fixed location tooling.

PLC Interface Manual


page 140 / 304
MACHINEMATE®

Spindle to Magazine Tool Exchange (no gripper)


(magazine is totally PLC controlled)(tool from spindle must be put away before new tool is selected.

START

Txxx

Is magazine at spdl Position magazine to


No
tool location spdl tool location

PLC transfers current


Yes magazine location to the
CNC

IN_TOOLPLACE:= ActToolPlace
CNC determines new tool
location and transfers
location and rotation
direction to PLC. Note:
ON_TOOLPLACE is a
DINT
NewToolPlace:=ON_TOOLPLACE
Direction:= ON_TOOLDIR

M06 starts tx with If the T-code has changed,


spindle tool new data from the CNC
M06 regarding tool location and
direction has to be
Yes obtained.

Is T-code with M6 NewToolPlace:=ON_TOOLPLACE


same as No
Direction:= ON_TOOLDIR
preselected T-code

Yes Before setting


IN_TRANSFER=FALSE
do any tool change actions
Is part program that would require a part
program subroutine like
No tool exchange positioning axis to TX
subroutine done? location or any tool change
prep M-codes.

Yes

IN_TRANSF= FALSE

Transfer spdl tool to


magazine Wait at this step until tool
has been returned to
magazine

Is spdl tool in
No
magazine

Yes

PLC Interface Manual


page 141 / 304
MACHINEMATE®

1 IN_TOOLCHANGE tells CNC that spindle


tool has been returned to magazine.
CNC will then update tool table to show
that old tool is inactive. After this is done
CNC sets ON_TOOLSTART.

IN_TOOLCHANGE:=TRUE
ON_TOOLSTART is CNC
acknowledge that PLC
should move magazine to
next tool location.
Is NOTE: ON_TOOLSTART
Is Txxx = is never set TRUE if Txxx =
ON_TOOLSTART No No
0 0
TRUE?

Yes

Move magazine to New TX position

Perform Tool Exchange

Is TX Done? No
Yes
PLC tellsl CNC that TX is done by
setting IN_TOOLRELEASE = TRUE
CNC updates tool table to activate
Yes new tool and write tool comps to
comp table. After this is complete
CNC will set ON_TOOLANSWER.
IN_TOOLRELEASE = TRUE

CNC sets
ON_TOOLANSWER =
Is TRUE when CNC
ON_TOOLANSWER acknowledges that TX is
No done
True or Txxx
=0

Yes

ActToolPlace = ON_TOOLPLACE
IN_TOOLACTIVE should
IN_TRANSF = TRUE be set when tool timer
Is Txx = IN_TOOLCHANGE = FALSE needs to increment
No
0 IN_TOOLRELEASE = FALSE
IN_TOOLACTIVE=TRUE

Yes

IN_TRANSF = TRUE
IN_TOOLCHANGE = FALSE

DONE

Figure 6. Tool management flow chart

PLC Interface Manual


page 142 / 304
MACHINEMATE®

2.3.27. IN_FIVEAXES (dword 37), five-axis function signals

These functions are optional and are not available in all


systems.

This dword provides a number of state signals for the PLC to work with the
CNC on several five-axis functions.

Bit
1 IN_NO_TCP Switch Off Tool Center Point (TCP)
programming (like a G180)
2 IN_TCP_ACTIVE Switch On TCP programming (like a G181)
3 IN_TCP_COORD Switch On TCP programming with a
rotated corrdinate system (like a G182)
4 IN_COORD_DEF Definition of the rotated coordinate system
(like a G183 but without the information
of direction)
5 IN_BACK_TRAFO_OFF Switch Off the back transformation
6 IN_BACK_TRAFO_ON Switch On the back transformation
7
... Free
32

Each of these state-signals will take effect only on its leading edge transition in
the interface.

Value Effect in the CNC


---------------------------------------------------------------------------------------------------
0 No direct effect.
1 No direct effect.

0→ 1 The CNC will perform the requested action. However, the following two
conditions must be met or the signal will be ignored by the CNC.
- No NC program is active,
- There is no motion in the machine.
If the conditions are met after the signal has been applied, no action will
occur. The CNC will react only after another leading edge is detected
when the required conditions are met.

1→ 0 No direct effect.

PLC Interface Manual


page 143 / 304
MACHINEMATE®

2.4. Signal-Interface, CNC outputs


The variable names for the CNC output signals and their corresponding
DWORDs begin with
ON ( Output from the CNC).

2.4.1. ONGENERAL 1 (dword 1), general state signals 1


Several state signals are summed in this dword so that the PLC Program can
recognize the state of basic functions of the CNC:

Bit
1 ON_CYCLEON CYCLE ON
2 ON_STOPNCn FEED HOLDn (CYCLE STOP)
3 ON_STARTNC NC-START (CYCLE START)
4 ON_AUTO CNC-operating mode AUTOMATIC SEQUENTIAL
BLOCK
5 ON_SINGLE CNC-operating mode AUTOMATIC SINGLE BLOCK
6 ON_MDI CNC-operating mode MDI
7 ON_JOGMODE CNC-operating mode MANUAL
8 ON_HOMING CNC-operating mode HOMING
9 ON_INC_JOG INCREMENTAL JOG MODE
10 ON_CONT_JOG CONTINUOUS JOG MODE
11 ON_CNC_CHAN_ACT CNC STATION/CHANNEL IS ACTIVE ON HMI
12 ON_EMERG EMERGENCY STOP FROM CNC
13 ON_PRG_STP PROGRAM STOP ( M00 / M01 )
14 ON_PRG_END END OF PROGRAM ( M02 / M30 )
15 ON_RESET CONTROL RESET
16 ON_NO_CNTR NO FEEDBACK CONTROL
17 ON_HOME_OK HOME POSITION OK
18 ON_NCEROR NC PROGRAM ERROR
19 ON_ADDKEY1 AUX. PUSH-BUTTON 1
20 ON_ADDKEY2 AUX. PUSH-BUTTON 2
21 ON_PROGRAM PROGRAM
22 ON_ADMISSN ADMISSION
23 ON_PANEL TEACH PANEL ACTIVE
24 ON_RETREAT RETREAT (RETURN TO PATH)
25 ON_BACKW BACKWARD
26 ON_TEACHED TEACH-EDITOR
27 ON_BLKCHNG BLOCKCHANGE
28 ON_M1STOP WILL STOP ON M01
29 ON_WITH_MOVE AXES MOVE DURING PROGRAM
30 ON_G01_OVER G01 OVERRIDE ACTIVE
31 ON_BLOCK_DEL BLOCK DELETE (/) ACTIVE
32 ON_PITCHERR PITCH ERROR COMP ACTIVE

The individual signals can be evaluated independent of each other.

PLC Interface Manual


page 144 / 304
MACHINEMATE®

Note: The signals for bits 9, 10, 28 through 32 were added in CNC version 2.0
so they did not exist in earlier versions.

2.4.1.1. ON_CYCLEON -- CYCLE ON

This signal is used to inform the PLC Program, whether a function is active in
the CNC, which has consequences for the machine. This particularly includes
functions like
- Processing of a NC PROGRAM
- Processes of axes
- Initiation of a "start" (see chapter 2.3.1.2 "dword 1 IN_START
(NC cycle start)")

Value Meaning
---------------------------------------------------------------------------------------------------
0 Cycle on is not active
1 Cycle on is active

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 - The rest state (CYCLE ON is FALSE) in the CNC is active.
- The feed rate hold locking (cycle hold) in the CNC is active (see
chapter 2.3.1.3 "dword 1", IN_STOPn (feed hold)).
- The execution of NC blocks in the CNC operating modes
AUTOMATIC sequential block, AUTOMATIC single block or MDI
was interrupted as M00 or M01 (PROGRAM STOP) became
effective.
- The execution of NC blocks in the CNC operating modes
AUTOMATIC sequential block, AUTOMATIC single block or MDI
was terminated as M02 or M30(END OF PROGRAM) became
effective.
- In the CNC operating modes AUTOMATIC single block or MDI the
execution of the active NC block is terminated.
- The EMERGENCY STOP locking in the CNC is active (see chapter
2.3.1.1 "dword 1, INEMERGENCn").

1 - The execution of NC blocks in the CNC-operating modes


AUTOMATIC sequential block, AUTOMATIC-single block or MDI is
active.
- In the CNC operating mode HOMING a homing cycle is active.
- In the CNC operating mode MANUAL the positioning of axes is
active.

0→ 1 The CNC executes a "start" (see chapter 2.3.1.2 "dword 1,


IN_START (NC cycle start)"). In the CNC operating mode MANUAL
the positioning of axes is activated.

1→ 0 No further causes

Note:
• This signal can be used in order to monitor the execution of a
PLC Interface Manual
page 145 / 304
MACHINEMATE®

"start" which was requested via the signal IN_START (NC cycle
start, see chapter 2.3.1.2 "dword 1"). When ON_CYCLEON
receives the value 1, the "start" is executed and IN_START (NC
cycle start) should be set again to the value 0.

• This signal is also valid, when the test operation "without motion"
is active.

2.4.1.2. ON_STOPNCn -- FEED HOLDn (CYCLE STOP)

This signal is used to inform the PLC Program if a feed hold is required by the
CNC itself. This is possible if a stop push-button connected to the control (i.e.,
the MCP, Machine Control Panel) is used.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Feed rate hold demanded
1 Feed rate hold not demanded

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 A "low"-level is present in the predefined input of the control
(a connected stop push-button is used).
1 A "high"-level is present in the predefined input of the control
(a connected stop push-button is used).

0→ 1 - No further causes
1→ 0 No further causes

Note:
• Unless homing, the CNC does not execute a feed rate hold
automatically, but must be ordered to perform a feed rate hold via
the NC input signal IN_STOPn (feed hold, see chapter 2.3.1.3
"dword1"). The NC output signal ON_STOPNCn (feed hold)
therefore displays only one request to the PLC Program, to
initiate a feed rate hold. Whether this is actually performed is the
responsibility of the PLC Program. Reference the notes in
chapter 2.3.1.3 "dword 1, IN_STOPn (feed hold)".

• The connection of the cycle stop pushbutton to this interface


signal is done by the machine parameter
AdditionKeyIOAddress in the FeedOverride group.

PLC Interface Manual


page 146 / 304
MACHINEMATE®

2.4.1.3. ON_STARTNC -- NC-START (CYCLE START)

This signal is used to inform the PLC Program when a program "start" is
demanded by the CNC itself. This is possible if a start push-button connected
to the control (i.e., the MCP, Machine Control Panel) is used.

Value Meaning
---------------------------------------------------------------------------------------------------
0 "Start" is not demanded
1 "Start" is demanded

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 A "low"-level is present in the predefined input of the control
(connected start push-button is not active).
1 A "high"-level is present in the predefined input of the control
(connected start push-button is active).

0→ 1 - No further causes
1→ 0 No further causes

Note:
• The CNC cannot execute a "start" automatically, but can only be
commanded to perform a "start" via the NC input signal
IN_START (NC cycle start, see chapter 2.3.1.2 "dword1"). The
NC output signal ON_STARTNC (NC cycle start) therefore
displays only one request to the PLC Program, to initiate a "start".
Whether this is actually performed, is the responsibility of the
PLC Program. IMPORTANT: Refer to the notes in chapter
2.3.1.2 "dword 1, IN_START (NC cycle start)"!

• The connection of the cycle start pushbutton to this interface


signal is done by the machine parameter
AdditionKeyIOAddress in the FeedOverride group.

PLC Interface Manual


page 147 / 304
MACHINEMATE®

2.4.1.4. CNC operating modes (ON_AUTO, ON_SINGLE, ON_MDI,


ON_JOGMODE, ON_HOMING)

The PLC Program is informed which CNC operating mode in the CNC is active
via these 5 Bits. From these 5 bits only one bit can have the value 1 at a time
and the rest will have the value 0. If all 5 bits have the value 0, the operating
mode memory is active in the CNC.

Coding:

8 7 6 5 4 3 2 1 Bitnumber

X X X x = arbitrary value

1 = the CNC operating mode AUTOMATIC


sequential block is active (ON_AUTO)
1 = the CNC operating mode AUTOMATIC single
block is active (ON_SINGLE)
1 = the CNC operating mode MDI is
active (ON_MDI)
1 = the CNC operating mode MANUAL is active
(ON_JOGMODE)
1 = the CNC operating mode HOMING is
active (ON_HOMING)

2.4.1.5. ON_INC_JOG -- INCREMENTAL JOG MODE

This signal is used to inform the PLC Program that the Incremental Jog Mode
is active.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Incremental Jog mode is not active
1 Incremental Jog mode is active

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 This mode is not active.
1 The Incremental Jog mode is active because either the operator has
activated it in Manual mode or the PLC has requested this mode via
the IN_EXTMODE value (see 2.3.9.1.3).

PLC Interface Manual


page 148 / 304
MACHINEMATE®

2.4.1.6. ON_CONT_JOG -- CONTINUOUS JOG MODE

This signal is used to inform the PLC Program that the Continuous Jog Mode is
active.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Continuous Jog mode is not active
1 Continuous Jog mode is active

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 This mode is not active.
1 The Continuous Jog mode is active because either the operator has
activated it in Manual mode or the PLC has requested this mode via
the IN_EXTMODE value (see 2.3.9.1.3).

2.4.1.7. ON_CNC_CHAN_ACT -- CNC STATION ACTIVE ON HMI

This signal is used to inform the PLC Program that this CNC Station/Channel is
active on the current operator display (HMI).

Value Meaning
---------------------------------------------------------------------------------------------------
0 CNC station is not active
1 CNC station is active

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 This CNC station is not active.
1 This CNC station is active because either the operator has activated it
using the soft keys or the PLC has requested this station via the
SELECT_NC_STATION function (see 3.45).

PLC Interface Manual


page 149 / 304
MACHINEMATE®

2.4.1.8. ON_EMERG -- CNC emergency stop

This signal is used to inform the PLC Program than an emergency stop
condition is active.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Emergency stop is not active
1 Emergency stop is active

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 There is no emergency stop.
1 An emergency stop is active because INEMERGENCn is false in the
PLC (active low) or there is an axis hardware fault (such as a loss of
encoder feedback) or there is some other CNC error resulting in a
system emergency stop.

To restore the CNC to its normal operations, a ‘control reset’ is required. This
can be done in two ways:
1. The operator presses simultaneously the Ctrl and Reset buttons on the
front panel. (An external PC keyboard Ctrl and R key combination also
does this.)
2. The PLC performs the Control-Reset command (see IN_EXTMODE,
2.3.9.1.3). This PLC action is usually in response to a particular input
or event.
Either of these actions will result in the signal ON_RESET (see 2.4.1.11) being
ON during this ‘control reset’ processing.
Upon this ‘control reset’ action, the CNC will attempt to resume its normal
operations. This could fail due to one of two reasons:
1. If there is a PLC emergency stop indicated (see INEMERGENCn,
2.3.1.1) then the CNC will maintain its emergency stop state.
2. If there is a serious CNC fault detected (such as an encoder loss of
feedback or an IO bus error) then the CNC will maintain its emergency
stop state.
If the CNC cannot reset after the ‘control reset’ action then the ON_EMERG
signal would remain true.

PLC Interface Manual


page 150 / 304
MACHINEMATE®

2.4.1.9. ON_PRG_STP -- PROGRAM STOP (M00/M01)

This signal informs the PLC Program that an NC program run was interrupted
as M00 or M01 became effective. For further processing of the NC PROGRAM
after a program stop a "start" is necessary (see chapter 2.3.1.2 "dword 1,
IN_START (NC cycle start)").

Value Meaning
---------------------------------------------------------------------------------------------------
0 Program stop (M00/M01) not active
1 Program stop (M00/M01) active

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 The CNC is not in the CNC operating mode AUTOMATIC sequential
block, AUTOMATIC single block or MDI.
Program stop (M00/M01) is not active in the active NC block.
1 The CNC is in the CNC operating mode AUTOMATIC sequential
block, AUTOMATIC single block or MDI.
Program stop (M00/M01) is active.

0→ 1 Program stop (M00/M01) is active, i.e., the CNC is in one of the CNC
operating modes given above and M00 or M01 is programmed in
the active NC block.
The NC block is terminated, i.e., all additionally programmed
functions, such as an interpolation, were executed.
1→ 0 Program stop (M00/M01) is overridden when
- CNC has a "cycle start" (see chapter 2.3.1.2 "dword 1, IN_START
(NC cycle start)") executed
- The MMI is changed to the CNC operating mode MANUAL
- CNC performed CONTROL RESET.

Note:
• Since the NC letter M is always set as a BCD-code, then
programmed M00 or M01 is also submitted as a BCD-code (see
chapter 2.4.2.16 "dword 2, ON_STROBE1 (BCD strobes)" and
chapter 2.4.3 "dword 3,4, ONBCDWORD1,2"). This delivery is
always performed at the beginning of the execution of an NC
block. The signal ON_PRG_STP (program stop (M00/M01))
always receives the value 1 after the end of the execution of the
NC block.

• A programmed M01 is always submitted as a BCD-code, but only


initiates a program stop however if the function "alternative
program stop (M01)" was activated at the control panel of the
control (this can be achieved by selection of AUTOMATIC → F3:
Program process 2 → F2: optional Halt (M01)).

• This signal is set for the M01 only when that operator feature is
enabled (M01 Operator Stop). If that feature is not enabled, then
the M01 is ignored by the CNC.

PLC Interface Manual


page 151 / 304
MACHINEMATE®

• This signal is also valid when the test operation "without motion"
is active.

• Further information about M00 and M01 can be found in the NC


Programming Manual of the control (see the chapter about
“influencing the program").

2.4.1.10. ON_PRG_END -- END OF PROGRAM (M02/M30)

This signal informs the PLC Program that an NC program run was terminated
when M02 or M30 became effective.

Value Meaning
---------------------------------------------------------------------------------------------------
0 End of Program (M02/M30) not active
1 End of Program (M02/M30) active

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 - The CNC is not in the CNC operating mode AUTOMATIC sequential
block, AUTOMATIC single block or MDI.
- The execution of an NC PROGRAM is active.
- After "CONTROL RESET" or after switching to an AUTOMATIC
operating mode no M02/M30 was executed.

1 The CNC is in the CNC operating mode AUTOMATIC sequential


block, AUTOMATIC single block or MDIAUTOMATIC Manual-NC
and End of Program (M02/M30) is active.

0→ 1 End of Program (M02/M30) is active, i.e. the CNC is in one of the


CNC operating modes mentioned above and M02 or M30 is
programmed in the active NC block of a main program. The NC
block is finished, i.e. all additionally programmed functions, like an
interpolation for instance, were executed.
At the end of this end of program processing, the CNC performs an
internal ‘control reset’ action. The signal ON_RESET (see 2.4.1.11)
will be ON during this internal reset.

1→ 0 End of Program (M02/M30) is overridden when


- A "start" (see chapter 2.3.1.2, IN_START (NC cycle start)) is
executed;
- a change is made to the CNC operating mode MANUAL ;
- "CONTROL RESET" is performed.

Note:
• Since the NC-letter M is always preset as a BCD-code, a
programmed M02 or M30 is also submitted as a BCD-code (see
chapter 2.4.2.16 "dword 2, ON_STROBE1..4 (BCD strobes)" and
PLC Interface Manual
page 152 / 304
MACHINEMATE®

chapter 2.4.3 "dword 3,4, ONBCDWORD1,2"). This delivery is


always performed at the beginning of the execution of an NC
block. The signal ON_PRG_END (end of program (M02/M30))
always receives the value 1 after the end of the execution of the
NC block.

• The causes and effects of M02 and M30 as described here are
only valid if these codes appear in an NC PROGRAM, which is
processed as a main program.

If these codes appear in an NC PROGRAM, which is selected by


another NC PROGRAM as a subroutine, these codes only cause
a jump back to the calling NC PROGRAM. Their characteristic as
a BCD-code and the consequences of this signal are suppressed
here (i.e., the above signal is not set nor does the PLC get the
BCD strobe).

• The effects of M02 and M30 are absolutely identical. That the
same function exists for two codes is due to historic reasons and
preserves the compatibility with old NC PROGRAMS.

• Further information about M02 and M30 can be found in the NC


Programming Manual of the control (see the chapter about
“influencing the program").

• This signal is also valid when the test operation "without motion"
is active.

PLC Interface Manual


page 153 / 304
MACHINEMATE®

2.4.1.11. ON_RESET -- CONTROL RESET


This signal communicates to the PLC Program that "CONTROL RESET" is
executed in the CNC. This signal can also be used to reset run logic in the PLC
Program.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The execution of the CONTROL RESET is not active
1 The execution of the CONTROL RESET is active

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 Normal condition
1 The CNC executes CONTROL RESET.

0→ 1 - The execution of the CONTROL RESET is activated by:


- the end of the start up phase of the control;
- an operation at the control panel of the control;
- the additional function "CONTROL RESET" of the external operating
mode selection (see chapter 2.4.8.1 "dword 9, ONEXTMODE");
- For the effect of M02 or M30 in a NC main program see control NC
Programming Manual;
- the end of a homing cycle in the CNC operating mode HOMING

1→ 0 The execution of the CONTROL RESET is terminated so the CNC is


now ready for further functions.

Note:
• While the CNC executes CONTROL RESET, no further functions
can be activated.

• This signal only has the value 1 during the execution of CONTROL
RESET. If this time is smaller than the preset interval time
between two BCD-codes (see chapter 2.4.2.16 "dword 2,
ON_STROBE1..4 (BCD strobes)"), the machine parameter
BCDDistanceTime value should be increased to guarantee a sure
recognition by the PLC Program.

• The execution of the CONTROL RESET is also terminated if an


intended acknowledgement of errors or locking is not possible.
Therefore states can still prevail after an executed CONTROL
RESET in the control which prevent the activation of certain
functions.

PLC Interface Manual


page 154 / 304
MACHINEMATE®

2.4.1.12. ON_NO_CNTR -- NO FEEDBACK CONTROL

This signal communicates to the PLC Program that in principle all control loops
in the CNC are open.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The control loops of the CNC are not opened in principle
1 All control loops of the CNC are opened in principle

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 - Normal condition, neither the EMERGENCY STOP locking nor the
test operation "without motion" are active, the state of the individual
control loops is directed according to the control loop enable signals
IN_DRON01..32 (see chapter 2.3.2.1 "dword 3").
1 The EMERGENCY STOP locking or the test operation "without
motion" is active in the CNC.

0→ 1 - No further causes
1→ 0 No further causes

Note:
• If this signal has the value 1, 0 volt is output at the D/A-output of
each axis (Analog) or Stop updating Position or Velocity
command (Sercos).

• Even if this signal has the value 0, it can be that not all axes are
regulated, since the state of the individual control loops are
directed according to the control loop enable signals
IN_DRON01..32 (see chapter 2.3.2.1 "dword 3").

PLC Interface Manual


page 155 / 304
MACHINEMATE®

2.4.1.13. ON_HOME_OK -- HOME POSITION OK

This signal communicates to the PLC Program that all mandatory homing axes
have already performed their homing cycle.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Not all mandatory homing axes have already performed their homing cycle
successfully.
1 All mandatory homing axes have already performed their homing cycle
successfully.

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 - After turning the controller on, all necessary homing cycles have not yet
been performed successfully.
- At least one mandatory homing axis has lost its homing again. This can
only occur if a homing cycle is interrupted or if an error appears in the
measuring circle of a mandatory homing rotational axis while this axis
was being operated as a spindle and the automatic repeating of the
homing cycle could not be performed.

1 All necessary homing cycles have already been performed successfully,


so NC PROGRAMS can now be processed and axes can be manually
positioned.

0→ 1 - No further causes
1→ 0 No further causes

Note:
• If this signal has the value 0, axes can only be positioned manually if
the function "MANUAL enable" was activated (see chapter 2.4.8.1
"dword 9, ONEXTMODE"), and NC blocks can only be executed if
the test operation "without motion" was activated.

• If no axes of the controller are mandatory homing, this signal always


has the value 1.

PLC Interface Manual


page 156 / 304
MACHINEMATE®

2.4.1.14. ON_NCERROR -- NC PROGRAM ERROR

This signal communicates to the PLC Program that the CNC has recognized an
error.

CNC errors are states that might endanger the operational safety of the
machine or prevent the further execution of active functions or the processing
of NC Programs in general.

Value Meaning
---------------------------------------------------------------------------------------------------
0 No CNC error states are active
1 A CNC error states is active

The control divides CNC errors into 3 classes with regard to the error reaction
and the possibility of error acknowledgement:

a) Safety relevant, non acknowledgeable error states

These errors include:


- Hardware errors in peripheral bus systems;
- Hardware errors in the axis control electronics.

CNC Error reaction:


- The safety relay "NC READY" is opened.
- The EMERGENCY STOP locking (see chapter 2.3.1.1
"dword 1, INEMERGENCn") is activated.
- This signal receives the value 1.

Operator Error acknowledgement:


- Switching the CNC on and off.

b) Safety relevant, acknowledgeable error states

These errors include:


- Servo errors, i.e. an axis exceeds its maximum following
error.

CNC Error reaction:


- The safety relay "NC READY" is opened.
- The EMERGENCY STOP locking (see chapter 2.3.1.1
dword 1, INEMERGENCn") is activated.
- This signal receives the value 1.

Operator Error acknowledgement:


- CONTROL RESET (see chapter 2.1.4 "Notes concerning
terminology");
- EMERGENCY STOP of the CNC.

c) Error state during the execution of active functions, which prevents

PLC Interface Manual


page 157 / 304
MACHINEMATE®

further execution

These errors include:


- Syntax errors or checksum errors in NC Programs;
- Errors in the geometric preparation.

CNC Error reaction:


- The execution of the function is interrupted.
- This signal receives the value 1.

Operator Error acknowledgement:


- Remove the error;
- CONTROL RESET (see chapter 2.1.4 "Notes concerning
terminology");
- EMERGENCY STOP of the CNC.

2.4.1.15. ON_ADDKEY1 -- AUXILIARY PUSH-BUTTON 1

This signal is used to inform the PLC Program whether the first auxiliary push-
button on the control (i.e., MCP, Machine Control Panel) is active.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Auxiliary push-button 1 is not active
1 Auxiliary push-button 1 is active

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 A "low"-level is present in the predefined input of the control
(connected auxiliary push-button 1 is not active).
1 A "high"-level is present in the predefined input of the control
(connected auxiliary push-button 1 is active).

Note:
• Which function is activated by the connected push-button
depends on the PLC Program.

• The connection of the auxiliary pushbutton to this interface signal


is done by the machine parameter AdditionKeyIOAddress in
the FeedOverride group.

PLC Interface Manual


page 158 / 304
MACHINEMATE®

2.4.1.16. ON_ADDKEY2 -- AUXILIARY PUSH-BUTTON 2

This signal is used to inform the PLC Program whether the auxiliary push-
button 2 connected on the control (i.e., MCP, Machine Control Panel) is active.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Auxiliary push-button 2 is not active
1 Auxiliary push-button 2 is active

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 A "low"-level is present in the predefined input of the control
(connected auxiliary push-button 2 is not active).
1 A "high"-level is present in the predefined input of the control
(connected auxiliary push-button 2 is active).

Note:
• Which function is activated by the connected push-button
depends on the PLC Program.

• The connection of the auxiliary pushbutton to this interface signal


is done by the machine parameter AdditionKeyIOAddress in
the FeedOverride group.

2.4.1.17. ON_PROGRAM -- PROGRAM ACTIVE


This signal is used to inform the PLC Program that an NC part program is
active. It is true when a part program is started and stays true until the
program is ended with a reset, M02 or M30. A feed hold (cycle stop) or an
M00/M01 (operator stop) do not zero this flag.

Value Meaning
---------------------------------------------------------------------------------------------------
0 A part program is not active
1 A part program is active

ON_PROGRAM is 0 during an AUTOMATIC-Manual NC (MDI) command and


if no part program is active.

2.4.1.18. ON_ADMISSN -- ADMISSION


This signal is from the Teach-In Panel.

2.4.1.19. ON_PANEL -- TEACH PANEL ACTIVE


This signal indicates the remote Teach-In Panel is active.

PLC Interface Manual


page 159 / 304
MACHINEMATE®

2.4.1.20. ON_RETREAT -- RETREAT (RETURN TO PATH)

This signal is set when the Manual Mode Retreat feature is active.
The activation of this feature allows the axes to return to the part program path,
if they were moved during Manual Mode, upon a Cycle Start in Automatic
Mode.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Retreat (return to path) mode is not active
1 Retreat (return to path) mode is active - CNC will return to the part
program path upon a Cycle Start.

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 This mode is not active.
This mode is disabled automatically after the return to path has
completed.
1 The Retreat (return to path) mode is active because either the
operator has activated the mode using the soft key in Manual mode
or the PLC has activated the mode via the IN_EXTMODE value
(see 2.3.9.1.3).

2.4.1.21. ON_BACKW -- BACKWARD


This signal is set while the AUTOMATIC → BACKWARD motion is active.
Value Meaning
---------------------------------------------------------------------------------------------------
0 Backward mode is not active
1 Backward mode is active - CNC will process the blocks in the part
program in the reverse direction (toward the start not the end).

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 This mode is not active.
1 The Backward mode is active because either the operator has
activated the mode using the soft key in Automatic mode or the PLC
has activated the mode via the IN_BACKWARD signal (see
2.3.1.11).

2.4.1.22. ON_TEACHED -- TEACH-Editor


This signal is set when the teach editor is open.

PLC Interface Manual


page 160 / 304
MACHINEMATE®

2.4.1.23. ON_BLKCHNG -- BLOCKCHANGE


This signal belongs to the EDM functions.

2.4.1.24. ON_M1STOP -- M01 OPTIONAL STOP ACTIVE


This signal is used to inform the PLC Program that the M01 Optional Stop
Mode is active.

Value Meaning
---------------------------------------------------------------------------------------------------
0 M01 Optional Stop mode is not active
1 M01 Optional Stop mode is active

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 This mode is not active.
1 The M01 Optional Stop mode is active because either the operator
has activated it in Automatic mode or the PLC has requested this
mode via the IN_M1STOP value (see 2.3.1.12).

2.4.1.25. ON_WITH_MOVE -- AXES WILL MOVE DURING


PROGRAM
This signal is used to inform the PLC Program that the CNC will move the axes
while running an NC program. If this signal if FALSE, then the ‘test run without
movement’ mode is active.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Axes will move during an NC program
1 Axes will not move during an NC program - test run without movement

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 The test run without movement is not active.
1 The Test Run Without Movement mode is active because either the
operator has activated it in Automatic mode or the PLC has
requested this ‘without movement’ mode via the IN_WITH_MOVEn
signal (see 2.3.1.13).

This signal, when TRUE, indicates that the D/A output to analog drives from the
CNC will be 0 volts during this test mode. If there is an analog offset voltage
present in the drive or its analog interface then it is possible that the drive
position(s) might drift while this Test Without Movement mode is active. For
that reason, the analog drives should be disabled so they do not move by any
analog offset voltage when this signal is TRUE.

PLC Interface Manual


page 161 / 304
MACHINEMATE®

2.4.1.26. ON_G01_OVER -- G01 OVERRIDE ACTIVE


This signal is used to inform the PLC Program that the G01 Override Mode is
active.

Value Meaning
---------------------------------------------------------------------------------------------------
0 G01 Override mode is not active
1 G01 Override mode is active, so the part program axis motions will be at
rapid (G00) rather than at the programmed feedrate (G01).

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 This mode is not active.
1 The G01 Override mode is active because either the operator has
activated it in Automatic mode or the PLC has requested this mode
via the IN_G01_OVER signal (see 2.3.1.10).

2.4.1.27. ON_BLOCK_DEL -- BLOCK DELETE (/) ACTIVE


This signal is used to inform the PLC Program that the Block Delete (/) Mode is
active. In this mode, NC blocks that start with the / character are skipped (or
they are deleted from the block processing). This feature is also sometimes
called Block Skip.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Block Delete (/) mode is not active
1 Block Delete (/) mode is active

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 This mode is not active.
1 The Block Delete (/) mode is active because either the operator has
activated it in Automatic mode or the PLC has requested this mode
via the IN_BLOCK_DEL signal (see 2.3.1.9).

PLC Interface Manual


page 162 / 304
MACHINEMATE®

2.4.1.28. ON_PITCHERR -- PITCH ERROR COMP ACTIVE


This signal is used to inform the PLC Program that the Pitch Error
Compensation Mode is active.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Pitch Error Compensation mode is not active
1 Pitch Error Compensation mode is active

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 This mode is not active.
1 The Pitch Error Compensation mode is active because either the
operator has activated it in Setup mode or the PLC has requested
this activation via the IN_PITCHERR signal (see 2.3.1.14).

PLC Interface Manual


page 163 / 304
MACHINEMATE®

2.4.2. ONGENERAL 2 (dword 2), general state signals 2

In this dword several state signals are summed so that the PLC Program can
recognize states that are associated with the execution of NC blocks:

Bit
1 ON_STAND STANDSTILL
2 ON_RAPID RAPID TRAVERSE
3 ON_THREAD G33/G34 active
4 ON_HOMEOK HOMEOK
5 ON_INTVEND INTVEND
6 ON_INTRET INTRET
7 ON_INTVHLD INTVHLD
8 ON_EGB_ACTIVE EGB (Gear Hobber) ACTIVE
9 ON_EGB_SYNC EGB TABLE SYNCHRONIZED
10 ON_READ_TO_BLK ‘READ TO BLOCK’ IN PROGRESS
11 ON_HDW_TICKS_LOST1 HANDWHEEL 1 LOST TICKS IN SPIN
12 ON_HDW_TICKS_LOST2 HANDWHEEL 2 LOST TICKS IN SPIN
13 ON_HDW_TICKS_LOST3 HANDWHEEL 3 LOST TICKS IN SPIN
14 ON_TRANSF BLOCK TRANSFER ENABLE STATUS
15 ON_CYCLE_STOP CYCLE STOP (FEED HOLD) ACTIVE
16 Reserved
17 ON_AUTOFOCUS DISTANCE CONTROL FEATURE
18 ON_DIST_CTRL DISTANCE CONTROL ACTIVE
19
... Reserved
28
29 ON_STROBE1 BCD STROBE 1
30 ON_STROBE2 BCD STROBE 2
31 ON_STROBE3 BCD STROBE 3
32 ON_STROBE4 BCD STROBE 4

The individual signals can be evaluated independent of each other.


Note: The signals for bits 8 through 13 were added in CNC version 2.0 so they
did not exist in earlier versions. The signal for bit 14 was added in CNC version
2.1 so it did not exist in earlier versions. The signal for bit 15 was added in
CNC version 2.2 so it did not exist in earlier versions.

PLC Interface Manual


page 164 / 304
MACHINEMATE®

2.4.2.1. ON_STAND -- STANDSTILL

With this signal the PLC Program can recognize whether axes are interpolated.

Value Meaning
---------------------------------------------------------------------------------------------------
0 At least one axis is interpolated.
1 No axes are interpolated.

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 - In the CNC operating modes AUTOMATIC next block, AUTOMATIC
single block or MDI a NC block is executed, in which an
interpolation is programmed.
The signal IN_ENABLE (feed enable all axes, see chapter 2.3.1.5
"dword 1") does not have the value 1 and the feed override rotary
switch is positioned on 0%.
- An axis is positioned in the CNC operating mode MANUAL.
- A homing cycle is active in the CNC operating mode HOMING and for
the feed rate enable signal at least one of the axes involved has the
value 1 and the feed rate override rotary switch is positioned on 0%.

1 - The rest state (CYCLES OFF) in the CNC is active.


- No interpolation is programmed in the active NC block.
- An active interpolation is interrupted by the feed rate hold locking (see
chapter 2.3.1.3 "dword 1, IN_STOPn (feed hold)") or by a missing
feed rate enable (see chapter 2.3.1.5 "dword 1, IN_ENABLE (feed
enable all axes)" and chapter 2.3.4 "dword 4, IN_DRIVEEN") or
stopped by the feed rate override rotary switch position 0%.
- The EMERGENCY STOP locking (see chapter 2.3.1.1 " dword 1,
INEMERGENCn") in the CNC is active.

0→ 1 No further causes
1→ 0 No further causes

Note:
• This signal is also valid when the test operation "without motion"
is active or the control loop enable signals (see chapter 2.3.2.1"
dword 3, IN_DRIVEON") have the value 0.
This signal cannot be used to directly determine whether the
axes are actually physically positioned at their end points (see
ONINPOS).

PLC Interface Manual


page 165 / 304
MACHINEMATE®

2.4.2.2. ON_RAPID -- RAPID TRAVERSE

With this signal the PLC Program can recognize that the rapid traverse (G00) is
active during the execution of NC blocks.
Concerning this it can be decided with the corresponding programming in the
NC PROGRAM, whether a "processing" or a "positioning" is active.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Rapid traverse (G00) is not active
1 Rapid traverse (G00) is active

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 The CNC is not in the CNC operating mode AUTOMATIC sequential
block, AUTOMATIC single block or MDI. In the active NC block rapid
traverse (G00) is not active.

1 The CNC is in the CNC operating mode AUTOMATIC sequential block,


AUTOMATIC single block or MDI. In the active NC block rapid traverse
(G00) is active.

0→ 1 No further causes
1→ 0 No further causes

Note:
• Rapid traverse is always active if in the G-code group 1 the G-code
G00 is in effect. This can be achieved by programming G00 or by a
corresponding preset of the G-codes (at CONTROL RESET). More
about the G-code-groups or the functionality of G-code can be found
in the NC Programming Manual of the control (see the chapter
about "basics of the NC-programming, Program word").

• Since the G-code G00 is only relevant for the CNC operating modes
AUTOMATIC sequential block, AUTOMATIC single block or MDI is
(different to G70/71 for instance), this signal also only receives the
value 1 if the CNC is in one of the named CNC operating modes.

• This signal is also valid, when the test operation "without motion" is
active.

• If NC blocks are executed in the test operation "G01 override", then


the NC blocks in which linear interpolation in the feed rate (G01) is in
effect are also interpolated with the rapid traverse feed rate.
Since however in the real sense G00 is not in effect, this signal in
this case nevertheless receives the value 0.

PLC Interface Manual


page 166 / 304
MACHINEMATE®

2.4.2.3. ON_THREAD -- G33/34 ACTIVE

Via this signal the PLC Program can recognize that thread cutting (G33/34) is
active during the execution of NC blocks.

Thus in situations in which machine movements should be stopped, it can be


decided which measures are to be used to achieve this (see chapter 2.3.1
"dword 1").

Value Meaning
---------------------------------------------------------------------------------------------------
0 Thread cutting (G33/34) is not active
1 Thread cutting (G33/34) is active

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 The CNC is not in the CNC operating mode AUTOMATIC sequential
block, AUTOMATIC single block or MDI. In the active NC block
thread cutting (G33/34) is not active.

1 The CNC is in the CNC operating mode AUTOMATIC sequential


block, AUTOMATIC single block or MDI and thread cutting (G33/34)
is active.

0→ 1 No further causes

1→ 0 No further causes

Note:
• To stop or interrupt NC Blocks in which thread cutting (G33/34) is
active, particular conditions are valid (see chapter 2.3.1.3" dword
1, IN_STOPn (feed hold), chapter 2.3.1.4 IN_TRANSF (transfer
enable), chapter 2.3.1.5 IN_ENABLE (feed enable all axes)").

• If the test operation "without motion" is active, NC blocks are not


interpolated with programmed thread cutting (G33/34), but
skipped over. In such cases this signal does therefore not receive
the value 1.

PLC Interface Manual


page 167 / 304
MACHINEMATE®

2.4.2.4. ON_HOMEOK -- HOMEOK

With this signal the PLC PROGRAM can recognize that the programmed
homing cycle (G74) is active.

This signal should not be confused with ON_HOME_OK (see 2.4.1.13)


which has a very similar signal name.

Value Meaning
---------------------------------------------------------------------------------------------------
0 A part program G74 (move to home) is not active
1 A part program G74 (move to home) is active

2.4.2.5. EDM functions signals

2.4.2.5.1. ON_INTVEND -- INTERVAL AT HOMING

This signal belongs to the EDM functions.

2.4.2.5.2. ON_INTRET -- INTERVAL AT RETURN

This signal belongs to the EDM functions.

2.4.2.5.3. ON_INTVHLD -- INTERVAL AT HOLD POSITION

This signal belongs to the EDM functions.

PLC Interface Manual


page 168 / 304
MACHINEMATE®

2.4.2.6. ON_EGB_ACTIVE -- EGB ACTIVE


This signal is used to inform the PLC Program that the Electronic Gear Box
(EGB, or Gear Hobber) Mode is active.

Value Meaning
---------------------------------------------------------------------------------------------------
0 EGB mode is not active
1 EGB mode is active

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 This mode is not active.
1 The EGB mode is active because NC Program has activated it (the
G-code normally assigned to activate this feature is G81, but the G-
code is programmable).

2.4.2.7. ON_EGB_SYNC -- EGB TABLE SYNCHRONIZED


This signal is used to inform the PLC Program that the EGB Table is
synchronized.

A machine parameter (EGBSynchronDifferencePLC) defines the tolerable


difference in the table position before the table is considered not synchronized.

Value Meaning
---------------------------------------------------------------------------------------------------
0 EGB table is not synchronized
1 EGB table is synchronized

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 The difference between the actual table position (while EGB is active)
and the commanded table position is greater than the defined
tolerance.
1 The difference between the actual table position (while EGB is active)
and the commanded table position is less than the defined
tolerance.

PLC Interface Manual


page 169 / 304
MACHINEMATE®

2.4.2.8. ON_READ_TO_BLK -- READ TO BLOCK IS ACTIVE


This signal is used to inform the PLC Program that the ‘Read to Block’
processing at the start of an NC program is active. This signal enables the PLC
program either to act on BCD codes immediately during this initial block
scanning/processing or to wait until the selected NC block is reached (perhaps
delaying some machine actions until that time).

Value Meaning
---------------------------------------------------------------------------------------------------
0 Read to Block mode is not active
1 Read to Block mode is active - CNC is scanning blocks in the NC
program until the selected NC block is reached.

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 This mode is not active.
1 The Read to Block mode is active because the operator has activated
the NC block search in Automatic mode. The signal remains TRUE
until the selected NC block is reached.

This signal, when TRUE, indicates that the CNC is scanning the part program
through the blocks to get to the specified target block. The CNC will not
perform any axis motion during this process. If there is mechanical movement
required by M-codes or T-codes during this scan typically the PLC will ignore
those M-codes so that the ‘read to block’ gets to the correct block without such
unexpected mechanical motions (such as tool changes or turret moves). The
PLC should hold such actions until the cycle start that follows the ‘read to’ –
when the program actually begins execution at the target block. That is when
such actions would be expected to occur (like coolant on, which could have
been turned on and off many times prior to the target block).

2.4.2.9. ON_HDW_TICKS_LOST1 -- HANDWHEEL 1 LOST TICKS ON


RAPID SPIN
This signal is used to inform the PLC Program that the operator’s use of the
first handwheel resulted in a number of input transitions being lost. This can
occur if the operator rapidly spins the first handwheel and then quickly stops it.
If the axis being moved by the handwheel ticks was not exactly tracking those
ticks (e.g., there was some following error present), at the moment the
handwheel stops its motion, the axis will stop its motion, even if the axis motion
did not match all the handwheel ticks. Because the axis stopping upon a
handwheel stopping is more important than the axis catching up with all the
handwheel ticks, this signal is provided for information and is not considered an
error.

Value Meaning
---------------------------------------------------------------------------------------------------
0 No lost ticks on handwheel 1
1 At least one lost tick on handwheel 1

PLC Interface Manual


page 170 / 304
MACHINEMATE®

2.4.2.10. ON_HDW_TICKS_LOST2 -- HANDWHEEL 2 LOST TICKS ON


RAPID SPIN
This signal is used to inform the PLC Program that the operator’s use of the
second handwheel resulted in a number of input transitions being lost. This can
occur if the operator rapidly spins the second handwheel and then quickly
stops it. If the axis being moved by the handwheel ticks was not exactly
tracking those ticks (e.g., there was some following error present), at the
moment the handwheel stops its motion, the axis will stop its motion, even if
the axis motion did not match all the handwheel ticks. Because the axis
stopping upon a handwheel stopping is more important than the axis catching
up with all the handwheel ticks, this signal is provided for information and is not
considered an error.

Value Meaning
---------------------------------------------------------------------------------------------------
0 No lost ticks on handwheel 2
1 At least one lost tick on handwheel 2

2.4.2.11. ON_HDW_TICKS_LOST3 -- HANDWHEEL 3 LOST TICKS ON


RAPID SPIN
This signal is used to inform the PLC Program that the operator’s use of the
third handwheel resulted in a number of input transitions being lost. This can
occur if the operator rapidly spins the third handwheel and then quickly stops it.
If the axis being moved by the handwheel ticks was not exactly tracking those
ticks (e.g., there was some following error present), at the moment the
handwheel stops its motion, the axis will stop its motion, even if the axis motion
did not match all the handwheel ticks. Because the axis stopping upon a
handwheel stopping is more important than the axis catching up with all the
handwheel ticks, this signal is provided for information and is not considered an
error.

Value Meaning
---------------------------------------------------------------------------------------------------
0 No lost ticks on handwheel 3
1 At least one lost tick on handwheel 3

PLC Interface Manual


page 171 / 304
MACHINEMATE®

2.4.2.12. ON_TRANSF -- BLOCK TRANSFER ENABLE STATUS


This signal informs the PLC Program of the current NC block transfer enable
status (that can be affected by the PLC signal IN_TRANSF; see 2.3.1.4). This
signal is the acknowledgement by the CNC of the IN_TRANSF command by
the PLC.

Value Meaning
---------------------------------------------------------------------------------------------------
0 NC block transfer enable is not active
1 NC block transfer enable is active so the next NC block can be
processed, if other CNC conditions permit.

2.4.2.13. ON_CYCLE_STOP -- CYCLE STOP (FEED HOLD) ACTIVE


This signal informs the PLC Program of the current NC cycle stop (or feed
hold) status (that can be affected by the PLC signal IN_STOPn; see 2.3.1.3).
This signal represents only the cycle stop condition. For example, when a part
program completes (with the M30, ON_PRG_END becomes TRUE) so the
ON_PROGRAM turns off, this signal is not active because the NC status is not
cycle stop; it is cycle off (no program is active).

Value Meaning
---------------------------------------------------------------------------------------------------
0 NC cycle stop (feed hold) status is not active
1 NC cycle stop (feed hold) status is active. A cycle start is required to
resume the part program execution.

2.4.2.14. ON_AUTOFOCUS -- DISTANCE CONTROL FEATURE


This signal is used to inform the PLC Program that the ‘auto focus’ status of the
distance control feature is active in the CNC.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Auto Focus status is not active
1 Auto Focus status of distance control feature is active.

2.4.2.15. ON_DIST_CTRL -- DISTANCE CONTROL IS ACTIVE


This signal is used to inform the PLC Program that the ‘Distance Control’
feature (also called ‘distance regulation’) is active in the CNC

Value Meaning
---------------------------------------------------------------------------------------------------
0 Distance Control feature is not active
1 Distance Control feature is active.

PLC Interface Manual


page 172 / 304
MACHINEMATE®

2.4.2.16. ON_STROBE1 .. 4 -- BCD strobes

With these 4 bits the PLC Program is informed that a BCD-code is active in the
current NC block and the programmed value in the dwords 3 and 4 (see
chapter 2.4.3 "dword 3" and "dword 4, ONBCDWORD1,2") is available.

Among these 4 bits, only one bit can have the value 1 while the rest have the
value 0.

If all 4 bits have the value 0, then no BCD-code is active.

Value Meaning
---------------------------------------------------------------------------------------------------
0 BCD-code (dwords 3 and 4) is not valid
1 BCD-code (dwords 3 and 4) is valid

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 Normal condition, no BCD-code is active.

1 The CNC is in the operating mode AUTOMATIC sequential block,


AUTOMATIC single block or MDI and a programmed BCD-code is
available in the dwords 3 and 4.

0→ 1 A new BCD-code is available in the dwords 3 and 4.

1→ 0 The output duration of the active BCD-code is terminated.

Coding:

32 31 30 29 28 ... ... 1 Bit number

X X ... X X = arbitrary value

1 = 1st BCD-code active (ON_STROBE1)


1 = 2nd BCD-code active (ON_STROBE2)
1 = 3rd BCD-code active (ON_STROBE3)
th
1 = 4 BCD-code active (ON_STROBE4)

Explanation:
The BCD-codes, also called an auxiliary functions, are used to
submit values to the PLC Program in synchronism with the
processing of NC blocks. This happens when an NC-letter of a
BCD in a NC block is programmed with a value. The NC letters of
the BCD's are generally preset on "M", "S", "T" and "U". A

PLC Interface Manual


page 173 / 304
MACHINEMATE®

maximum of 4 BCD's (with a typical value range of 0 to 9999 for


each code) is possible.

The respective BCD letters are configured in the corresponding


machine parameter CharacterApplTab[x] when ‘x’ is the specific
NC letter for the desired BCD-code. This set of machine
parameters is in the NCAddressFormat group. For each BCD-code
the range of values for the character is configured by its machine
parameter CharacterApplTab.

The meaning of the individual values the respective BCD's depends


on the respective PLC Program. Indeed certain values of BCD's,
mainly at "M", are also directly processed by the CNC. Further
information about this can be found in the NC Programming Manual
of the control (see the chapter about "basics of the NC-
programming, auxiliary functions (BCD's)").
In a NC block all 4 BCD's can be programmed, but each BCD letter
however can only be programmed once. If several BCD's are
programmed, they are submitted to the PLC Program in a preset
sequence.

For the value delivery of the BCD-codes the dwords 3 and 4 are
used for all 4 BCD-codes, whereby the strobe-signals mark the
BCD in question and mark whether the value is valid, i.e., it is
active. The value 0 can also be submitted with it.

The delivery mechanism itself is executed over a preset time


function whereby an interval between 2 BCD-codes and an output
duration for each BCD can be separately adjusted.

To guarantee a sure recognition of the BCD-codes by the PLC


Program, each individual time must be adjusted to be larger than
the scan time of the PLC Program!

For each of the 4 BCD's it can be preset whether an interpolation


programmed in the same NC block should begin only after the
delivery of the BCD's to the PLC Program ("Interpolation Stop").

This is setup in the Machine parameter: BCDStrobeTime (in the


BCDProcessing group) and BCDDistanceTime (in the same
group). There is one value in BCDStrobeTime for each BCD (i.e., it
has four values) to define the number of milliseconds for that
letter’s strobe. The number of milliseconds in BCDDistanceTime
defines the time between consecutive BCD strobes as well as
defining the time to hold various CNC signals (e.g., ON_RESET) for
the PLC. If BCDDistanceTime is 0 (or the value is too small), then
some of these CNC signals might not be recognized within one
scan of the PLC application. The PLC programming tool supports
programmable task intervals for the PLC application if the default
interval of 50 milliseconds is not adequate. Those PLC task
intervals will affect the minimum required values for these machine
parameters. All the parameters values in this group have a default
value of 200 milliseconds to prevent this interface timing problem.

If machine functions are activated via BCD-codes, whose execution


times are longer than the output time of the BCD's, and if the
processing of the NC PROGRAM or an interpolation is to be
PLC Interface Manual
page 174 / 304
MACHINEMATE®

interrupted during the machine function, this can be preferably


controlled over the signals IN_TRANSF ( transfer enable) and
IN_ENABLE (feed enable all axes) (see chapter 2.3.1 "dword1").

Example:
Assume that in the control " M", "T"," S "and" U " are preset
as BCD's in this sequence, only "T" is preset with
"Interpolation Stop". In the same NC block M..., T..., U....
are programmed.
When the NC block is active and consequently executed,
the individual BCD-codes are transferred according to the
following temporal diagram:

t1 t2 t3 t4 t5 t6 t7

BCD STROBE 1
BCD STROBE 2
BCD STROBE 4

BCD-CODE
BCD-CODE
BCD-CODE

t1 t2 t3 t4 t5 t6 t7
Figure 7. BCD Strobe Timing Diagram

T1 = Strobe interval / 2;
Starts with the point in time as the NC block is executed

T2 = Strobe period of the 1st BCD-code ("M")

T3 = Strobe interval

T4 = Strobe period of the 2nd BCD-code ("T")

T5 = Strobe interval

T6 = Strobe period of the 4th BCD-code ("U")

T7 = Strobe interval / 2;
When this time duration is over, the current NC block is terminated, as
long as no other functions are still active (e.g., an interpolation).

Since the “T” BCD is preset with "Interpolation Stop" (i.e., bit 16 set in its
BCDStrobeTime value), an interpolation that is programmed in the same NC
block waits until the 2nd BCD’s strobe is terminated.

PLC Interface Manual


page 175 / 304
MACHINEMATE®

Note:
• The BCD-codes in the dwords 3 and 4 (see chapter 2.4.3 "dword 3,
4", ONBCDWORD1, 2) can only be evaluated when the
corresponding strobe-signal has the value 1.

• To ensure, that two successive identical BCD-codes (e.g., M77


twice) are also recognized by the PLC Program twice, the strobe-
signals must be evaluated over their rising edge (i.e., its value
change 0 → 1).

• After the transfer of a BCD-code is finished, this code in the dwords


3 and 4 (see chapter 2.4.3" dword 3, 4, ONBCDWORD1, 2") is not
cancelled, but is kept, until the next BCD-code is transferred.

• BCD-codes are also transferred if the test operation "without motion


"is active. If the PLC should ignore any BCD values when running
in this mode, the signal ON_WITH_MOVE (see 2.4.1.25) can be
checked.

• BCD-codes are also transferred during the part program “read to


block” operation is active, when the CNC is scanning all the blocks
up to the target block to begin execution for the CNC to determine
the correct axis positions and G-codes. If the PLC should ignore or
delay any BCD values when passing through blocks in this mode,
the signal ON_READ_TO_BLK (see 2.4.2.8) can be checked.

• The NC block with M19 (spindle orient command) and an S-word


will result in the strobe for the M but not for the S. The PLC will get
the S-word values for all spindle speeds but not for the spindle
orientation value. With this behavior the PLC does not have to
expect to filter the S that is different for M19 than for M3/M4 to get
the active S-code or spindle speed.

PLC Interface Manual


page 176 / 304
MACHINEMATE®

2.4.3. ONBCDWORD1, 2 (dword 3, 4), BCD-codes

The delivery of the value for the active BCD-code is executed over the dwords
3 and 4, whereby the eight lowest value decimal digits of the 16-digit BCD-code
are submitted with dword 3, and the eight highest value decimal digits with
dword 4.

Bit numbers from dword3 Bit numbers from dword4

1 ON_BCD01 BCD-CODE 1 33 ON_BCD33 BCD-CODE 100000000


2 ON_BCD02 BCD-CODE 2 34 ON_BCD34 BCD-CODE 200000000
3 ON_BCD03 BCD-CODE 4 35 ON_BCD35 BCD-CODE 400000000
4 ON_BCD04 BCD-CODE 8 36 ON_BCD36 BCD-CODE 800000000
5 ON_BCD05 BCD-CODE 10 37 ON_BCD37 BCD-CODE 1000000000
6 ON_BCD06 BCD-CODE 20 38 ON_BCD38 BCD-CODE 2000000000
7 ON_BCD07 BCD-CODE 40 39 ON_BCD39 BCD-CODE 4000000000
8 ON_BCD08 BCD-CODE 80 40 ON_BCD40 BCD-CODE 8000000000
9 ON_BCD09 BCD-CODE 100 41 ON_BCD41 BCD-CODE 10000000000
10 ON_BCD10 BCD-CODE 200 42 ON_BCD42 BCD-CODE 20000000000
11 ON_BCD11 BCD-CODE 400 43 ON_BCD43 BCD-CODE 40000000000
12 ON_BCD12 BCD-CODE 800 44 ON_BCD44 BCD-CODE 80000000000
13 ON_BCD13 BCD-CODE 1000 45 ON_BCD45 BCD-CODE 100000000000
14 ON_BCD14 BCD-CODE 2000 46 ON_BCD46 BCD-CODE 200000000000
15 ON_BCD15 BCD-CODE 4000 47 ON_BCD47 BCD-CODE 400000000000
16 ON_BCD16 BCD-CODE 8000 48 ON_BCD48 BCD-CODE 800000000000
17 ON_BCD17 BCD-CODE 10000 49 ON_BCD49 BCD-CODE 1000000000000
18 ON_BCD18 BCD-CODE 20000 50 ON_BCD50 BCD-CODE 2000000000000
19 ON_BCD19 BCD-CODE 40000 51 ON_BCD51 BCD-CODE 4000000000000
20 ON_BCD20 BCD-CODE 80000 52 ON_BCD52 BCD-CODE 8000000000000
21 ON_BCD21 BCD-CODE 100000 53 ON_BCD53 BCD-CODE 10000000000000
22 ON_BCD22 BCD-CODE 200000 54 ON_BCD54 BCD-CODE 20000000000000
23 ON_BCD23 BCD-CODE 400000 55 ON_BCD55 BCD-CODE 40000000000000
24 ON_BCD24 BCD-CODE 800000 56 ON_BCD56 BCD-CODE 80000000000000
25 ON_BCD25 BCD-CODE 1000000 57 ON_BCD57 BCD-CODE 100000000000000
26 ON_BCD26 BCD-CODE 2000000 58 ON_BCD58 BCD-CODE 200000000000000
27 ON_BCD27 BCD-CODE 4000000 59 ON_BCD59 BCD-CODE 400000000000000
28 ON_BCD28 BCD-CODE 8000000 60 ON_BCD60 BCD-CODE 800000000000000
29 ON_BCD29 BCD-CODE 10000000 61 ON_BCD61 BCD-CODE 1000000000000000
30 ON_BCD30 BCD-CODE 20000000 62 ON_BCD62 BCD-CODE 2000000000000000
31 ON_BCD31 BCD-CODE 40000000 63 ON_BCD63 BCD-CODE 4000000000000000
32 ON_BCD32 BCD-CODE 80000000 64 ON_BCD64 BCD-CODE 8000000000000000

The term "BCD" comes from the term "Binary Coded Decimal" and this
designates a type of coding by which the decimal digits 0-9 are respectively
displayed in 4 binary bits. The display therefore corresponds to the
hexadecimal-code, whereby the position context emerges from powers to the
PLC Interface Manual
page 177 / 304
MACHINEMATE®

base 10 and not to the base 16 and the four binary bit codes 1010 to 1111 (or
the hex digits A to F) are not used.

In other words, the hexadecimal value of a BCD-code is interpreted without


conversion to a decimal value.

Further information about BCD-codes can be found in the description the BCD
strobes in 2.4.2.16 "dword 2, ON_STROBE1..4".

Coding example for one byte (identical for all bytes):

8 7 6 5 4 3 2 1

2nd digit 1st digit

0000: 0 0000: 0
0001: 1 0001: 1
0010: 2 0010: 2
0011: 3 0011: 3
0100: 4 0100: 4
0101: 5 0101: 5
0110: 6 0110: 6
0111: 7 0111: 7
1000: 8 1000: 8
1001: 9 1001: 9
1010: not used 1010: not used
1011: not used 1011: not used
1100: not used 1100: not used
1101: not used 1101: not used
1110: not used 1110: not used
1111: not used 1111: not used

Examples:
Assuming:
"M", "T"," S "and" U "are preset as the four BCD's in this
sequence in the control.

PLC Interface Manual


page 178 / 304
MACHINEMATE®

1.) N100 M5

Dword2 Strobe-signals Bit no. 32 31 30 29

ON_STROBE1 0 0 0 1

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

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1
Dword3 = 5

Dword4 = 0

2.) N110 T1234567898765432

Dword2 Strobe-signals Bit no. 32 31 30 29

ON_STROBE2 0 0 1 0

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

1 0 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 1 1 0 0 1 0
Dword3 = 98765432

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

0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0
Dword4 = 12345678

PLC Interface Manual


page 179 / 304
MACHINEMATE®

3.) N120 S4000

Dword2 Strobe-signals Bit no. 32 31 30 29

ON_STROBE3 0 1 0 0

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

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Dword3 = 4000

Dword4 = 0

4.) N130 U0

Dword2 Strobe-signals Bit no. 32 31 30 29

ON_STROBE4 1 0 0 0

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

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Dword3 = 0

Dword4 = 0

Note:
• The BCD-codes in the dword 3 and 4 may only be evaluated if the
corresponding strobe-signal (see chapter 2.4.2.16 "dword 2,
ON_STROBE1..4") has the value 1.

• To ensure that two successive identical BCD-codes (e.g., M77


twice) in consecutive NC blocks are also recognized by the PLC
Program twice, the BCD strobe-signals must be evaluated over
their rising edge (i.e., the value change from 0 → 1).

• After the transfer of a BCD-code is finished, this code is not


cancelled but is kept until the next BCD-code is transferred.

• BCD-codes are also transferred if the test operation "without


motion" is active.

PLC Interface Manual


page 180 / 304
MACHINEMATE®

2.4.4. ONINPOS (dword 5), axis in position state signals

In this dword the "IN POSITION" state signals for all axes are summed, with a
maximum of 32:

Bit
1 ON_INP01 In position 1st axis
2 ON_INP02 In position 2nd axis
3 ON_INP03 In position 3rd axis
4 ON_INP04 In position 4th axis
5 ON_INP05 In position 5th axis
6 ON_INP06 In position 6th axis
7 ON_INP07 In position 7th axis
... ... ...
32 ON_INP32 In position 32nd axis

With these signals the PLC Program can recognize whether an axis is "IN
POSITION". An axis is essentially "IN POSITION" if it does not take part in an
active interpolation and its deviation from its end position (difference between
set position and machine's actual position) is smaller is than the adjustable
preset value (the machine parameter InpositioningArea).

The individual signals can be evaluated independent of each other.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Axis is not "IN POSITION"
1 Axis is "IN POSITION"

With a closed control loop (EMERGENCY STOP locking not active and axis
has "drive on") an axis exactly is "IN POSITION" then, when the internal set
position is equal to the pre-defined end position and the following error smaller
than the ‘in position’ window.

At active EMERGENCY STOP and "drive on" an axis is then only "IN
POSITION", when its machine's actual position is exactly equal to the pre-
defined end position.

If the control loop is opened by a missing "drive on", the axis is always taken as
being "IN POSITION" (exception: test without motion).

Of course the control loop is also opened in the test operation "without motion",
however the "IN POSITION" signal is treated here in the same way as with
closed control loop whereby the axis following error is assumed as being 0.
This is also valid at missing "motion on".
PLC Interface Manual
page 181 / 304
MACHINEMATE®

Note:
• An axis is also taken as being interpolated if the interpolation was
interrupted by the feed rate hold locking (see chapter 2.3.1.3"
dword 1, IN_STOPn (feed hold)") or by a missing feed rate
enable (see chapter 2.3.1.5 "dword 1, IN_ENABLE (feed enable
all axes)" and chapter 2.3.2.1 "dword 3, IN_DRIVEON") or was
stopped by the feed rate override rotary switch position 0%.

• An axis then always has "drive on" if its control loop enable signal
(see chapter 2.3.2.1 "dword 3, IN_DRIVEON") has the value 1.

• The following error of an axis is formed from the difference


between the internal set position and the machine's actual
position.
The internal set position is the result of the interpolation. It is only
formed from the machine's position at the closing of the position
control loops. Therefore an axis can also have a following error
during active EMERGENCY STOP without a command voltage
being output.

• The end position is programmed in the NC PROGRAM. At any of


either a CONTROL RESET, a change in the CNC operating
mode or a rising edge of the signal "drive on" of an axis, the end
position is set equal to the current set position.

• The ‘in position area’ is configured for each axis in the Machine
parameter InpositioningArea (in the AxisControl group).

PLC Interface Manual


page 182 / 304
MACHINEMATE®

2.4.5. ONHOMINGOK (dword 6), homing state signals

In this dword the "HOMING OK” state signals for all axes are summed, with a
maximum of 32:

Bit
1 ON_HOME01 Homing OK 1st axis
2 ON_HOME02 Homing OK 2nd axis
3 ON_HOME03 Homing OK 3rd axis
4 ON_HOME04 Homing OK 4th axis
5 ON_HOME05 Homing OK 5th axis
6 ON_HOME06 Homing OK 6th axis
7 ON_HOME07 Homing OK 7th axis
... ... ...
32 ON_HOME32 Homing OK 32nd axis

With these signals the PLC Program can recognize, whether an axis has
finished its homing cycle.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The specified axis has not finished its homing cycle
1 The specified axis has finished its homing cycle

PLC Interface Manual


page 183 / 304
MACHINEMATE®

2.4.6. ONPOSAXES (dword 7), positioning axes-state signals


In this dword the 5 output signals are summed, with a maximum of 5
positioning axes:
Bit
1 ON_POS_01 SIGNAL 1st positioning axis
2 ON_POS_02 SIGNAL 2nd positioning axis
3 ON_POS_03 SIGNAL 3rd positioning axis
4 ON_POS_04 SIGNAL 4th positioning axis
5 ON_POS_05 SIGNAL 5th positioning axis
6
... Reserved
32

These signals and a programmed output duration can be set to the value 1 with
G98 in the NC program parts of the positioning axes. This can be used to
inform the PLC Program about the end of processing of the respective
positioning axis.

The individual signals can be evaluated separately.

Value Meaning
---------------------------------------------------------------------------------------------------
0 Output signal is not active
1 Output signal is active

Value Possible cause in the CNC


---------------------------------------------------------------------------------------------------
0 Normal condition
1 The NC blocks filed in the positioning memory of the positioning axis
are executed and G98 is programmed in the active NC block.

0→ 1 The NC blocks in the positioning memory of the positioning axis are


executed and an NC block in which G98 is programmed becomes
active.

1→ 0 The NC blocks filed in the positioning memory of the positioning axis


are executed, G98 is programmed in the active NC block and the
programmed output duration is reached or the processing of the NC
blocks is interrupted by home position (see chapter 2.1.4 "Notes
concerning terminology").

Note:
• To guarantee sure recognition of these output signals by the PLC
Program, choose a sufficiently long programmable output duration
with respect to the PLC scan time.

• If the output signal is set in an NC program part of a positioning


axis more than once, pay attention that there is a sufficiently long
time between the individual G98 blocks.

PLC Interface Manual


page 184 / 304
MACHINEMATE®

2.4.7. ONCYCBYTE (dword 8), cycle output signals

The 8 output signals that can be output in NC part program cycle parameter
blocks with the use of the OB (Output-Byte) command, are summed in this
dword:

Bit
1 ON_CYCB01 Cycle Input from CNC Bit 1
2 ON_CYCB02 Cycle Input from CNC Bit 2
3 ON_CYCB03 Cycle Input from CNC Bit 3
4 ON_CYCB04 Cycle Input from CNC Bit 4
5 ON_CYCB05 Cycle Input from CNC Bit 5
6 ON_CYCB06 Cycle Input from CNC Bit 6
7 ON_CYCB07 Cycle Input from CNC Bit 7
8 ON_CYCB08 Cycle Input from CNC Bit 8
9
... Reserved ...
32

These signals can be set from the NC part program cycle parameters and thus
can be used to communicate with the PLC Program. The cause of the
respective values of the individual signals in the CNC is therefore dependent
on the currently active part program.

Further information for the cycle programming can be found in the NC


Programming Manual (see the chapter about "General cycle programming").

PLC Interface Manual


page 185 / 304
MACHINEMATE®

2.4.8. ONEXTMODE (dword 9), external CNC state signals

This dword is divided in two different word (16 bits). The first word (bit 1 ... 16)
is defined for the external CNC operation mode selection, the second word (Bit
17 ... 32) for the external program selection.

2.4.8.1. External CNC operating mode state signals (word 1)

The replies of the CNC to the requests of the PLC for the function "External
CNC operating mode" are transferred with this word:

Bit
1 ON_EXT_01 External operating mode signal 1
2 ON_EXT_02 External operating mode signal 2
3 ON_EXT_03 External operating mode signal 3
4 ON_EXT_04 External operating mode signal 4
5 ON_EXT_05 External operating mode signal 5
6 ON_EXT_06 External operating mode signal 6
7 ON_EXT_07 External operating mode signal 7
8 ON_EXT_08 External operating mode signal 8
9 ON_EXT_09 External operating mode signal 9
10 ON_EXT_10 External operating mode signal 01
11
... Reserved ...
16

These output signals are positioned in direct connection with the input signals
of the "word 1 from the dword 9, External CNC operating mode control signals"
and are therefore described there in chapter 2.3.9.1 "dword 9 (word 1),
IN_EXTMODE".

PLC Interface Manual


page 186 / 304
MACHINEMATE®

2.4.8.2. External program selection state signals (word 2)

The replies of the CNC to the requests of the PLC for the function "External
program selection" are transferred with this word:

Bit number (based on the dword)


17 ON_EXT_17 External program selection signal 1
18 ON_EXT_18 External program selection signal 2
19 ON_EXT_19 External program selection signal 3
20 ON_EXT_20 External program selection signal 4
21 ON_EXT_21 External program selection signal 5
22 ON_EXT_22 External program selection signal 6
23 ON_EXT_23 External program selection signal 7
24 ON_EXT_24 External program selection signal 8
25
... Reserved ...
32

These output signals are positioned in direct connection with the input signals
of the "word 2 from the dword 9, External program selection control signals"
and are described there in chapter 2.3.9.2 "dword 9 (word 2), IN_EXTMODE".
The description for the respective signals, when interpreting this status, is
provided in chapter 2.3.9.2.4.

PLC Interface Manual


page 187 / 304
MACHINEMATE®

2.4.9. ONREADY (dword 10), Sercos drive ready signals


In this dword the "axis ready” state signals for all Sercos axes are summed,
with a maximum of 32:
Bit
1 ON_READY01 Sercos drive ready signal 1st axis
2 ON_READY02 Sercos drive ready signal 2nd axis
3 ON_READY03 Sercos drive ready signal 3rd axis
4 ON_READY04 Sercos drive ready signal 4th axis
5 ON_READY05 Sercos drive ready signal 5th axis
6 ON_READY06 Sercos drive ready signal 6th axis
7 ON_READY07 Sercos drive ready signal 7th axis
... ... ...
32 ON_READY32 Sercos drive ready signal 32nd axis

Since the real “drive ready” signal is provided to the CNC via the fiber
connection to an individual Sercos drive, this interface state-signal allows the
PLC to obtain that drive status indicator from the CNC.

2.4.10. ON_PLCMDONE (dword 11), PLC commanded


measuring done state signals

This function is optional and is not available in all systems.

In this dword the PLC state signals for a measuring command are summed for
all axes:
Bit
1 ON_PLCMDONE01 PLC measuring done 1st axis
2 ON_PLCMDONE02 PLC measuring done 2nd axis
3 ON_PLCMDONE03 PLC measuring done 3rd axis
4 ON_PLCMDONE04 PLC measuring done 4th axis
5 ON_PLCMDONE05 PLC measuring done 5th axis
...
32 ON_PLCMDONE32 PLC measuring done 32nd axis

Note: This dword was added in CNC version 1.9 so it did not exist in earlier
versions.

PLC Interface Manual


page 188 / 304
MACHINEMATE®

2.4.11. ONSPINDLE (dword 12), spindle state signals

This dword is divided in two different word (16 bits). The first word (bit 1 ... 16)
is defined for the “spindle standstill (stop)” signals, the second word (Bit 17 ...
32) for the for the “spindle speed reached” signals.

2.4.11.1. ON_STAND01 ... 06 -- SPINDLE STANDSTILL (STOPPED)

In this word the spindle standstill signals for 6 spindles are summed:

Bit
1 ON_STAND01 STANDSTILL SPINDLE 1
2 ON_STAND02 STANDSTILL SPINDLE 2
3 ON_STAND03 STANDSTILL SPINDLE 3
4 ON_STAND04 STANDSTILL SPINDLE 4
5 ON_STAND05 STANDSTILL SPINDLE 5
6 ON_STAND06 STANDSTILL SPINDLE 6
7
... Reserved
16

With these output signals the PLC Program can recognize, whether an spindle
has stopped (at standstill).

Value Meaning
---------------------------------------------------------------------------------------------------
0 The specified spindle hasn't stopped
1 The specified spindle has stopped

Note:
• With the machine parameter SpindleInpositionPerCent it can
be determined at which percent of the machine parameter
SpindleInpositionDiff the specified bit is set. Both of these
parameters are in the Spindle group.

PLC Interface Manual


page 189 / 304
MACHINEMATE®

2.4.11.2. ON_MOVE01 ... 06 -- SPINDLE SPEED REACHED

In this word the spindle speed reached signals for 6 spindles are summed:

Bit number (based on the dword)


17 ON_MOVE01 SPEED REACHED SPINDLE 1
18 ON_MOVE02 SPEED REACHED SPINDLE 2
19 ON_MOVE03 SPEED REACHED SPINDLE 3
20 ON_MOVE04 SPEED REACHED SPINDLE 4
21 ON_MOVE05 SPEED REACHED SPINDLE 5
22 ON_MOVE06 SPEED REACHED SPINDLE 6
23
... Reserved ...
32

With these output signals the PLC Program can recognize whether a spindle
has reached its programmed speed.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The specified spindle hasn't reached its programmed speed
1 The specified spindle has reached its programmed speed

Note:
• This signal is valid only when there is feedback from the spindle,
configured with the machine parameter SpindleFeedbackAppl
(in the Spindle group). A spindle without feedback does not
provide this signal for the PLC.
• With the machine parameter SpindleInpositionDiff (in the
Spindle group) the window will be set which set the specified bit
of the corresponding spindle “Spindle speed reached”.

PLC Interface Manual


page 190 / 304
MACHINEMATE®

2.4.12. ONCONTROL (dword 13), Sercos axis control state


signals
In this dword the closed position control loop status indicators for the Sercos
axes are summed, with a maximum of 32 axes:
Bit
1 ON_CONTR01 drive 1st axis control loop closed
2 ON_CONTR02 drive 2nd axis control loop closed
3 ON_CONTR03 drive 3rd axis control loop closed
4 ON_CONTR04 drive 4th axis control loop closed
5 ON_CONTR05 drive 5th axis control loop closed
6 ON_CONTR06 drive 6th axis control loop closed
7 ON_CONTR07 drive 7th axis control loop closed
... ... ...
32 ON_CONTR32 drive 32nd axis control loop closed

Normally, the position loop is closed in the SERCOS drive so each signal
enables the CNC to verify that condition in the axis servo drive.

2.4.13. ONMIRROR (dword 14), axis mirroring state signals

In this dword are the mirror state signals for the mirroring axes are summed, up
to a maximum of 32 axes:
Bit
1 ON_MIRR01 Mirroring state 1st axis
2 ON_MIRR02 Mirroring state 2nd axis
3 ON_MIRR03 Mirroring state 3rd axis
4 ON_MIRR04 Mirroring state 4th axis
5 ON_MIRR05 Mirroring state 5th axis
6 ON_MIRR06 Mirroring state 6th axis
... ... ...
32 ON_MIRR32 Mirroring state 32nd axis

These output signals are positioned in direct connection with the input signals
of the dword 14 (IN_MIRROR), mirroring control signals" and are described
therefore also there, in chapter 2.3.14 "dword 14, IN_MIRROR". These signals
also reflect the axis mirroring status from the G38/G39 NC programming for the
axis mirroring feature.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The specified axis is not mirrored
1 The specified axis is mirrored

PLC Interface Manual


page 191 / 304
MACHINEMATE®

2.4.14. ONCMND_P (dword 15), ONCMND_M (dword 16), motion


command plus/minus state signals

In these two dwords, the state signals for the motion commands one for plus
(ON_CMNDPxx) and one for minus (ON_CMNDMxx) are summed, with a
maximum of 32 axes:

Bit
1 ON_CMNDP01, ON_CMNDM01 Motion command plus, minus 1st axis
2 ON_CMNDP02, ON_CMNDM02 Motion command plus, minus 2nd axis
3 ON_CMNDP03, ON_CMNDM03 Motion command plus, minus 3rd axis
4 ON_CMNDP04, ON_CMNDM04 Motion command plus, minus 4th axis
5 ON_CMNDP05, ON_CMNDM05 Motion command plus, minus 5th axis
6 ON_CMNDP06, ON_CMNDM06 Motion command plus, minus 6th axis
7 ON_CMNDP07, ON_CMNDM07 Motion command plus, minus 7th axis
8 ON_CMNDP08, ON_CMNDM08 Motion command plus, minus 8th axis
... ... ...
32 ON_CMNDP32, ON_CMNDM32 Motion command plus, minus 32nd axis

With these signals the PLC Program can recognize if the actual NC block is a
motion block for the specified axis or if the specified axis is moving in the jog
mode. The motion command signals will also be set if the feed override switch
is equal zero or if cycle stop is active.

Value Meaning
---------------------------------------------------------------------------------------------------
0 A motion command plus, minus is not in the actual NC block for the
specified axis.
1 A motion command plus, minus is in the actual NC block for the specified
axis.

PLC Interface Manual


page 192 / 304
MACHINEMATE®

2.4.15. ONHANDWH (dword 17), handwheel state signals

In this dword the handwheel state signals for all axes are summed, up
maximum of 32 axes:

Bit
1 ON_HANDW01 HANDWHEEL 1st axis
2 ON_HANDW02 HANDWHEEL 2nd axis
3 ON_HANDW03 HANDWHEEL 3rd axis
4 ON_HANDW04 HANDWHEEL 4th axis
5 ON_HANDW05 HANDWHEEL 5th axis
6 ON_HANDW06 HANDWHEEL 6th axis
7 ON_HANDW07 HANDWHEEL 7th axis
8 ON_HANDW08 HANDWHEEL 8th axis
... ... ...
32 ON_HANDW32 HANDWHEEL 32nd axis

With these signals the PLC Program can recognize if the specified axis is
selected for “motion with handwheel” via the operator interface.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The specified axis is not selected for motion with handwheel.
1 The specified axis is selected for motion with handwheel.

PLC Interface Manual


page 193 / 304
MACHINEMATE®

2.4.16. ON_CAM1_4 (dword 18), software CAM state signals for


axes 1 to 4

In this dword the software CAM state signals for the first four axes are
summed:

Bit
1 ON_CAM1_01 CAM STATE FOR CAM 1 1st axis
2 ON_CAM2_01 CAM STATE FOR CAM 2 1st axis
3 ON_CAM3_01 CAM STATE FOR CAM 3 1st axis
4 ON_CAM4_01 CAM STATE FOR CAM 4 1st axis
5 ON_CAM5_01 CAM STATE FOR CAM 5 1st axis
6 ON_CAM6_01 CAM STATE FOR CAM 6 1st axis
7 ON_CAM7_01 CAM STATE FOR CAM 7 1st axis
8 ON_CAM8_01 CAM STATE FOR CAM 8 1st axis

9 ON_CAM1_02 CAM STATE FOR CAM 1 2nd axis


10 ON_CAM2_02 CAM STATE FOR CAM 2 2nd axis
11 ON_CAM3_02 CAM STATE FOR CAM 3 2nd axis
12 ON_CAM4_02 CAM STATE FOR CAM 4 2nd axis
13 ON_CAM5_02 CAM STATE FOR CAM 5 2nd axis
14 ON_CAM6_02 CAM STATE FOR CAM 6 2nd axis
15 ON_CAM7_02 CAM STATE FOR CAM 7 2nd axis
16 ON_CAM8_02 CAM STATE FOR CAM 8 2nd axis

17 ON_CAM1_03 CAM STATE FOR CAM 1 3rd axis


18 ON_CAM2_03 CAM STATE FOR CAM 2 3rd axis
19 ON_CAM3_03 CAM STATE FOR CAM 3 3rd axis
20 ON_CAM4_03 CAM STATE FOR CAM 4 3rd axis
21 ON_CAM5_03 CAM STATE FOR CAM 5 3rd axis
22 ON_CAM6_03 CAM STATE FOR CAM 6 3rd axis
23 ON_CAM7_03 CAM STATE FOR CAM 7 3rd axis
24 ON_CAM8_03 CAM STATE FOR CAM 8 3rd axis

25 ON_CAM1_04 CAM STATE FOR CAM 1 4th axis


26 ON_CAM2_04 CAM STATE FOR CAM 2 4th axis
27 ON_CAM3_04 CAM STATE FOR CAM 3 4th axis
28 ON_CAM4_04 CAM STATE FOR CAM 4 4th axis
29 ON_CAM5_04 CAM STATE FOR CAM 5 4th axis
30 ON_CAM6_04 CAM STATE FOR CAM 6 4th axis
31 ON_CAM7_04 CAM STATE FOR CAM 7 4th axis
32 ON_CAM8_04 CAM STATE FOR CAM 8 4th axis

PLC Interface Manual


page 194 / 304
MACHINEMATE®

With these signals the PLC Program can determine the relationship between
an axis position and a specified trigger value, called a CAM value in this feature
(much as a hardware switch associated with a rotary cam would perform).

Value Meaning
---------------------------------------------------------------------------------------------------
0 The axis position is not greater than the CAM value.
1 The axis position is greater than the CAM value.

Note:
• These signals are valid only when the feature is enabled, using
the machine parameter SoftwareCamAppl (in the PLCFunctions
group). This parameter turns on the respective axis position
CAMs. To disable the feature, this parameter is 0. To enable, it
usually has a value of either 0111 hex (to monitor the axis
commanded position) or 0311 hex (to monitor the axis actual
position). The difference between the two positions depends on
the axis in-positioning area tolerance and the axis following error
(also called lag, which is involved in a number of mechanical and
drive issues).

Each axis has a set of 8 monitor positions provided in the


parameter SoftwareCamValue (also in the PLCFunctions
group). The first axis has the first 8 values (one for each signal
shown above), the second axis has the next 8 values and so on
through the set of 32 axes (the parameter’s table has 256
values). Each value must be greater than 0 to enable a trigger for
that monitor; the CAM will not work with a value of negative
values.

If the axis is open loop (i.e., no D/A but just an encoder so


IN_DRONxx is always FALSE) then the axis position will always
power up to be 0. MACHINEMATE offers an option to help
manage the position of such an open loop axis, where the display
and the PLC is given a position for this encoder that can be set
by G92; this position can be retained by the option through power
cycles. That option does not affect the open loop axis position
used by SoftwareCamValue.

PLC Interface Manual


page 195 / 304
MACHINEMATE®

2.4.17. ON_CAM5_8 (dword 19), software CAM state signals for


axes 5 to 8

In this dword the software CAM state signals for the axes 5 through 8 are
summed:

Bit
1 ON_CAM1_05 CAM STATE FOR CAM 1 5th axis
2 ON_CAM2_05 CAM STATE FOR CAM 2 5th axis
...
8 ON_CAM8_05 CAM STATE FOR CAM 8 5th axis

9 ON_CAM1_06 CAM STATE FOR CAM 1 6th axis


10 ON_CAM2_06 CAM STATE FOR CAM 2 6th axis
...
16 ON_CAM8_06 CAM STATE FOR CAM 8 6th axis

17 ON_CAM1_07 CAM STATE FOR CAM 1 7th axis


18 ON_CAM2_07 CAM STATE FOR CAM 2 7th axis
...
24 ON_CAM8_07 CAM STATE FOR CAM 8 7th axis

25 ON_CAM1_08 CAM STATE FOR CAM 1 8th axis


26 ON_CAM2_08 CAM STATE FOR CAM 2 8th axis
...
32 ON_CAM8_08 CAM STATE FOR CAM 8 8th axis

With these signals the PLC Program can determine the relationship between
an axis position and a specified trigger value, called a CAM value in this feature
(much as a hardware switch associated with a rotary cam would perform). The
meaning of these signals is the same as those described in ON_CAM1_4 (see
2.4.16) except these apply to a different set of four axes.

PLC Interface Manual


page 196 / 304
MACHINEMATE®

2.4.18. ON_CAM9_12 (dword 20), software CAM state signals


for axes 9 to 12

In this dword the software CAM state signals for the axes 9 through 12 are
summed:

Bit
1 ON_CAM1_09 CAM STATE FOR CAM 1 9th axis
2 ON_CAM2_09 CAM STATE FOR CAM 2 9th axis
...
8 ON_CAM8_09 CAM STATE FOR CAM 8 9th axis

9 ON_CAM1_10 CAM STATE FOR CAM 1 10th axis


10 ON_CAM2_10 CAM STATE FOR CAM 2 10th axis
...
16 ON_CAM8_10 CAM STATE FOR CAM 8 10th axis

17 ON_CAM1_11 CAM STATE FOR CAM 1 11th axis


18 ON_CAM2_11 CAM STATE FOR CAM 2 11th axis
...
24 ON_CAM8_11 CAM STATE FOR CAM 8 11th axis

25 ON_CAM1_12 CAM STATE FOR CAM 1 12th axis


26 ON_CAM2_12 CAM STATE FOR CAM 2 12th axis
...
32 ON_CAM8_12 CAM STATE FOR CAM 8 12th axis

With these signals the PLC Program can determine the relationship between
an axis position and a specified trigger value, called a CAM value in this feature
(much as a hardware switch associated with a rotary cam would perform). The
meaning of these signals is the same as those described in ON_CAM1_4 (see
2.4.16) except these apply to a different set of four axes.

PLC Interface Manual


page 197 / 304
MACHINEMATE®

2.4.19. ON_CAM13_16 (dword 21), software CAM state signals


for axes 13 to 16

In this dword the software CAM state signals for the axes 13 through 16 are
summed:

Bit
1 ON_CAM1_13 CAM STATE FOR CAM 1 13th axis
2 ON_CAM2_13 CAM STATE FOR CAM 2 13th axis
...
8 ON_CAM8_13 CAM STATE FOR CAM 8 13th axis

9 ON_CAM1_14 CAM STATE FOR CAM 1 14th axis


10 ON_CAM2_14 CAM STATE FOR CAM 2 14th axis
...
16 ON_CAM8_14 CAM STATE FOR CAM 8 14th axis

17 ON_CAM1_15 CAM STATE FOR CAM 1 15th axis


18 ON_CAM2_15 CAM STATE FOR CAM 2 15th axis
...
24 ON_CAM8_15 CAM STATE FOR CAM 8 15th axis

25 ON_CAM1_16 CAM STATE FOR CAM 1 16th axis


26 ON_CAM2_16 CAM STATE FOR CAM 2 16th axis
...
32 ON_CAM8_16 CAM STATE FOR CAM 8 16th axis

With these signals the PLC Program can determine the relationship between
an axis position and a specified trigger value, called a CAM value in this feature
(much as a hardware switch associated with a rotary cam would perform). The
meaning of these signals is the same as those described in ON_CAM1_4 (see
2.4.16) except these apply to a different set of four axes.

PLC Interface Manual


page 198 / 304
MACHINEMATE®

2.4.20. ON_CAM17_20 (dword 22), software CAM state signals


for axes 17 to 20

In this dword the software CAM state signals for the axes 17 through 20 are
summed:

Bit
1 ON_CAM1_17 CAM STATE FOR CAM 1 17th axis
2 ON_CAM2_17 CAM STATE FOR CAM 2 17th axis
...
8 ON_CAM8_17 CAM STATE FOR CAM 8 17th axis

9 ON_CAM1_18 CAM STATE FOR CAM 1 18th axis


10 ON_CAM2_18 CAM STATE FOR CAM 2 18th axis
...
16 ON_CAM8_18 CAM STATE FOR CAM 8 18th axis

17 ON_CAM1_19 CAM STATE FOR CAM 1 19th axis


18 ON_CAM2_19 CAM STATE FOR CAM 2 19th axis
...
24 ON_CAM8_19 CAM STATE FOR CAM 8 19th axis

25 ON_CAM1_20 CAM STATE FOR CAM 1 20th axis


26 ON_CAM2_20 CAM STATE FOR CAM 2 20th axis
...
32 ON_CAM8_20 CAM STATE FOR CAM 8 20th axis

With these signals the PLC Program can determine the relationship between
an axis position and a specified trigger value, called a CAM value in this feature
(much as a hardware switch associated with a rotary cam would perform). The
meaning of these signals is the same as those described in ON_CAM1_4 (see
2.4.16) except these apply to a different set of four axes.

PLC Interface Manual


page 199 / 304
MACHINEMATE®

2.4.21. ON_CAM21_24 (dword 23), software CAM state signals


for axes 21 to 24

In this dword the software CAM state signals for the axes 21 through 24 are
summed:

Bit
1 ON_CAM1_21 CAM STATE FOR CAM 1 21st axis
2 ON_CAM2_21 CAM STATE FOR CAM 2 21st axis
...
8 ON_CAM8_21 CAM STATE FOR CAM 8 21st axis

9 ON_CAM1_22 CAM STATE FOR CAM 1 22nd axis


10 ON_CAM2_22 CAM STATE FOR CAM 2 22nd axis
...
16 ON_CAM8_22 CAM STATE FOR CAM 8 22nd axis

17 ON_CAM1_23 CAM STATE FOR CAM 1 23rd axis


18 ON_CAM2_23 CAM STATE FOR CAM 2 23rd axis
...
24 ON_CAM8_23 CAM STATE FOR CAM 8 23rd axis

25 ON_CAM1_24 CAM STATE FOR CAM 1 24th axis


26 ON_CAM2_24 CAM STATE FOR CAM 2 24th axis
...
32 ON_CAM8_24 CAM STATE FOR CAM 8 24th axis

With these signals the PLC Program can determine the relationship between
an axis position and a specified trigger value, called a CAM value in this feature
(much as a hardware switch associated with a rotary cam would perform). The
meaning of these signals is the same as those described in ON_CAM1_4 (see
2.4.16) except these apply to a different set of four axes.

PLC Interface Manual


page 200 / 304
MACHINEMATE®

2.4.22. ON_CAM25_28 (dword 24), software CAM state signals


for axes 25 to 28

In this dword the software CAM state signals for the axes 25 through 28 are
summed:

Bit
1 ON_CAM1_25 CAM STATE FOR CAM 1 25th axis
2 ON_CAM2_25 CAM STATE FOR CAM 2 25th axis
...
8 ON_CAM8_25 CAM STATE FOR CAM 8 25th axis

9 ON_CAM1_26 CAM STATE FOR CAM 1 26th axis


10 ON_CAM2_26 CAM STATE FOR CAM 2 26th axis
...
16 ON_CAM8_26 CAM STATE FOR CAM 8 26th axis

17 ON_CAM1_27 CAM STATE FOR CAM 1 27th axis


18 ON_CAM2_27 CAM STATE FOR CAM 2 27th axis
...
24 ON_CAM8_27 CAM STATE FOR CAM 8 27th axis

25 ON_CAM1_28 CAM STATE FOR CAM 1 28th axis


26 ON_CAM2_28 CAM STATE FOR CAM 2 28th axis
...
32 ON_CAM8_28 CAM STATE FOR CAM 8 28th axis

With these signals the PLC Program can determine the relationship between
an axis position and a specified trigger value, called a CAM value in this feature
(much as a hardware switch associated with a rotary cam would perform). The
meaning of these signals is the same as those described in ON_CAM1_4 (see
2.4.16) except these apply to a different set of four axes.

PLC Interface Manual


page 201 / 304
MACHINEMATE®

2.4.23. ON_CAM29_32 (dword 25), software CAM state signals


for axes 29 to 32

In this dword the software CAM state signals for the axes 29 through 32 are
summed:

Bit
1 ON_CAM1_29 CAM STATE FOR CAM 1 29th axis
2 ON_CAM2_29 CAM STATE FOR CAM 2 29th axis
...
8 ON_CAM8_29 CAM STATE FOR CAM 8 29th axis

9 ON_CAM1_30 CAM STATE FOR CAM 1 30th axis


10 ON_CAM2_30 CAM STATE FOR CAM 2 30th axis
...
16 ON_CAM8_30 CAM STATE FOR CAM 8 30th axis

17 ON_CAM1_31 CAM STATE FOR CAM 1 31st axis


18 ON_CAM2_31 CAM STATE FOR CAM 2 31st axis
...
24 ON_CAM8_31 CAM STATE FOR CAM 8 31st axis

25 ON_CAM1_32 CAM STATE FOR CAM 1 32nd axis


26 ON_CAM2_32 CAM STATE FOR CAM 2 32nd axis
...
32 ON_CAM8_32 CAM STATE FOR CAM 8 32nd axis

With these signals the PLC Program can determine the relationship between
an axis position and a specified trigger value, called a CAM value in this feature
(much as a hardware switch associated with a rotary cam would perform). The
meaning of these signals is the same as those described in ON_CAM1_4 (see
2.4.16) except these apply to a different set of four axes.

PLC Interface Manual


page 202 / 304
MACHINEMATE®

2.4.24. ONPANEL (dword 26), teach panel PLC function key


state signals

This function is optional and is not available in all systems.

In this dword the state signals for the teach panel PLC function keys are
summed:

Bit
1 ON_PANEL01 TEACH PANEL PLC FUNCTION KEY 1
2 ON_PANEL02 TEACH PANEL PLC FUNCTION KEY 2
3 ON_PANEL03 TEACH PANEL PLC FUNCTION KEY 3
4 ON_PANEL04 TEACH PANEL PLC FUNCTION KEY 4
5 ON_PANEL05 TEACH PANEL PLC FUNCTION KEY 5
6 ON_PANEL06 TEACH PANEL PLC FUNCTION KEY 6
7 ON_PANEL07 TEACH PANEL PLC FUNCTION KEY 7
8 ON_PANEL08 TEACH PANEL PLC FUNCTION KEY 8
9
... Reserved ...
32

With these signals the PLC Program can recognize if the specified PLC
function key has been selected on the teach panel.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The specified PLC function key on the teach panel is not selected.
1 The specified PLC function key on the teach panel has been selected.

Note:
• The Teach Panel PLC function key is the Teach Panel key
combination of the Shift key and the desired function key (F1
through F8).
• The Teach Panel is a hardware option that also enables several
software features, including this PLC interface feature.

PLC Interface Manual


page 203 / 304
MACHINEMATE®

2.4.25. ON_IPR (dword 27), NC block interpreter to PLC status


signals

In this dword the state signals from the NC block interpreter to the PLC are
summed:
Bit
1 ON_CANCELBLK CANCELLING THE ACTIVE BLOCK
2 ON_MEMORY_MODE CNC IS IN INTERNAL MEMORY MODE
3 ON_MEMORY_OPERATION_ACTIVE CNC MEMORY OPERATION IS ACTIVE
4 ON_SINGLE_STEP SINGLE STEP MODE ACTIVE
5 ON_IPR_DO_STEP SINGLE STEP COMMANDED BY PLC
6 ON_PLC_SET_AXPOS PLC HAS SET AN AXIS POSITION
7 ON_HIDE_IMBLK INTERMEDIATE BLOCKS HIDDEN
8 ON_HIDE_CYBLK CYCLE BLOCKS HIDDEN

9 Reserved Reserved

10 ON_DEL_MAN_OFFS MANUAL OFFSETS DELETED

11 ON_MP_CHANGE MACHINE PARAMETERS CHANGED

12
... Reserved ...
32

Note: This dword was added in CNC version 2.1 so it did not exist in earlier
versions. The signals for bits 4 and 5 were added in CNC version 2.2 so they
did not exist in earlier versions. The signals for bits 6 to 8 and 10 to 11 were
added in CNC version 2.3 so they did not exist in earlier versions.

2.4.25.1. ON_CANCELBLK -- CANCELLING THE ACTIVE BLOCK

This signal informs the PLC of the cancel active NC block command status (set
by the PLC signal IN_CANCELBLK; see 2.3.22.1). This signal is the
acknowledgement by the CNC of the IN_CANCELBLK command from the
PLC.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The cancel active NC block command from PLC is not active
1 The CNC is in the process of canceling the active NC block for the PLC

PLC Interface Manual


page 204 / 304
MACHINEMATE®

2.4.25.2. ON_MEMORY_MODE -- CNC IS IN INTERNAL MEMORY


MODE

This signal informs the PLC of the status that the CNC is its internal memory
mode. This state exists when the CNC is in its teach mode (an optional
feature).

Value Meaning
---------------------------------------------------------------------------------------------------
0 The CNC is not in its internal memory mode
1 The CNC is in its internal memory mode

2.4.25.3. ON_MEMORY_OPERATION_ACTIVE -- CNC MEMORY


OPERATION IS ACTIVE

This signal informs the PLC of the status that the CNC has an active internal
memory operation. This state exists when the CNC is moving a file for an
external TCP file transfer request (an optional feature).

Value Meaning
---------------------------------------------------------------------------------------------------
0 The CNC does not have a memory operation in progress
1 The CNC has an internal memory operation in progress (e.g., a file
transfer is in progress)

2.4.25.4. ON_SINGLE_STEP -- SINGLE STEP MODE ACTIVE

This signal informs the PLC Program that the CNC is currently in single step
mode (that can be affected by the PLC signal IN_SINGLE_STEP; see
2.3.22.2).
This signal represents only the special single step mode condition. This is not
the same as single block mode (ON_SINGLE; see 2.4.1.4). This is a special
test mode possible in the CNC to help debug part programs having cycle
blocks for calculations. Cycle blocks are uniquely identified by their syntax.
They always start with *N to indicate a calculation block. Motion can never
occur with a cycle block. Normal part programs can be executed done one
block at a time, just as on most other CNCs, when Automatic Single block
mode is activated.

Value Meaning
---------------------------------------------------------------------------------------------------
0 CNC in normal mode; single step mode is not active
1 CNC is in single step mode. A step command from PLC is required to
execute the next part program block.

PLC Interface Manual


page 205 / 304
MACHINEMATE®

2.4.25.5. ON_IPR_DO_STEP -- SINGLE STEP COMMANDED BY PLC

This signal informs the PLC Program that the CNC is currently doing the next
step (the next part program block) while in single step mode.
This signal represents the acknowledgment of the PLC command to do the
next block (or the next step). This PLC command for the next step is the PLC
signal IN_IPR_DO_STEP (see 2.3.22.3).

Value Meaning
---------------------------------------------------------------------------------------------------
0 CNC in normal mode
1 CNC has just executed the next part program block while in single step
mode. A step command from PLC was required for the CNC to execute
the next part program block.

PLC Interface Manual


page 206 / 304
MACHINEMATE®

2.4.26. ON_SWAX (dword 28), switching spindle/axis control


state signals

This function is optional and is not available in all systems.

With these signals the PLC Program can recognize whether an axis has been
switched to a spindle. The part program can cause this switch or the PLC can
(see 2.3.11.1).

Bit
1 ON_SWAX01 Switching axis/spindle, spindle 1
2 ON_SWAX02 Switching axis/spindle, spindle 2
3 ON_SWAX03 Switching axis/spindle, spindle 3
4 ON_SWAX04 Switching axis/spindle, spindle 4
5 ON_SWAX05 Switching axis/spindle, spindle 5
6 ON_SWAX06 Switching axis/spindle, spindle 6
7
... Reserved ...
32

Value Meaning
---------------------------------------------------------------------------------------------------
0 The switching axis/spindle is in the axis configuration.
1 The switching axis/spindle is in the spindle configuration.

PLC Interface Manual


page 207 / 304
MACHINEMATE®

2.4.27. ON_FASTM (dword 29), fast output signals

This function is optional and is not available in all systems.

With these signals the PLC Program can recognize if the specified fast output
bit is set (reference the machine parameter BCDByteMaskIndex and the
information regarding the feature Laser Power Control).

Bit
1 ON_FASTM_BIT1 Fast output bit 1
2 ON_FASTM_BIT2 Fast output bit 2
3 ON_FASTM_BIT3 Fast output bit 3
4 ON_FASTM_BIT4 Fast output bit 4
5 ON_FASTM_BIT5 Fast output bit 5
6 ON_FASTM_BIT6 Fast output bit 6
7 ON_FASTM_BIT7 Fast output bit 7
8 ON_FASTM_BIT8 Fast output bit 8
9
... Reserved ...
32

Value Meaning
---------------------------------------------------------------------------------------------------
0 Fast output signal is not set.
1 Fast output signal is set.

PLC Interface Manual


page 208 / 304
MACHINEMATE®

2.4.28. ONTOOL (dword 31), tool management signals

This dword provides a number of signals for the PLC to work with the CNC on
tool management.

Bit
1 ON_TOOLPOINT Tool magazine has moved to its location
2 ON_TOOLWARNING Active tool warning limit has been reached
3 ON_TOOLLIFEEND Active tool life has ended (it has become
less than zero)
4 ON_TOOLREF Tool magazine will move to position 1
5 ON_TOOLSTART Magazine is requested to move to the
specified location
6 ON_TOOLDIR Magazine direction (0=negative,
1=positive)
7 ON_TOOLERROR Error after reading or positioning
8 ON_TOOLANSWER Tool change has been completed
9 ON_TOOLINPOS Magazine is in position
10 ON_TOOL_IS_ACT Tool selection (T-number) is for the active
tool (i.e., the tool in the spindle)
11 ON_TOOL_NOTFND Selected Tool was not found in tool table
12 ON_SPARENOTFND Spare Tool was not found in tool table
13 ON_SP_NOTEMPTY Spindle location is not empty
14 ON_GP_NOTEMPTY Gripper location is not empty
15 ON_NP_NOTEMPTY New tool Place is not empty
16 ON_OP_NOTEMPTY Old tool Place is not empty
17 ON_PLACENOTVAL Tool place is not valid
18
... Reserved
32

Some of these signals are also described in the tool change descriptions
with IN_TOOL (see 2.3.26.1).

Note:
• ON_TOOL_IS_ACT was added in CNC version 1.11 so it did not
exist in earlier versions.
• The signals for bits 11 through 17 were added in CNC version 2.0
so they did not exist in earlier versions.

PLC Interface Manual


page 209 / 304
MACHINEMATE®

2.4.28.1. ON_TOOLPOINT -- TOOL MAGAZINE MOVED

This signal informs the PLC when the CNC has completed the tool magazine
move requested by the PLC, either by IN_TOOLPOS or by IN_TOOLREQ.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The move is not completed
1 The CNC completed the tool magazine move requested by the PLC

2.4.28.2. ON_TOOLWARNING -- TOOL LIFE REACHED WARNING


LIMIT

The ON_TOOLWARNING signal can be monitored by the PLC. This status


occurs when the tool in the spindle has accumulated sufficient wear (the
enabling of the IN_TOOLACTIVE signal results in such accumulation) that the
remaining tool life for the tool is now less than the warning limit value for that
tool (these tool life values are available in the tool table). The CNC will continue
the part program execution since this is not necessarily an error condition. The
PLC should monitor this signal if the operator must be alerted to this status of
the active tool (in the spindle).

Value Meaning
---------------------------------------------------------------------------------------------------
0 The active tool is not at its warning limit for its tool life
1 The remaining tool life for the active tool (in the spindle) is at or below its
warning limit value

2.4.28.3. ON_TOOLLIFEEND -- NO REMAINING TOOL LIFE

The ON_TOOLLIFEEND signal can be monitored by the PLC. This status


occurs when the tool in the spindle has accumulated sufficient wear (the
enabling of the IN_TOOLACTIVE signal results in such accumulation) that the
remaining tool life has reached zero (this tool life value is available in the tool
table). The CNC will continue the part program execution since this is not
necessarily an error condition. The PLC should monitor this signal if the
operator must be alerted to this status of the active tool (in the spindle). With
some applications, once a tool is selected it is assumed to have sufficient life
for the next machining operation (however much time that might take). If such
tolerance does not exist in the specific application then the PLC must react to
this signal that provides this ‘worn out’ status of the active tool.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The active tool is not at the end of its tool life
1 The remaining tool life for the active tool (in the spindle) has reached
zero

PLC Interface Manual


page 210 / 304
MACHINEMATE®

2.4.28.4. ON_TOOLREF -- TOOL MAGAZINE IS HOMING

This signal informs the PLC when the CNC is homing the tool magazine servo.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The homing is not active
1 The CNC is homing the servo for the tool magazine

2.4.28.5. ON_TOOLSTART -- TOOL IS BACK IN MAGAZINE

This signal informs the PLC when the CNC has returned the spindle tool to its
magazine This signal is in response to the PLC signal IN_TOOLCHANGE
when the PLC has moved the physical tool and so the PLC is requesting that
the CNC update the tool table.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The tool data transfer is not active
1 The CNC is done updating the tool table for the tool from the spindle to
the tool magazine

The pulse-width for this signal from the CNC is determined by the machine
parameter ToolManagementStrobeTime in the ToolManagement group.

2.4.28.6. ON_TOOLDIR -- DIRECTION FOR TOOL MAGAZINE


MOTION

This signal informs the PLC when the CNC has found the next tool in the tool
table and this signal indicates the direction from the current tool magazine
position.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The magazine direction to the next location is negative
1 The magazine direction to the next location is positive

The ON_TOOLDIR signal is provided by the CNC just to indicate to the PLC
the relative change in magazine position. With round tool magazines (i.e., the
typical arrangement), this signal alone is not sufficient for managing the actual
magazine rotation in the PLC. For example, with a tool capacity of 30 tools,
ON_TOOLDIR will be true (set to 1) when the next magazine position is at
pocket 2 while the last position was at pocket 1 because the new pocket
number is greater than the old pocket number. Similarly, the signal will be false
(reset to 0) when the next position is at pocket 1 while the last was at pocket 2.
However, if the next position is at pocket 30 while the last is at pocket 1, the
signal will be true (due to the increasing pocket number) but the PLC must
decide whether the shortest move is appropriate (i.e., to backup the single
pocket rather than moving forward 29 pockets). Typically when the change in
pocket number is more than half the magazine capacity (and the PLC logic

PLC Interface Manual


page 211 / 304
MACHINEMATE®

should be able to determine the length of move since it must control the
magazine position), the shortest move is in the direction opposite that indicated
by ON_TOOLDIR.

2.4.28.7. ON_TOOLERROR -- ERROR FOR TOOL MAGAZINE


MOTION

This signal informs the PLC when the CNC cannot do the tool magazine move
requested by the PLC.

Value Meaning
---------------------------------------------------------------------------------------------------
0 There is no error condition regarding the tool table or its management
1 The CNC had an error with the PLC magazine move

The pulse-width for this signal from the CNC is determined by the machine
parameter ToolManagementStrobeTime in the ToolManagement group.

2.4.28.8. ON_TOOLANSWER -- NEW TOOL IS IN SPINDLE

This signal informs the PLC when the CNC has acknowledged the newly
selected tool is in the spindle, becoming the active tool This signal is in
response to the PLC signal IN_TOOLRELEASE when the PLC has moved the
physical tool and so the PLC is requesting that the CNC update the tool table.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The tool data transfer is not active
1 The CNC is done updating the tool table for the tool from the magazine
into the spindle

The pulse-width for this signal from the CNC is determined by the machine
parameter ToolManagementStrobeTime in the ToolManagement group.

2.4.28.9. ON_TOOLINPOS -- TOOL MAGAZINE IS IN POSITION

This signal informs the PLC when the servo for the tool magazine is in position
(i.e., not moving).

Value Meaning
---------------------------------------------------------------------------------------------------
0 The move is not completed
1 The servo-driven tool magazine is in position

PLC Interface Manual


page 212 / 304
MACHINEMATE®

2.4.28.10. ON_TOOL_IS_ACT -- SELECTED TOOL IS IN SPINDLE

The ON_TOOL_IS_ACT signal is accompanied by the CNC message 395. This


is an informational message to the operator. The CNC will continue the part
program execution since this is not an error condition. The PLC should monitor
this signal to recognize that no tool change activity is required since the
selected tool is already in the spindle.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The tool number in the active block does not match that in the spindle
1 The tool number in the active block matches that in the spindle

If the PLC is presented this status it typically ignores the tool change request
for the tool (i.e., the M06).

2.4.28.11. ON_TOOLNOTFND -- SELECTED TOOL IS NOT FOUND

The ON_TOOLNOTFND signal is accompanied by the CNC error message


403. This error results in the CNC preventing the execution of subsequent
blocks in the active part program. A cycle start after the error will result in a
‘cycle on’ condition. A control-reset is required for recovery from this ‘tool not
found’ error – and either the operator must put the correct tool(s) in the tool
magazine or the part program must be changed to select the correct tool
numbers. The PLC should monitor this signal to recognize that no tool change
activity for an M06 is required since the specified tool number is not available.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The tool number in the active block is available in the tool table
1 The tool number in the active block is not found in the tool table

If the PLC is presented this status it typically ignores the tool change request
for the tool (i.e., the M06) since the CNC has no tool to change and it will not
continue the part program.

PLC Interface Manual


page 213 / 304
MACHINEMATE®

2.4.28.12. ON_SPARENOTFND -- SPARE FOR SELECTED TOOL IS


NOT FOUND

The ON_SPARENOTFND signal is accompanied by the CNC error message


402. This error results in the CNC preventing the execution of subsequent
blocks in the active part program. A cycle start after the error will result in a
‘cycle on’ condition. A control-reset is required for recovery from this ‘spare tool
not found’ error – and either the operator must put the correct tool(s) in the tool
magazine or the part program must be changed to select the correct tool
numbers. The PLC should monitor this signal to recognize that no tool change
activity for an M06 is required since the specified tool number is not available
with remaining tool life.

Value Meaning
---------------------------------------------------------------------------------------------------
0 The tool number in the active block is available in the tool table
1 The tool number in the active block is found in the tool table but all such
tools have no remaining tool life and no spare tool with some remaining
tool life is found in the tool table

If the PLC is presented this status it typically ignores the tool change request
for the tool (i.e., the M06) since the CNC has no tool to change and it will not
continue the part program.

PLC Interface Manual


page 214 / 304
MACHINEMATE®

2.4.29. ON_TOOLPLACE (dword 32), tool magazine location


signals

In this dword the tool magazine state signals are summed into one value:
This dword is usually treated as a decimal value, so the signal names for the
respective bits are not used in most applications.

Bit
1 ON_TLOC01 TOOL LOCATION 1st signal
2 ON_TLOC02 TOOL LOCATION 2nd signal
3 ON_TLOC03 TOOL LOCATION 3rd signal
4 ON_TLOC04 TOOL LOCATION 4th signal
5 ON_TLOC05 TOOL LOCATION 5th signal
6 ON_TLOC06 TOOL LOCATION 6th signal
... ... ...
32 ON_TLOC32 TOOL LOCATION 32nd signal

2.4.30. ON_TOOLTABLE (dword 33), tool table signals

In this dword the tool table state signals are summed into one value:
This dword is usually treated as a decimal value, so the signal names for the
respective bits are not used in most applications.

Bit
1 ON_TACT01 TOOL TABLE 1st signal
2 ON_TACT02 TOOL TABLE 2nd signal
3 ON_TACT03 TOOL TABLE 3rd signal
4 ON_TACT04 TOOL TABLE 4th signal
5 ON_TACT05 TOOL TABLE 5th signal
6 ON_TACT06 TOOL TABLE 6th signal
... ... ...
32 ON_TACT32 TOOL TABLE 32nd signal

PLC Interface Manual


page 215 / 304
MACHINEMATE®

2.4.31. ON_EGBMOTION (dword 36), electronic gear box


motion signals

This function is optional and is not available in all systems.


This dword provides a number of signals for the PLC to be able to monitor the
Electronic Gear Box (EGB) activity within the CNC.
Bit
1 ON_EGBM01 Move command is active 1st axis
2 ON_EGBM02 Move command is active 2nd axis
3 ON_EGBM03 Move command is active 3rd axis
4 ON_EGBM04 Move command is active 4th axis
5 ON_EGBM05 Move command is active 5th axis
6 ON_EGBM06 Move command is active 6th axis
7 ON_EGBM07 Move command is active 7th axis
... …
32 ON_EGBM32 Move command is active 32nd axis

Value Meaning
---------------------------------------------------------------------------------------------------
0 No motion command is present in the CNC for the specified axis.
1 A motion command is present.

Note:
• Note that with EGB, the two rotary axes involved (usually A or B
with C) must be the first two axes of the CNC station. The axis
assignments for the axial and tangential axes are configurable.

PLC Interface Manual


page 216 / 304
MACHINEMATE®

2.4.32. ON_EGBCONTROL (dword 37), electronic gear box


control signals

This function is optional and is not available in all systems.


This dword provides a number of signals for the PLC to monitor the Electronic
Gear Box (EGB) activity within the CNC.
Bit
1 ON_EGBC01 Second rotary axis is moving in minus
direction during gear hobbing
2 ON_EGBC02 Synchronization error 1 between the two
rotary axes
3 ON_EGBC03 Synchronization error 2 between the two
rotary axes
4
... Reserved
32

ON_EGBC01 is set when the gear hobbing (EGB) feature is enabled and the
second rotary axis (usually C) is turning in the minus direction.
ON_EGBC02 is set when the gear hobbing feature is enabled and the lag
difference between the two rotary axes is greater than that specified in the
machine parameter EGBLagDiff1 (in the ElectronicGearBox group).
ON_EGBC03 is set when the gear hobbing feature is enabled and the lag
difference between the two rotary axes is greater than that specified in the
machine parameter EGBLagDiff2 (in the ElectronicGearBox group).

PLC Interface Manual


page 217 / 304
MACHINEMATE®

2.4.33. ON_FIVEAXES (dword 38), five-axis function signals

These functions are optional and are not available in all


systems.

This dword provides a number of state signals for the PLC to monitor with the
CNC on several five-axes transformation functions.

Bit
1 ON_NO_TCP Tool Center Point (TCP) programming is
not active (like a G180)
2 ON_TCP_ACTIVE TCP programming is active (like a G181)
3 ON_TCP_COORD TCP programming with a rotated
coordinate system is active (like a G182)
4 ON_COORD_DEF Level definition of the rotated coordinate
system is active (like a G183)
5 ON_BACK_TRAFO Back transformation is active
6
... Reserved
32

Each of these state-signals has a corresponding PLC request signal in


IN_FIVEAXES (in chapter 2.3.26 "dword 37, IN_FIVEAXES").

PLC Interface Manual


page 218 / 304
MACHINEMATE®

2.4.34. ON_PLC_IPO_ACT (dword 43), PLC control of


interpolated axes status signals

This dword sums the status signals for the PLC control of the interpolated axes,
with a maximum of 32 axes.

Bit
1 ON_PLC_IPO_ACT_01 IPO axis control from PLC status 1st axis
2 ON_PLC_IPO_ACT_02 IPO axis control from PLC status 2nd axis
3 ON_PLC_IPO_ACT_03 IPO axis control from PLC status 3rd axis
4 ON_PLC_IPO_ACT_04 IPO axis control from PLC status 4th axis
5 ON_PLC_IPO_ACT_05 IPO axis control from PLC status 5th axis
...
32 ON_PLC_IPO_ACT_32 IPO axis control from PLC status 32nd axis

The PLC defines a CNC motion command for an interpolating axis using the
function MOVE_INTERPOLATING_AXIS (see 3.20) and requests the actual
axis motion using the signals in IN_IPOMVMT (see 2.3.16), with one bit per
axis. The CNC indicates this PLC command is active with this dword (one bit
per axis). The CNC indicates this PLC command has reached the end point for
each interpolating axis with the signals in ON_PLC_IPO_ENDP (see 2.4.35).

Note: This dword was added in CNC version 2.1 so it did not exist in earlier
versions.

PLC Interface Manual


page 219 / 304
MACHINEMATE®

2.4.35. ON_PLC_IPO_ENDP (dword 44), PLC motion of


interpolated axes – end point status signals

This dword sums the status signals for the completion of the PLC commanded
motion of the interpolated axes, with a maximum of 32 axes.

Bit
1 ON_PLC_IPO_ENDP_01 IPO axis at PLC end point status 1st axis
2 ON_PLC_IPO_ENDP_02 IPO axis at PLC end point status 2nd axis
3 ON_PLC_IPO_ENDP_03 IPO axis at PLC end point status 3rd axis
4 ON_PLC_IPO_ENDP_04 IPO axis at PLC end point status 4th axis
5 ON_PLC_IPO_ENDP_05 IPO axis at PLC end point status 5th axis
...
32 ON_PLC_IPO_ENDP_32 IPO axis at PLC end point status 32nd axis

The PLC defines a CNC motion command for an interpolating axis using the
function MOVE_INTERPOLATING_AXIS (see 3.20) and requests the actual
axis motion using the signals in IN_IPOMVMT (see 2.3.16), with one bit per
axis. The CNC indicates this PLC command is active with the signals in
ON_PLC_IPO_ACT (see 2.4.34). The CNC indicates this PLC command has
reached the end point for each interpolating axis with this dword (one bit per
axis).

Note: This dword was added in CNC version 2.1 so it did not exist in earlier
versions.

PLC Interface Manual


page 220 / 304
MACHINEMATE®

2.4.36. ON_PLC_POS_ACT (dword 45), PLC control of


positioning axes status signals

This dword sums the status signals for the PLC control of the positioning axes,
with a maximum of 5 axes.

Bit
1 ON_PLC_POS_ACT_01 POS axis control from PLC status 1st axis
2 ON_PLC_POS_ACT_02 POS axis control from PLC status 2nd axis
3 ON_PLC_POS_ACT_03 POS axis control from PLC status 3rd axis
4 ON_PLC_POS_ACT_04 POS axis control from PLC status 4th axis
5 ON_PLC_POS_ACT_05 POS axis control from PLC status 5th axis
6 Reserved
...
32 Reserved

The PLC defines a CNC motion command for a positioning axis using the
function MOVE_POSITIONING_AXIS (see 3.21) and requests the actual axis
motion using the signals in IN_STRTPOS (see 2.3.7), with one bit per axis. The
CNC indicates this PLC command is active with this dword (one bit per axis).
The CNC indicates this PLC command has reached the end point for each
positioning axis with the signals in ON_PLC_POS_ENDP (see 2.4.37).

Note: This dword was added in CNC version 2.1 so it did not exist in earlier
versions.

PLC Interface Manual


page 221 / 304
MACHINEMATE®

2.4.37. ON_PLC_POS_ENDP (dword 46), PLC motion of


positioning axes – end point status signals

This dword sums the status signals for the completion of the PLC commanded
motion of the positioning axes, with a maximum of 5 axes.

Bit
1 ON_PLC_POS_ENDP_01 POS axis at PLC end point status 1st axis
2 ON_PLC_POS_ENDP_02 POS axis at PLC end point status 2nd axis
3 ON_PLC_POS_ENDP_03 POS axis at PLC end point status 3rd axis
4 ON_PLC_POS_ENDP_04 POS axis at PLC end point status 4th axis
5 ON_PLC_POS_ENDP_05 POS axis at PLC end point status 5th axis
6 Reserved
...
32 Reserved

The PLC defines a CNC motion command for a positioning axis using the
function MOVE_POSITIONING_AXIS (see 3.21) and requests the actual axis
motion using the signals in IN_STRTPOS (see 2.3.7), with one bit per axis. The
CNC indicates this PLC command is active with the signals in
ON_PLC_POS_ACT (see 2.4.36). The CNC indicates this PLC command has
reached the end point for each positioning axis with this dword (one bit per
axis).

Note: This dword was added in CNC version 2.1 so it did not exist in earlier
versions.

PLC Interface Manual


page 222 / 304
MACHINEMATE®

3. Function interface – single station


The following functions and function blocks are provided by the PLC library
named cncplc.lib.
In the following list, there is one function block that is provided by the PLC
library named cncstd.lib. This function block is DISTANCE_CTRL. Two
functions from this library are also in this list (see 3.2). These are included in
this list with the other functions and function blocks from cncplc.lib for
convenience.
The type of each item is shown. The obvious difference between a function and
a function block is the function block instance must be declared in the PLC
Program variable declarations. A function is never declared as a variable; it is
just called in the POU code.

Name Type
ACTIVATE_SPOTI function
ACTIVATE_SWORD function
BLINKER function block
CLEAR_ERROR_MESSAGES function
CLEAR_G92_OFFSET function
DEACTIVATE_SPOTI function
DEACTIVATE_SWORD function
DISTANCE_CTRL function block
ERASE_NC_PROGRAM_MEMORY function block
HANDWHEEL_DIRECTION function
HANDWHEEL_FACTOR_AUTO1 function
HANDWHEEL_FACTOR_AUTO2 function
HANDWHEEL_FACTOR_MAN1 function
HANDWHEEL_FACTOR_MAN2 function
HANDWHEEL_NO_AXIS function
LOAD_NC_PROGRAM function block
MOVE_INTERPOLATING_AXIS function
MOVE_POSITIONING_AXIS function
READ_ANALOG_CHANNEL function block
READ_APPL_DATA function block
READ_BREAKING_PARAMETER function block
READ_CUTTING_FORCE function block
READ_GEOMETRIC_D function block

PLC Interface Manual


page 223 / 304
MACHINEMATE®

READ_GEOMETRIC_H function block


READ_GEOMETRIC_Z function block
READ_NO_PIECES function block
READ_PLANNED_LIFE function block
READ_POSITION function block
READ_RATE_X function block
READ_RATE_Y function block
READ_REMAINING_LIFE function block
READ_SPARE_TOOL function block
READ_SUPPLEM_X function block
READ_SUPPLEM_Y function block
READ_SWORD function block
READ_TOOL_NUMBER function block
READ_TOOL_TYPE function block
READ_WARNING_LIMIT function block
READFIRSTBLOCK function block
RESET_HANDWHEEL_FACTOR function
SELECT_NC_PROGRAM function block
SELECT_NC_STATION function
SET_G92_OFFSET function
SET_JOG_INCREMENTS function
SET_POSITIONING_ADJUST function
SET_POSITIONING_FEED function
WRITE_ANALOG_CHANNEL function
WRITE_APPL_DATA function
WRITE_BREAKING_PARAMETER function
WRITE_CUTTING_FORCE function
WRITE_ERROR_MESSAGE function
WRITE_GEOMETRIC_D function
WRITE_GEOMETRIC_H function
WRITE_GEOMETRIC_Z function
WRITE_NO_PIECES function
WRITE_PLANNED_LIFE function
WRITE_POSITION function
WRITE_RATE_X function
WRITE_RATE_Y function
WRITE_REMAINING_LIFE function

PLC Interface Manual


page 224 / 304
MACHINEMATE®

WRITE_SPARE_TOOL function
WRITE_SPINDLE_CODE function
WRITE_SPINDLE_ORIENTATION function
WRITE_SPOTI function
WRITE_SUPPLEM_X function
WRITE_SUPPLEM_Y function
WRITE_SWORD function
WRITE_TOOL_NUMBER function
WRITE_TOOL_TYPE function
WRITE_WARNING_LIMIT function

3.1. PLC programming of functions and function blocks


Note that the PLC Interface functions and function blocks are implemented with
the CNC using a technique called a shared memory interface. In this simple
interface, each side of the software interface uses assigned memory locations
for specific applications.
For example, all the data listed in chapters 1 and 2 within this manual are also
part of this shared memory interface. Neither the CNC nor the PLC have to
perform any special functions or function blocks to read or write these data
items.
Because the communication of CNC data used by these functions and function
blocks is accomplished with this shared memory interface, only one of these
functions or function blocks can be active at a time. If two PLC functions
attempt to use the interface with the CNC at the same time, they will interfere
with each other, preventing a successful message.
For example if the PLC application has two WRITE_ERROR_MESSAGE
functions enabled at the very same instant, the CNC will only receive the
second message (because the data from the second function wrote over the
data from the first function).
Therefore it is important for the PLC programmer to make sure that one
function or function block (in this interface with the CNC) has completed its
operation before another function or function block (in this interface) is enabled
for execution.
The rule for CNC functions with a command to the CNC is to enable only one
per PLC ‘scan’. The functions that are affected by this rule return a Boolean
status value indicating the command’s status. The functions that return a
LREAL value are not affected by this rule (like GET_PARAMETER and all the
fGET_xxx functions in 4.2). The rule for the function blocks requires the use of
one of the function block outputs. Each function block will have either a ‘DONE’
or ‘VALID’ signal name. When the function block has set to TRUE that output,
then it has completed its interface with the CNC for its data.

PLC Interface Manual


page 225 / 304
MACHINEMATE®

3.2. Extended set of cycle parameters (or P-parameters)


The following functions are provided by the PLC library cncstd.lib. This library is
required in the PLC program only if the PLC requires one of its functions.
These functions allow the PLC to access the full range of cycle parameters
configured within the CNC. The minimum number of cycle parameters is 200.
The PLC can access these parameters by using the defined symbol names
shown in chapter 1.2.
However, the typical number of cycle parameters in the CNC is 1000. The PLC
can access the full range of cycle parameters (such as P456 or P999) by
obtaining the memory address for P001 and then using the P-parameter
number as an index off that memory pointer. These functions allow a much
more convenient programming technique to be used when accessing any cycle
parameter.
Name Type
GET_PARAMETER function
SET_PARAMETER function

These two functions are grouped with the other functions and function blocks
(coming from the cncplc.lib library) in this Chapter 3 for convenience.

3.3. ACTIVATE_SPOTI
Activates the most recent S-override value written from the PLC for the desired
spindle(s). This function is not required if the CNC handles the spindle speed
override pot (see 2.3.15.2); this function is used when the PLC provides the
CNC with the spindle override value with the WRITE_SPOTI function.

Data : Type name Comment

input data: WORD Spindle_Number Mask for the spindles that are to
updated

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was successfully
written to CNC

3.4. ACTIVATE_SWORD
Activates the most recent S-Word value written from the PLC for the desired
spindle(s). This function is not required if the CNC handles the S-word in the
NC block; this function is used when the PLC provides the CNC with the S-
word using the function WRITE_SWORD. This S-word from the PLC will
(temporarily) override the S-word that is modal from a part program; after a
DEACTIVATE_SWORD that original modal S-word becomes active again.
This function is required for the PLC to take control of the spindle from the CNC
(such as for WRITE_SPINDLE_CODE or WRITE_SPINDLE_ORIENTATION).
When the PLC is done and the CNC should regain spindle control use the
DEACTIVATE_SWORD function.
PLC Interface Manual
page 226 / 304
MACHINEMATE®

Data : Type Name Comment

input data: WORD Spindle_Number Mask for the spindles that are to
updated

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

3.5. BLINKER
Turns on and off an output based on two input time values. This function block
is just a combination of other standard timer function blocks. It does not involve
any interaction with the CNC.

Data : type Name Comment

input data: TIME T_ON Time to blink ON


TIME T_OFF Time to blink OFF

output data: BOOL SIGNAL Output signal

3.6. CLEAR_ERROR_MESSAGES
Clears error messages written by the PLC. The PLC generates error
messages with the function WRITE_ERROR_MESSAGE.

Data : type Name Comment

input data: BOOL OK Perform the message clear (use TRUE for the
input).

output data: BOOL n/a Returns the command’s status (function)


TRUE = command was successfully
written to CNC

3.7. CLEAR_G92_OFFSET
Clears any G92 offsets present (same as an MDI of N1G92).

Data : Type Name Comment

input data: BOOL DUMMY Not used, but a function requires at


least one input

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was successfully
written to CNC

Note: This function was added in CNC version 2.0 so it did not exist in earlier versions.

PLC Interface Manual


page 227 / 304
MACHINEMATE®

3.8. DEACTIVATE_SPOTI
Deactivates the S-override value written from the PLC for the desired spindle(s)
so that the override value from the operator panel get valid.

Data : type Name Comment

input data: WORD Spindle_Number Mask for the spindles that are affected

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was successfully
written to CNC

3.9. DEACTIVATE_SWORD
Deactivates the previously written S-word value from the PLC for the desired
spindle(s) so that the programmed value becomes active again.
This function is required when the PLC must take control of the spindle from
the CNC temporarily (such as for WRITE_SPINDLE_CODE or
WRITE_SPINDLE_ORIENTATION). When the PLC must take control of the
spindle use the ACTIVATE_SWORD function. When the PLC is done and the
CNC should regain spindle control use the DEACTIVATE_SWORD function.

Data : Type Name Comment

input data: WORD Spindle_Number Mask for the spindles that are affected

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was successfully
written to CNC

3.10. DISTANCE_CTRL
Configures the optional Distance Control feature in the CNC.

Data Type Name Comment

input data: DWORD SWITCH Command


0 = only read state of the distance
control feature
1 = give back control of distance
control feature to CNC
2 = PLC wants to switch off distance
control feature (so PLC has control)
3 = PLC wants to switch off distance
control feature (so CNC has control)
4 = PLC wants to switch on distance
control feature (so PLC has control)
5 = PLC wants to switch on distance
control feature (so CNC has control)

PLC Interface Manual


page 228 / 304
MACHINEMATE®

DWORD BACK Not used


LREAL FEED Maximum feedrate in mm/min for
auto-focus during the switch on
DWORD CHANNEL CNC station (1..8)

output data: DWORD STATE Active state of distance control


feature
Bit 1 (LSB)
0 = NC program control
1 = PLC control
Bit 2
0 = distance control is off
1 = distance control is on
Bit 3
0 = no feed limit is active (auto-focus
is off)
1 = feed limit is active (while in auto-
focus)
Bit 4
0 = no distance offset active
1 = distance offset is active

Note: This function was added in CNC version 1.9 so it did not exist in earlier
versions. This function comes from cncstd.lib.

3.11. ERASE_NC_PROGRAM_MEMORY
Erases all the contents of NC part program memory.

Data : Type name Comment

input data: STRING FILENAME Name of the file to erase from memory
(ignored – this clears all programs)

output data: BOOL DONE Set when the erase is done


WORD ERROR Error number for the failure:
0= no error
152= no program available
192= cycle on is active
193= program processing is active
283= only a new program may be
erased within parallel edit
313= program cannot be erased
314= download is already active

PLC Interface Manual


page 229 / 304
MACHINEMATE®

3.12. GET_PARAMETER
Obtains the cycle parameter table value (P-parameter) for a given parameter
index. Note: chapter 1.2 shows the predefined system variables names that
have been assigned to the first 200 cycle parameters.

Data : Type Name Comment

input data: DWORD IDX P-parameter index (1..1000)

output data: LREAL RETURN Returns the P-parameter value


(function)
If the parameter number is not
valid, the return value will be
approximately –1.8e+308.

Note: This function was added in CNC version 1.9 so it did not exist in earlier
versions. This function comes from cncstd.lib.

3.13. HANDWHEEL_DIRECTION
Activates the handwheel function for the desired axis for Automatic mode. This
function works with the other Automatic mode handwheel functions
HANDWHEEL_FACTOR_AUTO1 and HANDWHEEL_FACTOR_AUTO2, that
further define the axis motion with a handwheel in Automatic mode.
Axes that are connected to a fixed handwheel will not be influenced.
Data : Type Name Comment

Input data: WORD Axis_number Axis to follow a handwheel (where 0 =


first axis).
WORD Factor Factor for axis motion relative to the
handwheel motion (usually 1)

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

3.14. HANDWHEEL_FACTOR_AUTO1
Set the factor for the handwheel increments in the Automatic mode. The axis
assignment to a free (unassigned) handwheel would have been done using the
function HANDWHEEL_DIRECTION. This setting of a handwheel increment for
Automatic mode does not affect any setting for Manual mode.
The FACTOR input has a value from 0 to 3, corresponding with the index for
machine parameter ExtModeHandwheelFeed for an unassigned handwheel
or ExtModeHandwheelFeed2 for an assigned handwheel.
The distance moved each handwheel tick is the result of this calculation:
HandwheelNo1Factor (where 1 for the input HANDWHEEL_NUMBER is the
handwheel number, 1 .. 3)
multiplied by

PLC Interface Manual


page 230 / 304
MACHINEMATE®

ExtModeHandwheelFeed (adjusted by the FACTOR input as the index to a


machine parameter; which parameter depends on whether handwheel is
assigned an axis or not).
For an unassigned handwheel, this calculation also includes:
multiplied by
Direction-factor (from the FACTOR input to HANDWHEEL_DIRECTION).

Data : Type Name Comment

Input data: WORD HANDWHEEL_NUMBER The handwheel number for this


factor
WORD FACTOR 0 .. 3, the factor index for the
handwheel increments

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

3.15. HANDWHEEL_FACTOR_AUTO2
Set the factor for the handwheel increments in the Automatic mode. The axis
assignment to a free (unassigned) handwheel would have been done using the
function HANDWHEEL_DIRECTION. This setting of a handwheel increment for
Automatic mode does not affect any setting for Manual mode.
The FACTOR input must have a value greater than 0.
The distance moved each handwheel tick is the result of this calculation:
HandwheelNo1Factor (where 1 for the input HANDWHEEL_NUMBER is the
handwheel number, 1 .. 3)
multiplied by
FACTOR input / 10 (e.g., a value of 10 results in a multiplication factor of 1 in
this equation while a value of 254 results in 25.4, the factor of mm to inches)
multiplied by
Direction-factor (from the FACTOR input to HANDWHEEL_DIRECTION).
Axes that are connected to a fixed handwheel cannot be influenced.

Data : Type Name Comment

input data: WORD HANDWHEEL_NUMBER The handwheel number for this


factor
WORD FACTOR >0 .. factor for the handwheel
increments

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

PLC Interface Manual


page 231 / 304
MACHINEMATE®

3.16. HANDWHEEL_FACTOR_MAN1
Set the factor for the handwheel increments in the Manual mode. This setting
of a handwheel increment for Manual mode does not affect any setting for
Automatic mode. This factor can be applied to both an unassigned handwheel
or an assigned handwheel (i.e., it has an axis assigned to it).
The FACTOR input has a value from 0 to 3, corresponding with the index for
machine parameter ExtModeHandwheelFeed for an unassigned handwheel
or ExtModeHandwheelFeed2 for an assigned handwheel.
The distance moved each handwheel tick is the result of this calculation:
HandwheelNo1Factor (where 1 for the input HANDWHEEL_NUMBER is the
handwheel number, 1 .. 3)
multiplied by
ExtModeHandwheelFeed (adjusted by the FACTOR input as the index to a
machine parameter; which parameter depends on whether handwheel is
assigned an axis or not).

Data : type Name Comment

input data: WORD HANDWHEEL _NUMBER The handwheel number for


this factor
WORD FACTOR 0 .. 3, the factor index for the
handwheel increments

output data: BOOL n/a Returns the command’s


status (function)
TRUE = command was
successfully written to CNC

3.17. HANDWHEEL_FACTOR_MAN2
Set the factor for the handwheel increments in the Manual mode. This setting
of a handwheel increment for Manual mode does not affect any setting for
Automatic mode. This factor can be applied to both an unassigned handwheel
or an assigned handwheel (i.e., it has an axis assigned to it).
The FACTOR input must have a value greater than 0.
The distance moved each handwheel tick is the result of this calculation:
HandwheelNo1Factor (where 1 for the input HANDWHEEL_NUMBER is the
handwheel number, 1 .. 3)
multiplied by
FACTOR input / 10
Whenever the operator will use the Manual, Handwheel soft keys to move axes
with a handwheel and no PLC handwheeling is required, the machine
parameter HandwheelNo1Factor should be 1 (though that can be scaled if the
number of counts do not match the dial; a negative sign changes the direction)
so that the CNC will handle the operator-defined increments in the different
modes. With the HMI operation only, this PLC function is not used.
The common application for this function is the situation where the operator
can use the handwheel in many different modes, like both inch/metric and

PLC Interface Manual


page 232 / 304
MACHINEMATE®

linear/rotary from PLC control. But it does not handle a combination of PLC and
CNC HMI handwheel control.
The PLC handwheel mechanism provided by IN_EXTMODE (see 2.3.9.1.2)
assumes all the axes are scaled the same (i.e., the same number of decimal
places and the same FaktInchMetric factors). Given a requirement for the PLC
to handwheel one or more axes when the number of decimal places is not
consistent among all axes (e.g., with G70/inch active and with both linear and
rotary axes involved) then this function enables the CNC to get the correct
handwheel increment from the PLC. With this combination of requirements for
the PLC, the first multiplier in the formula above that is defined in the machine
parameter HandwheelNo1Factor will have a value of 0.1 (unless it must be
scaled for the number of counts per turn of the dial and/or a sign change to
match its direction).
To handwheel a linear axis in inch mode an increment of 0.0001”, the FACTOR
input to this function would be 254 to get an increment of 2.54 microns (or
0.0001”) (for this calculation from the formula: 0.1 * 254 / 10). If the axis in a
rotary and an increment of 0.001 degree is desired or if the linear axis is in
metric mode and an increment of 0.001 mm (1 micron) is desired then the
FACTOR input would be 100 to get the desired increment (for this calculation
from the formula: 0.1 * 100 / 10). For an increment of 0.001” then the FACTOR
input would be 2540 (to get 25.4 microns) while an increment of 0.010 mm
requires the FACTOR input of 1000 (to get 10 microns).
This function is the explicit definition of the handwheel’s current increment.
Therefore the increment that resulted from this function’s calculation will
override the ExtModeHandwheelFeed increment that is defined by the bits 3
and 4 in the IN_EXTMODE value (see 2.3.9.1.2).
This increment will also override the increment defined by the HMI operator (by
selecting the Handwheel mode’s axis selection soft key consecutively).
Therefore this function is used when only the PLC will handle the handwheel
operations, not the HMI built-in soft keys in the Manual mode. If this function is
being used for PLC control of the handwheel, the HMI handwheel soft keys
should not be available to the operator (since the operator defined increment
will not be valid). Once the PLC defines the handwheel increment with this
function, the PLC has taken complete control of the increment definition.

Data : type Name Comment

input data: WORD HANDWHEEL _NUMBER The handwheel number for this
factor
WORD FACTOR >0 .. factor for the handwheel-
increments

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

PLC Interface Manual


page 233 / 304
MACHINEMATE®

3.18. HANDWHEEL_NO_AXIS
Set the current free handwheel configuration to no axis assignment.

Data : type Name Comment

input data: BOOL OK Set to TRUE (function requires at


least one input)

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

3.19. LOAD_NC_PROGRAM
Loads the specified part program into NC memory. This function block cannot
be used at the same time as SELECT_NC_PROGRAM (described below).

Data : Type Name Comment

input data: STRING FILENAME Name of the file to load (includes the
device name and directory path)
String can have up to 64 characters.

output data: BOOL DONE Set when the load is done


WORD ERROR Error number for the failure:
0= no error
152= program file not found
165= file exist error
180= data transmission already active
267= too many programs to load
268= nc program memory is full
426= cycle edit is active

PLC Interface Manual


page 234 / 304
MACHINEMATE®

3.20. MOVE_INTERPOLATING_AXIS
Requests the movement of a specific interpolating axis to a specific position (in
internal increments, usually microns). The feed rate for the motion is specified
by the function SET_POSITIONING_FEED (see 3.50); this rate must be
defined before the end point (with this function) (i.e., this function must follow
the other function in the order of PLC logic execution).
Note that the movement of the interpolating axis does not occur immediately.
The movement becomes active only when the PLC enables the commanded
motion for the specific axis to the CNC via IN_IPOMT01..32.
The PLC can check the status of this axis movement using the bit for the axis
in the ON_PLC_IPO_ACT and ON_PLC_IPO_ENDP dwords.

Data : Type Name Comment

input data: STRING AXIS Identifier (its upper case letter) of the
interpolating axis to move
REAL POSITION Position to move to

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

Note: This function was added in CNC version 1.9 so it did not exist in earlier
versions.

3.21. MOVE_POSITIONING_AXIS
Requests the movement of a specific positioning axis to a specific position (in
internal increments, usually microns). The feed rate for the motion is specified
by the function SET_POSITIONING_FEED (see 3.50); this rate must be
defined before the end point (with this function) (i.e., this function will follow the
other function in the order of PLC logic execution). The acceleration for this
axis motion is defined by the machine parameter AxisSlopeTime (in the
AxisControl group).
Note that the movement of the positioning axis does not occur immediately.
The movement becomes active only when the PLC makes the command to the
CNC via IN_POS_01..05.
The PLC can check the status of this axis movement using the bit for the axis
in the ON_PLC_POS_ACT and ON_PLC_POS_ENDP dwords.
Note that if the positioning axis is normally not in a controlled state (i.e.,
IN_DRONxx is FALSE for this axis in IN_DRIVEON) such as with a clamped
turret on a lathe then this move request for the axis must be issued in the PLC
after the axis position loop has been closed (i.e., IN_DRONxx is set to TRUE
for the axis). If both events (this function and the signal) occur on the same
PLC scan then the move request is not recognized due to the internal
processing required by a transition in the IN_DRONxx signal (see 2.3.3). There
should be a slight delay (at least 20ms) after the IN_DRONxx transition before
this function is executed to allow the CNC time to complete its procedure for
closing a position loop.

PLC Interface Manual


page 235 / 304
MACHINEMATE®

Data : type Name Comment

input data: STRING AXIS Identifier (its upper case letter) of the
positioning axis to move
REAL POSITION Position to move to

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was successfully
written to CNC

3.22. READ_ANALOG_CHANNEL
Reads the specific analog input channel connected to the NC. This function
block accesses the same analog input channel that has been configured for the
NC part program to access as a cycle parameter. This capability is configured
using the machine parameter CycleAnalogIn in the CycleParameter group.
If the PLC requires the analog input value from a A/D channel in the I/O that
has not been configured for access in the part program, the POU must have a
variable assigned to the A/D channel’s byte address (which has been
configured within the control’s I/O configuration file). No special function or
function block is required for that direct access to the A/D channel’s current
value (see 1.5 for example). This function block is used only when the PLC and
CNC are sharing the same channel number for the A/D access.

Data : Type Name Comment

input data: WORD CHANNEL_NUMBER Selects the analog channel to


read (1..6)

output data: BOOL VALID Analog_value is now valid


INT ANALOG_VALUE The analog input value
(-32768 to +32767)

3.23. READ_APPL_DATA
Reads a specific machine parameter from the CNC. The function block
requires the name of the parameter; the parameter’s group is not used here.

Data : type name Comment

input data: STRING NAME Name of machine parameter


to read
WORD INDEX Index in the parameter’s
array (0= first value)

output data: BOOL VALID Parameter data is now valid


REAL VALUE Parameter value

PLC Interface Manual


page 236 / 304
MACHINEMATE®

3.24. READ_BREAKING_PARAMETER
Reads the breaking parameter value for a specific tool magazine location from
the CNC. This tool data value is not used at this time.

Data : Type name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the


magazine (for values, see
READ_TOOL_TYPE)

output data: BOOL VALID Data is now valid


REAL P Breaking parameter value

3.25. READ_CUTTING_FORCE
Reads the cutting force value for a specific tool magazine location from the
CNC. This tool data value is not used at this time.

Data : type name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the


magazine (for values, see
READ_TOOL_TYPE)

output data: BOOL VALID Data is now valid


REAL FORCE Cutting force value

3.26. READ_GEOMETRIC_D
Reads the geometrical compensation D value for a specific tool magazine
location from the CNC. The operator enters this value in the Geo.Corr.D
column of the tool table.
When a tool is moved to the spindle, its geometric D-value is written to D001.

Data : type Name Comment

Input data: WORD MAGAZINE_NUMBER Tool location in the


magazine (for values, see
READ_TOOL_TYPE)

output data: BOOL VALID Data is now valid


REAL COMPENSATION Geometrical compensation D
value

PLC Interface Manual


page 237 / 304
MACHINEMATE®

3.27. READ_GEOMETRIC_H
Reads the geometrical compensation H value for a specific tool magazine
location from the CNC. The operator enters this value in the Geo.Corr.H
column of the tool table.
When a tool is moved to the spindle, its geometric H-value is written to H001.

Data : type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the


magazine (for values, see
READ_TOOL_TYPE)

output data: BOOL VALID Data is now valid


REAL COMPENSATION Geometrical compensation H
value

3.28. READ_GEOMETRIC_Z
Reads the geometrical compensation Z value for a specific tool magazine
location from the CNC. This tool data value is not used at this time.

Data : type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the


magazine (for values, see
READ_TOOL_TYPE)

output data: BOOL VALID Data is now valid


REAL COMPENSATION Geometrical compensation Z
value

3.29. READ_NO_PIECES
Reads the remaining number of pieces value for a specific tool magazine
location from the CNC.

Data : Type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the


magazine (for values, see
READ_TOOL_TYPE)

output data: BOOL VALID Data is now valid


REAL PIECES Remaining number of pieces
value

PLC Interface Manual


page 238 / 304
MACHINEMATE®

3.30. READ_PLANNED_LIFE
Reads the planned tool life value (in minutes) for a specific tool magazine
location from the CNC.

Data : Type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the


magazine (for values, see
READ_TOOL_TYPE)

output data: BOOL VALID Data is now valid


REAL LIFE Planned tool life value (in
minutes)

3.31. READ_POSITION
Reads the position value for a specific tool magazine location from the CNC.

Data : Type name Comment

Input data: WORD MAGAZINE_NUMBER Tool location in the


magazine (for values, see
READ_TOOL_TYPE)

output data: BOOL VALID Data is now valid


REAL POSITION Position value (usually in
degrees or mm, whether a
round axis or not).

3.32. READ_RATE_X
Reads the rate of wear in X value for a specific tool magazine location from the
CNC. This tool data value is not used at this time.

Data : type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the


magazine (for values, see
READ_TOOL_TYPE)

output data: BOOL VALID Data is now valid


REAL RATE Rate of wear in X value

PLC Interface Manual


page 239 / 304
MACHINEMATE®

3.33. READ_RATE_Y
Reads the rate of wear in Y value for a specific tool magazine location from the
CNC. This tool data value is not used at this time.

Data : type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the


magazine (for values, see
READ_TOOL_TYPE)

output data: BOOL VALID Data is now valid


REAL RATE Rate of wear in Y value

3.34. READ_REMAINING_LIFE
Reads the remaining tool life value (in minutes) for a specific tool magazine
location from the CNC.
A value of greater than zero is required to indicate that the tool is usable.

Data : Type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the


magazine (for values, see
READ_TOOL_TYPE)

output data: BOOL VALID Data is now valid


REAL LIFE Remaining tool life value (in
minutes)

3.35. READ_SPARE_TOOL
Reads the spare tool number (string) value for a specific tool magazine location
from the CNC. The spare tool number specifies the number of the
replacement tool.

Data : type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the


magazine (for values, see
READ_TOOL_TYPE)

output data: BOOL VALID Data is now valid


STRING NUMBER Spare tool number string
value (16 characters)

PLC Interface Manual


page 240 / 304
MACHINEMATE®

3.36. READ_SUPPLEM_X
Reads the supplementary compensation for X value for a specific tool
magazine location from the CNC. This tool data value is not used at this time.

Data : type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the


magazine (for values, see
READ_TOOL_TYPE)

output data: BOOL VALID Data is now valid


REAL SUPPLEM Supplementary
compensation in X value

3.37. READ_SUPPLEM_Y
Reads the supplementary compensation for Y value for a specific tool
magazine location from the CNC. This tool data value is not used at this time.

Data : Type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the


magazine (for values, see
READ_TOOL_TYPE)

output data: BOOL VALID Data is now valid


REAL SUPPLEM Supplementary
compensation in Y value

3.38. READ_SWORD
Reads the actual spindle S-word for the specific spindle from the CNC.
This value is not the active S-code value from the part program S-code. That
part program value is obtained by the S BCD strobe information (see 2.4.3; the
letter S would be configured as a BCD in the machine parameter
CharacterApplTab[S]). This value from this function is the one written by
WRITE_SWORD.
This function returns 0 if the PLC has not taken control of the spindle from the
CNC even if the PLC has executed WRITE_SWORD. When the PLC must take
control of the spindle from the CNC, use the WRITE_SPINDLE_CODE and
ACTIVATE_SWORD functions. After both of these functions are completed
READ_SWORD returns the active S-code value for the PLC controlled spindle.

Data : type name Comment

input data: WORD Spindle_number Spindle number to read (1..6)

output data: BOOL VALID Data is now valid


REAL SWORD S-word value

PLC Interface Manual


page 241 / 304
MACHINEMATE®

3.39. READ_TOOL_NUMBER
Reads the tool number (string) value for a specific tool magazine location from
the CNC. The tool number is used to identify the tool in the part program as a
T-code.

Data : type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the


magazine (for values, see
READ_TOOL_TYPE)

output data: BOOL VALID Data is now valid


STRING NUMBER Tool number string value (16
characters)

3.40. READ_TOOL_TYPE
Reads the tool type value for a specific tool magazine location from the CNC.
The range of values for the MAGAZINE_NUMBER input applies to all the
READ/WRITE tool data functions.

Data : Type name Comment

Input data: WORD MAGAZINE_NUMBER Tool location in the


magazine; range of values:
1-250: the tool location or
pocket
251: the active tool; in the
spindle
252: the pending tool; in the
gripper

output data: BOOL VALID Data is now valid


WORD TYP Tool type; range of values:
0= location is not used
1= location is used by
variable location coding (or
the tool is not bounded to a
specific location)
2-99= location-bounded tool
101-199= tool is active and
in the spindle
201-299= tool is in the
gripper

PLC Interface Manual


page 242 / 304
MACHINEMATE®

3.41. READ_WARNING_LIMIT
Reads the tool life warning limit value (in minutes) for a specific tool magazine
location from the CNC.

Data : Type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the


magazine (for values, see
READ_TOOL_TYPE)

output data: BOOL VALID Data is now valid


REAL W_LIMIT Tool life warning limit value
(in minutes)

3.42. READFIRSTBLOCK
Obtains the first NC block in the currently selected NC part program.
The first NC block in a part program sometimes contains a comment describing
the part program’s part name or part type or other useful information.

Data : Type Name Comment

input data: n/a None

output data: BOOL Valid Status for this data request


0 = data is not valid,
1 = data is valid
STRING(64) NCBLOCK First NC block in the selected
part program

3.43. RESET_HANDWHEEL_FACTOR
Reset the factor for the automatic mode handwheel increments (from either
HANDWHEEL_FACTOR_AUTO1 or HANDWHEEL_FACTOR_AUTO2) to the
value set by the MMI.

Data : type Name Comment

input data: BOOL OK Enable the function

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

PLC Interface Manual


page 243 / 304
MACHINEMATE®

3.44. SELECT_NC_PROGRAM
Selects the specified part program to be run. This function block cannot be
used at the same time as LOAD_NC_PROGRAM (described above).

Data : Type Name Comment

input data: STRING FILENAME Name of the file to select (includes the
device name and directory path; if no
path is given, the program in NC
memory will be selected)
String can be up to 64 characters.

output data: BOOL DONE Set when the program select is done
WORD ERROR Error number for the failure:
0= no error
178= execution of program is not
permitted
191= program file not found
192= cycle on is active
282= program already in processing
761= file is not found
762= file read error
765= memory allocation error
766= block not found
767= program syntax error
796= path not found error
824= access on file denied
825= too many open files
826= file sharing violation
827= CNC is not in AUTO mode

3.45. SELECT_NC_STATION
Selects a different CNC station for the operator interface, or for subsequent
CNC functions and function blocks.

Data : type Name Comment

input data: WORD STATION Station to select (1..8)

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

Note: This function was added in CNC version 1.9 so it did not exist in earlier versions.

PLC Interface Manual


page 244 / 304
MACHINEMATE®

3.46. SET_G92_OFFSET
Sets the G92 offset for the specified axis. This function is valid only when the
CNC is in Manual Mode. Note that the VALUE input is the desired axis position
with no decimal point (for example, if 12.3456 inches is the desired while in
G70 then VALUE will be 123456; if 5.432 mm is desired while in G71 then use
5432).

Data : Type Name Comment

input data: STRING(2) AXIS The axis character (its upper


case letter) for the axis
REAL VALUE The G92 offset position for the
axis, in internal increments

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

Note: This function was added in CNC version 2.0 so it did not exist in earlier versions.

3.47. SET_JOG_INCREMENTS
Sets the incremental jog distance when the PLC is jogging multiple axes (using
the IN_JPLS and IN_JMNS dwords; see 2.3.20 and 2.3.21) in incremental
mode. Incremental mode must be set for this Manual mode axis jogging action
(see IN_EXTMODE 2.3.9.1.3).
Note that the INCREMENTS input is the desired axis incremental distance but
with no decimal point. For example, if 0.1234 inches is the desired increment
when in G70 then INCREMENTS will be 1234; if 0.50 mm is desired in G71
then use 50. After the jogging is done then the axis increment must be set back
to 0 with this function. If left at a non-zero value the axis remains in the
incremental jog mode, even if a command in IN_EXTMODE attempts to
change that mode.

Data : Type Name Comment

input data: STRING AXIS Identifier (its upper case letter) of the
axis affected
REAL INCREMENTS Incremental distance for jog

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

Note: This function was added in CNC version 1.9 so it did not exist in earlier versions.

PLC Interface Manual


page 245 / 304
MACHINEMATE®

3.48. SET_PARAMETER
Writes the new value into the cycle parameter table (P-parameter) for a given
parameter index. Note: chapter 1.2 shows the predefined system variables
names that have been assigned to the first 200 cycle parameters.

Data : Type Name Comment

input data: DWORD IDX P-parameter index (1..1000)


LREAL VALUE New value for the specified
parameter index

Output data: BOOL n/a Returns TRUE if successful or


FALSE if the specified
parameter does not exist
(function)

Note: This function was added in CNC version 1.9 so it did not exist in earlier
versions. This function comes from cncstd.lib.

3.49. SET_POSITIONING_ADJUST
The coordinate system for a positioning axis can be adjusted by this command
from the PLC. This is similar to a G92 for an interpolating axis.

Data : Type Name Comment

input data: STRING(2) AXIS The axis character (its upper case
letter) for this positioning axis
REAL MEASPOS The position for the new coordinate
system, in internal increments
output data: BOOL n/a Returns command’s status (function)
TRUE = command was successfully
written to CNC

3.50. SET_POSITIONING_FEED
Sets the feed rate (mm/min) for a movement of a specific positioning axis. This
value overwrites the default rate for the move of a positioning axis – defined by
the machine parameter AxisSpeedMaxAppl in the AxisControl group.
This function applies to both MOVE_INTERPOLATING_AXIS (the function that
allows the PLC to move an interpolating axis like a positioning axis) and
MOVE_POSITIONING_AXIS. This feed rate will be associated with the next
move command so this function must be called before that function that defines
the end point for the axis motion.

Data : type Name Comment

input data: STRING AXIS Identifier (its upper case letter) of the
positioning axis to move
REAL FEED Feed rate for the motion (in mm/min
regardless of G70/G71)
output data: BOOL n/a Returns command’s status (function)
TRUE = command was successfully
written to CNC

PLC Interface Manual


page 246 / 304
MACHINEMATE®

3.51. WRITE_ANALOG_CHANNEL
Writes a value to the analog output channel connected to the NC. This function
block accesses the same analog output channel that has been configured for
the NC part program to access as a cycle parameter. This capability is
configured using the machine parameter CycleAnalogOut in the
CycleParameter group.
If the PLC requires an update to the analog output value for a D/A channel in
the I/O that has not been configured for access in the part program, the POU
must have a variable assigned to the D/A channel’s byte address (which has
been configured within the control’s I/O configuration file). No special function
or function block is required for that direct access to update the D/A channel’s
output value (see 1.5 for example). This function block is used only when the
PLC and CNC are sharing the same channel number for the D/A access.

Data : type Name Comment

input data: WORD CHANNEL_NUMBER Selects the channel to write


(1, 2, 3)
INT ANALOG_VALUE New output value for D/A
(-32768 to +32767)

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

3.52. WRITE_APPL_DATA
Writes a new value to a specific machine parameter in the CNC. The function
requires the name of the parameter; the parameter’s group is not used here.
Many of the machine parameters can be changed only when the CNC is in
Emergency stop. However, some of them can be changed at any time, even
when the CNC is running a part program.

Data : type name Comment

input data: STRING NAME Name of machine parameter to write


WORD INDEX Index in the parameter’s array (0=
first value)
REAL Value New value

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was successfully
written to CNC

PLC Interface Manual


page 247 / 304
MACHINEMATE®

3.53. WRITE_BREAKING_PARAMETER
Writes a new breaking parameter value for a specific tool magazine location to
the CNC. This tool data value is not used at this time.

Data : Type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in magazine


REAL P New breaking parameter value

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

3.54. WRITE_CUTTING_FORCE
Writes a new cutting force value for a specific tool magazine location to the
CNC. This tool data value is not used at this time.

Data : Type name Comment

input data: WORD MAGAZINE_NUMBER Tool location in magazine


REAL FORCE New cutting force value

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

3.55. WRITE_ERROR_MESSAGE
Writes a message from the PLC to the MMI. The message includes an error
number (for the operator to reference, and possibly to access an external data
file containing a table of messages), a message status level number and an
associated text string. If the error number is found in this external file, then the
text string can be inserted into that string if a placeholder string is found (‘%1’
for current MMI but ‘_’ for older MMI on NT). If the error number is not found in
this file or if the file does not exist, then only the text string is displayed. If the
error number is less than 501, then an error will result because those error
numbers are reserved. The value of the status level determines how the
operator can clear the message.
Input data:
Type name Comment

WORD ERROR_NUMBER This is the error number, which will be shown


in the icon of the CNC-message box. It must
be greater than 500 (those are reserved).

WORD STATUS = 1, 2, 3 message can be cleared from the


keyboard (Control-X or Info-Status-
Acknowledge or click on message
status icon) or with the function
CLEAR_ERROR_MESSAGES

PLC Interface Manual


page 248 / 304
MACHINEMATE®

= 4, 5,6 message can be cleared with the


function
CLEAR_ERROR_MESSAGES
STRING(64) TEXT Message text to display, either with the defined
message or alone if the error number has no
defined message
Output data:
BOOL n/a Returns the command’s status (function)
TRUE = command was successfully sent to CNC

3.56. WRITE_GEOMETRIC_D
Writes a new geometrical compensation D value for a specific tool magazine
location to the CNC.
When this tool is moved into the spindle, this value will be written to the D001
value.

Data : type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the magazine


REAL COMPENSATION New geometrical compensation
D value

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

3.57. WRITE_GEOMETRIC_H
Writes a new geometrical compensation H value for a specific tool magazine
location to the CNC.
When this tool is moved into the spindle, this value will be written to the H001
value.

Data : type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the magazine


REAL COMPENSATION New geometrical compensation
H value

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

PLC Interface Manual


page 249 / 304
MACHINEMATE®

3.58. WRITE_GEOMETRIC_Z
Writes a new geometrical compensation Z value for a specific tool magazine
location to the CNC. This tool data value is not used at this time.

Data : type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the magazine


REAL COMPENSATION New geometrical compensation Z
value

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

3.59. WRITE_NO_PIECES
Writes a new remaining number of pieces value for a specific tool magazine
location to the CNC.

Data : Type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the magazine


REAL PIECES New remaining number of
pieces value

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

3.60. WRITE_PLANNED_LIFE
Writes a new planned tool life value (in minutes) for a specific tool magazine
location to the CNC.

Data : type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the magazine


REAL LIFE New planned tool life value (in
minutes)

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

PLC Interface Manual


page 250 / 304
MACHINEMATE®

3.61. WRITE_POSITION
Writes a new position value for a specific tool magazine location to the CNC.

Data : type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the magazine


REAL POSITION New position value (usually in
degrees or mm, whether a
round axis or not)

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

3.62. WRITE_RATE_X
Writes a new rate of wear in X value for a specific tool magazine location to the
CNC. This tool data value is not used at this time.

Data : type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the magazine


REAL COMPENSATION New rate of wear X value

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

3.63. WRITE_RATE_Y
Writes a new rate of wear in Y value for a specific tool magazine location to the
CNC. This tool data value is not used at this time.

Data : type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in the magazine


REAL COMPENSATION New rate of wear Y value

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

PLC Interface Manual


page 251 / 304
MACHINEMATE®

3.64. WRITE_REMAINING_LIFE
Writes a new remaining tool life value (in minutes) for a specific tool magazine
location to the CNC.
When this value is 0, the tool is considered worn out and not usable. The CNC
will not select it in the future until its remaining life is greater than 0.

Data : type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in magazine


REAL LIFE New remaining tool life value
(in minutes)

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

3.65. WRITE_SPARE_TOOL
Writes a new spare tool number (string) value for a specific tool magazine
location to the CNC. The spare tool number specifies the number of the
replacement tool.

Data : type name Comment

input data: WORD MAGAZINE_NUMBER Tool location in magazine


STRING NUMBER New spare tool number string
value (16 characters)

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

3.66. WRITE_SPINDLE_CODE
Writes the Spindle M-code to the CNC to manage up to 6 spindles at the same
time. With this command the PLC can start and stop the spindle without having
it programmed for the CNC. For example, this command directs the CNC to do
an M03 (value of 3, to start spindle clockwise) or an M05 (value of 5, to stop
spindle rotation). The effects of the respective spindle code values are
determined by the setting of the machine parameter SpindleBCDNo.
The spindle operation from the PLC with this function block does not invoke the
spindle gear box feature (see 2.3.11.2). If this feature is active, the CNC will
deal with the SWORD from the PLC within the context of the current gear
range. Even if the SWORD is for a different gear range, the CNC will not
perform the gear change sequence described with the gear box feature.
When the PLC must take spindle control from the CNC use the
ACTIVATE_SWORD function. Since the spindle must have a defined speed
use the WRITE_SWORD function (which can be called before or after
PLC Interface Manual
page 252 / 304
MACHINEMATE®

WRITE_SPINDLE_CODE but should be before ACTIVATE_SWORD). When


the PLC is done and the CNC should regain spindle control use the
DEACTIVATE_SWORD function.

Data : Type name Comment

input data: WORD Spindle_Code Spindle M-code value

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

3.67. WRITE_SPINDLE_ORIENTATION
Stops the Spindle at a specific angular orientation. With this command the PLC
can stop the specific spindle like the M19 without having it programmed for the
CNC.
This command remains active in the CNC until: either the CNC completes the
orientation or one of these events occurs: emergency stop, control reset, or the
PLC calling of one of the related spindle commands (ACTIVATE_SWORD,
DEACTIVATE_SWORD or WRITE_SPINDLE_CODE).
For the PLC to perform the M19 operation this function is called. The
ON_INPxx signal for the spindle’s axis can be used to detect when the M19
has been completed. If this M19 operation is part of the active NC block (either
the M-code in the block causes the orient or this orient is part of the sequence
of operations for another M-code) then the PLC must relinquish control of the
spindle to the CNC or the block will remain in the CYCLE ON condition. When
the PLC is done and the CNC should regain spindle control, use the
DEACTIVATE_SWORD function. Because the CNC will resume its original
spindle operations after this function (so it could resume M3 or M4), if the
spindle should be held in the stopped condition the IN_NULLV01 signal (see
2.3.12.1) can be set to TRUE to hold the spindle D/A at 0V until the next
spindle command for the CNC (e.g., M3, M4, M5, M19).
Only one WRITE_SPINDLE_ORIENTATION can be active at a time. With more
than one spindle, the PLC must call WRITE_SPINDLE_CODE with that
spindle’s stop M-code to proceed with the M19 for that spindle. The
corresponding ON_INPxx signal (for the spindle’s servo or axis) can be
checked to verify the spindle is stopped in position.

Note that this function will interact with the CNC’s built-in spindle behaviors.
The machine parameter SpindleStopRPM defines the speed of spindle motor
rotation (motor speed in RPM) for a spindle orient command, either from an
M19 or from this function. Because this machine parameter is in motor RPM if
there is a spindle gear box (whose behaviors are defined by the Gearbox
parameter group) then the actual spindle speed (of the tool or work piece)
during an orient will depend on the TransmissionRatio for the current gear
range.
The machine parameter SpindleShiftingSpeed defines the speed of spindle
motor rotation (motor speed in RPM) for a gear change, where this value
defines the speed to shift from this gear range (there is a value for each gear
range). If the WRITE_SPINDLE_ORIENTATION is commanded during an
active gear change while the spindle is turning at the SpindleShiftingSpeed
then that speed is used for the spindle orient (not SpindleStopRPM) so the
PLC Interface Manual
page 253 / 304
MACHINEMATE®

speed of the orient during a gear change is dependent on the current gear
range and the machine parameter. Upon this function, the spindle will maintain
its speed and then perform the orient command; no spindle speed change
occurs prior to the orient. The spindle will remain in its orient position until the
DEACTIVATE_SWORD function (see 3.9) returns control of the spindle back to
the CNC. Therefore the correct IN_GEARxx value (see 2.3.11.2) should be set
by the PLC prior to the DEACTIVATE_SWORD function. The CNC does not
process the next intermediate block within the gear change sequence until both
the correct IN_GEARxx condition is detected and the CNC has control of the
spindle. Note that SpindleShiftingSpeed must be non-zero for the
WRITE_SPINDLE_ORIENTATION function to work during a gear change.

Data : Type Name Comment

input data: WORD SpindleNumber Spindle to orient


REAL SWORD The angular position at which
the spindle will be stopped
(0.0 .. 360.0).

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

3.68. WRITE_SPOTI
Writes the Spindle ‘pot’ override (‘poti’ is short for potentiometer) to the CNC for
the desired spindle(s).

Data : type Name Comment

input data: WORD Spindle_Number Mask for spindles affected by this


pot override – up to a max. of 6
REAL SPOTI New spindle override pot value for
the spindle(s) (where 100.0 =
100%)

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

PLC Interface Manual


page 254 / 304
MACHINEMATE®

3.69. WRITE_SUPPLEM_X
Writes a new supplementary compensation for X value for a specific tool
magazine location to the CNC. This tool data value is not used at this time.

Data : Type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in magazine


REAL COMPENSATION New supplementary
compensation X value

output data: BOOL n/a Returns the command’s


status (function)
TRUE = command was
successfully written to CNC

3.70. WRITE_SUPPLEM_Y
Writes a new supplementary compensation for Y value for a specific tool
magazine location to the CNC. This tool data value is not used at this time.

Data : Type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in magazine


REAL COMPENSATION New supplementary
compensation Y value

output data: BOOL n/a Returns the command’s


status (function)
TRUE = command was
successfully written to CNC

3.71. WRITE_SWORD
Writes S-word for a maximum of 6 spindles to the CNC. This S-word will
(temporarily) override the value programmed by the operator and/or the NC
part program when the PLC takes control of the spindle from the CNC.
This S-word is not active until the PLC has taken control of the spindle from the
CNC using the ACTIVATE_SWORD function (with the spindle M-code for the
PLC coming from the WRITE_SPINDLE_CODE function). When the PLC has
relinquished its control of the spindle using DEACTIVATE_SWORD function,
the spindle immediately returns to its previous modal S-value and the previous
modal spindle M-code (e.g., M3, M4, M5).

Data : type Name Comment

input data: WORD Spindle_Number Mask for the spindles that are to
affected by this S-word
REAL SWORD New S-word for spindle(s)

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

PLC Interface Manual


page 255 / 304
MACHINEMATE®

3.72. WRITE_TOOL_NUMBER
Writes a new tool number (string) value for a specific tool magazine location to
the CNC.
The tool number is used to identify the tool for the part program as a T-code.
The tool in a location cannot be selected by the CNC unless its tool number is
not 0.
Data : Type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in magazine


STRING NUMBER New tool number string value
(16 characters)

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

3.73. WRITE_TOOL_TYPE
Writes a new tool type value for a specific tool magazine location to the CNC.
Refer to READ_TOOL_TYPE for a description of the respective tool type
values.
If this value is 0, the tool is not usable and will not be selected by the CNC
even if its tool number is not 0.
Data : type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in magazine


WORD TYP New tool type value

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

3.74. WRITE_WARNING_LIMIT
Writes a new tool life warning limit value (in minutes) for a specific tool
magazine location to the CNC.

Data : type Name Comment

input data: WORD MAGAZINE_NUMBER Tool location in magazine


REAL W_LIMIT New tool life warning limit
value (in minutes)

output data: BOOL n/a Returns the command’s status


(function)
TRUE = command was
successfully written to CNC

PLC Interface Manual


page 256 / 304
MACHINEMATE®

4. Function interface – multiple stations

4.1. CNC commands


The following functions and function blocks are provided by the PLC library
named cffplc.lib. This library is required in the PLC program only if the CNC
has more than one CNC station.
The obvious difference between the names of these functions and function
blocks and the names of those provided in the library cncplc.lib (described in
chapter 3) is that each name begins with the letter f.
Internally, each function and function block is the same as that of its
counterpart described in chapter 3 except that each of these below has an
additional input (first, before the others): CHANNEL which is a WORD to define
which CNC station (or channel) is involved in the specific PLC function’s
interface with the CNC (note CHANNEL := 0 for the first station, 1 for the
second and so on). In some of the CNC and PLC documentation, channel and
station are synonymous terms for an independent interpolator (or NC part
program) path.
Note that the multiple station feature is an option of the CNC and so it is not
available on all controls.
Name Type
fACTIVATE_SPOTI function
fACTIVATE_SWORD function
fCLEAR_G92_OFFSET function
fDEACTIVATE_SPOTI function
fDEACTIVATE_SWORD function
fERASE_NC_PROGRAM_MEMORY function block
fHANDWHEEL_DIRECTION function
fHANDWHEEL_FACTOR_AUTO1 function
fHANDWHEEL_FACTOR_AUTO2 function
fHANDWHEEL_FACTOR_MAN1 function
fHANDWHEEL_FACTOR_MAN2 function
fHANDWHEEL_NO_AXIS function
fLOAD_NC_PROGRAM function block
fMOVE_INTERPOLATING_AXIS function
fMOVE_POSITIONING_AXIS function
fREAD_ANALOG_CHANNEL function block
fREAD_APPL_DATA function block
fREAD_SWORD function block
fREADFIRSTBLOCK function block

PLC Interface Manual


page 257 / 304
MACHINEMATE®

fRESET_HANDWHEEL_FACTOR function
fSELECT_NC_PROGRAM function block
fSET_G92_OFFSET function
fSET_JOG_INCREMENTS function
fSET_POSITIONING_FEED function
fWRITE_ANALOG_CHANNEL function
fWRITE_APPL_DATA function
fWRITE_SPINDLE_CODE function
fWRITE_SPINDLE_ORIENTATION function
fWRITE_SPOTI function
fWRITE_SWORD function

4.2. Tables and data access: Compensations, Offsets and


Parameters
The following functions are provided by the PLC library named cncstd.lib. This
library is required in the PLC program only if the CNC has more than one CNC
station and the PLC requires one of its functions.
These functions allow the PLC to access the CNC tables and data for any
station, from 1 to 8. For station 1, the defined names in chapter 1.2 can be
used. For the other stations, or also for station 1 if common functions are
desired for data within any station, the following functions are used.
Note that the multiple station feature is an option of the CNC and so it is not
available on all controls.

Name Type
fGET_D_CORR function
fGET_D_R function
fGET_D_WEAR function
fGET_H_CORR function
fGET_H_I_CORR function
fGET_H_I_WEAR function
fGET_H_J_CORR function
fGET_H_J_WEAR function
fGET_H_WEAR function
fGET_PARAMETER function
fGET_PART_POS_OFFS function
fSET_D_CORR function
fSET_D_R function
fSET_D_WEAR function
fSET_H_CORR function
fSET_H_I_CORR function
fSET_H_I_WEAR function
fSET_H_J_CORR function
fSET_H_J_WEAR function
fSET_H_WEAR function
fSET_PARAMETER function
fSET_PART_POS_OFFS function

PLC Interface Manual


page 258 / 304
MACHINEMATE®

Note: The fGET_D_R and fSET_D_R were added in CNC version 2.0 while the
other functions were added in CNC version 1.9 so these functions did not
exist in earlier versions.

4.2.1. fGET_D_CORR
Obtains the D table (tool diameter or radius compensation) path correction
value for a given index for the specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX D-Table index for the desired
value (1..128)

output data: LREAL n/a Returns the compensation


value (function)

4.2.2. fGET_D_R
Obtains the D table (tool diameter or radius compensation) dresser wheel
compensation value (ranges from 0 to 9) for a given index for the specified
CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX D-Table index for the desired
value (1..128)

output data: LREAL n/a Returns the compensation


value (function)

4.2.3. fGET_D_WEAR
Obtains the D table (tool diameter or radius compensation) path correction
wear offset value for a given index for the specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX D-Table index for the desired
value (1..128)

output data: LREAL n/a Returns the wear offset value


(function)

4.2.4. fGET_H_CORR
Obtains the H table (tool length compensation) length correction value for a
given index for the specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX H-Table index for the desired
value (1..128)

output data: LREAL n/a Returns length compensation


value (function)
PLC Interface Manual
page 259 / 304
MACHINEMATE®

4.2.5. fGET_H_I_CORR
Obtains the H table (tool length compensation) length correction value, first
axis, for a given index for the specified CNC station.
Note that for the H_I and H_J functions for the H-table the machine parameter
HCorrAxes configures which axis is first and which is second in the table.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX H-Table index for the desired
value (1..64)

output data: LREAL n/a Returns compensation value


for first axis (function)

4.2.6. fGET_H_I_WEAR
Obtains the H table (tool length compensation) length correction wear offset
value, first axis, for a given index for the specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX H-Table index for the desired
value (1..64)

output data: LREAL n/a Returns wear offset value for


first axis (function)

4.2.7. fGET_H_J_CORR
Obtains the H table (tool length compensation) length correction value, second
axis, for a given index for the specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX H-Table index for the desired
value (1..64)

output data: LREAL n/a Returns compensation value


for second axis (function)

4.2.8. fGET_H_J_WEAR
Obtains the H table (tool length compensation) length correction wear offset
value, second axis, for a given index for the specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX H-Table index for the desired
value (1..64)

output data: LREAL n/a Returns wear offset value for


second axis (function)

PLC Interface Manual


page 260 / 304
MACHINEMATE®

4.2.9. fGET_H_WEAR
Obtains the H table (tool length compensation) length correction wear offset
value for a given index for the specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX H-Table index for the desired
value (1..128)

output data: LREAL n/a Returns wear offset value


(function)

4.2.10. fGET_PARAMETER
Obtains the cycle parameter table value (P-parameter) for a given index for the
specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX P-parameter index (1..1000)

output data: LREAL n/a Returns the P-parameter


value (function)
If the inputs are not valid, the
value returned is
approximately –1.8e+308.

4.2.11. fGET_PART_POS_OFFS
Obtains the part position offsets table (G54-G59 part zero offsets) axis offset
value for a given index for the specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX G-corrections table index for
the desired value (1..6 where
G54=1, …, G59=6)
DWORD AXIS Number of the axis for the
offset (1..32, where X is
usually 1, etc.)

output data: LREAL n/a Returns the part position


offset value for this G5x and
axis (function)

PLC Interface Manual


page 261 / 304
MACHINEMATE®

4.2.12. fSET_D_CORR
Writes a new path correction value in the D table (diameter or radius
compensation) for a given index for the specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
WORD IDX D-Table index for the desired
value (1..128)
LREAL VALUE New value for the specified
index in the table

output data: BOOL n/a Returns TRUE if successful or


FALSE if the write request
failed (function)
Failure would occur if any of
the inputs are not valid.

4.2.13. fSET_D_R
Writes a new dresser wheel compensation value (ranges from 0 to 9) in the D
table (diameter or radius compensation) for a given index for the specified CNC
station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
WORD IDX D-Table index for the desired
value (1..128)
LREAL VALUE New value for the specified
index in the table (0..9)

output data: BOOL n/a Returns TRUE if successful or


FALSE if the write request
failed (function)

4.2.14. fSET_D_WEAR
Writes a new path correction wear offset value in the D table (diameter or
radius compensation) for a given index for the specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
WORD IDX D-Table index for the desired
value (1..128)
LREAL VALUE New value for the specified
index in the table

output data: BOOL n/a Returns TRUE if successful or


FALSE if the write request
failed (function)

PLC Interface Manual


page 262 / 304
MACHINEMATE®

4.2.15. fSET_H_CORR
Writes a new length correction value in the H table (tool length compensation)
for a given index for the specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX H-Table index for the desired
value (1..128)
LREAL VALUE New value for the specified
index in the table

output data: BOOL n/a Returns TRUE if successful or


FALSE if the write request
failed (function)

4.2.16. fSET_H_I_CORR
Writes the new length correction value, first axis, in the H table (tool length
compensation) for a given index for the specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX H-Table index for the desired
value (1..64)
LREAL VALUE New value for the specified
index in the table

output data: BOOL n/a Returns TRUE if successful or


FALSE if the write request
failed (function)

4.2.17. fSET_H_I_WEAR
Writes the new length correction wear offset value, first axis, in the H table (tool
length compensation) for a given index for the specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX H-Table index for the desired
value (1..64)
LREAL VALUE New value for the specified
index in the table

output data: BOOL n/a Returns TRUE if successful or


FALSE if the write request
failed (function)

PLC Interface Manual


page 263 / 304
MACHINEMATE®

4.2.18. fSET_H_J_CORR
Writes the new length correction value, second axis, in the H table (tool length
compensation) for a given index for the specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX H-Table index for the desired
value (1..64)
LREAL VALUE New value for the specified
index in the table

output data: BOOL n/a Returns TRUE if successful or


FALSE if the write request
failed (function)

4.2.19. fSET_H_J_WEAR
Writes the new length correction wear offset value, second axis, in the H table
(tool length compensation) for a given index for the specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX H-Table index for the desired
value (1..64)
LREAL VALUE New value for the specified
index in the table

output data: BOOL n/a Returns TRUE if successful or


FALSE if the write request
failed (function)

4.2.20. fSET_H_WEAR
Writes the new length correction wear offset value in the H table (tool length
compensation) for a given index for the specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX H-Table index for the desired
value (1..128)
LREAL VALUE New value for the specified
index in the table

output data: BOOL n/a Returns TRUE if successful or


FALSE if the write request
failed (function)

PLC Interface Manual


page 264 / 304
MACHINEMATE®

4.2.21. fSET_PARAMETER
Writes the new cycle parameter table value (P-parameter) for a given index for
the specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX P-parameter index (1..1000)
LREAL VALUE New value for the specified
index in the table

output data: BOOL n/a Returns TRUE if successful or


FALSE if the write request
failed (function)

4.2.22. fSET_PART_POS_OFFS
Writes the new axis offset value in the part position offsets table (G54-G59 part
zero offsets) for a given index for the specified CNC station.
Data : Type Name Comment

input data: WORD CHANNEL CNC station for this data (1..8)
DWORD IDX G-corrections table index for
the desired value (1..6 where
G54=1, …, G59=6)
DWORD AXIS Number of the axis for the
offset (1..32, where X is
usually 1, etc.)
LREAL OFFS New value for the specified
index in the table

output data: BOOL n/a Returns TRUE if successful or


FALSE if the write request
failed (function)

PLC Interface Manual


page 265 / 304
MACHINEMATE®

5. Function interface – external data


The following functions are provided by the PLC library named extdata.lib. This
library is required in the PLC program only if the PLC program must access
external data such as in a host file.
The PLC is able to manage up to 8 open data channels at a time. A single
transaction of data to/from the PLC program is called a transfer. The PLC is
able to handle one active transfer to/from every open channel at any time.

Name Type
EXTCLEARERROR function
EXTCLOSEDATACHANNEL function
EXTOPENDATACHANNEL function
EXTREADDATA function
EXTWRITEDATA function

5.1. EXTCLEARERROR
Clears any error state in a specified external data channel that might have
occurred during the last access.

Data : Type Name Comment

input data: DINT Channel External data channel number

output data: DINT Return_value The function’s return value indicates the
result:
0= pending request completion
1= success
-1= failure (Error indicates the reason)

5.1.1. External data function error list

The list of possible errors that can be generated from the functions in this
library:

1. Timeout error channel x


This occurs if the system does not respond to the transfer request
within a reasonable time span that is calculated based on the amount
of data being transmitted. An example of this is a write to a serial
device with no ‘listening’ device connected.

PLC Interface Manual


page 266 / 304
MACHINEMATE®

Note this particular error is also possible in a working interface. If the


PLC checks for data from the remote but the remote has not sent
anything, then a timeout error will occur.
2. End of file reached channel x
This occurs when a read transfer request tries to read past the end of
file.
3. Invalid parameters function y
This occurs when any function receives invalid parameters, such as an
invalid channel type for an open request.
4. Error opening file or device channel x
This occurs when a channel cannot be opened, such as when the
device is not available or the Windows user does not have proper
access privileges for a file.
5. Internal library error function y
This occurs with a invalid combination of requests.
6. This channel has not been opened: x
This occurs after a read or write request is made to a channel that is
not open.
7. Only one pending transfer at a time channel x
This occurs after a read or write request is made while another read or
write request is still pending.
8. This channel is already in use: x
This occurs when an open request is made for a channel that is
already open. The program must close the channel before trying to
open it again, such as with another file or device.
9. Error transferring data channel x
This occurs when a read or write fails after a successful open of the
channel. Possible causes are a serial cable disconnection, or the
removal of the floppy disk from its drive.

5.2. EXTCLOSEDATACHANNEL
Closes a specified external data channel.

Data : Type Name Comment

input data: DINT Channel External data channel number


Pointer to a Error If an error occurs, the error is provided
STRING in the string that the pointer indicates

output data: DINT Return_value The function’s return value indicates the
result:
0= pending request completion
1= success
-1= failure (Error indicates the reason)

PLC Interface Manual


page 267 / 304
MACHINEMATE®

5.3. EXTOPENDATACHANNEL
Opens a channel to an external data source.

Data : Type Name Comment

input data: DINT Channel Number for the external data channel,
in the range of 0 to 7
Pointer to a Error If an error occurs, the error is provided
STRING in the string that the pointer indicates
BYTE Typ Type of data access for this channel
1: name input is a file name
2: name input is for a shared memory-
mapped file (not used)
3: name input is for a serial device (so it
must be COMx and it will always be
accessed sequentially; Attr:=0)
4: name input is for a parallel or printer
device (so it must be PRN or LPTx
and it will always be accessed
sequentially; Attr:=0)
BYTE Attr Attributes for this data access. This is a
bit field that can have any
combination set:
Bit 1 (LSB) access: 0=sequential,
1=random access using the offset
input
Bit 2 file: 0= file will be created if it does
not exist, 1= file must exist
Bit 3 read access: 0= read required, 1=
no reading allowed
Bit 4 write access: 0= write required, 1=
no writing allowed
Pointer to a Name Name of the external data source. If a
STRING file, the string is the complete file
name including device name and
directory path; if not a file, the string
must conform to the requirements of
the type input

output data: DINT Return_value The function’s return value indicates the
result:
0= pending request completion
1= success
-1= failure (Error indicates the reason)

Note that the configuration of a serial communications port (e.g., COM1) is


done with the Windows Control Panel settings for that port, not with PLC logic.

PLC Interface Manual


page 268 / 304
MACHINEMATE®

5.4. EXTREADDATA
Reads a defined amount of data from a specified external data channel.

Data : Type Name Comment

input data: DINT Channel The external data channel number


Pointer to a Error If an error occurs, the error is provided
STRING in the string that the pointer indicates
Pointer to a Data The data read from this channel is
BYTE made available via the input pointer
DINT Size Amount of data to read, in number of
bytes
DINT Offset Number of bytes to offset into the
external data source for this data
request.

output data: DINT Return_value The function’s return value indicates the
result:
0= pending request completion
1= success
-1= failure (Error indicates the reason)

Note. To switch between reading and writing of serial data but the
EXTREADDATA has not completed its read (for example, it is polling for input
data), the EXTREADDATA call has to have its Size input variable changed to 0
bytes. This will result in a successful conclusion of the ‘read’ (so Return_value
will become 1, rather than 0 – 0 indicates ‘busy’), thereby allowing a write to
occur from the PLC. If the PLC does not execute this transition, a ‘write’ during
a ‘read’ results in an error of 7 (see 5.1.1).

5.5. EXTWRITEDATA
Writes a defined amount of data to a specified external data channel.

Data : Type Name Comment

input data: DINT Channel The external data channel number


Pointer to a Error If an error occurs, the error is provided
STRING in the string that the pointer indicates
Pointer to a Data The data being written to this channel is
BYTE made available via the input pointer
DINT Size Amount of data to write, in number of
bytes
DINT Offset Number of bytes to offset into the
external data source for this data
request.

output data: DINT Return_value The function’s return value indicates the
result:
0= pending request completion
1= success
-1= failure (Error indicates the reason)

PLC Interface Manual


page 269 / 304
MACHINEMATE®

6. DDE-interface

6.1. DDE – interface of the PLC

The PLC provides a DDE server, which makes all the user-defined variables
inside the PLC Program available for any applications running on the host PC.
All PLC system variables defined for the interface to and from the CNC are also
made available via this DDE server. This includes all signals from the PLC-
CNC signal-interface (chapter 2) and all cycle parameters and compensations
(chapter 1) that are referenced in the PLC application. For example:

.P001, .P002, ...


.D001, .D002, ...
.INEMERGENCn, .IN_START, ...

The general format for the PLC application variable via the DDE interface is
‘POUname.variablename,’ as in:
PLC_PRG.OperatorMessage

If the variable is in the PLC application’s global data, then the ‘POUname’ is
blank, as in:
.IN_START

The DDE interface for the DDE client to reference the data in the PLC
application is simply:
DDE server name DDE topic DDE variable name

so the complete DDE reference from the external software would be:
PLC PLCDATA POUname.variablename

and the delimiters between these three fields depend on the specific software
package (so the Microsoft Word delimiters are different than those in Microsoft
Excel and so on).

This DDE interface may be used by any DDE client, which would include the
MachineMate Visualization tool.
(For more information, see PLC-1131-3 DS: chapter: DDE-interface.)

PLC Interface Manual


page 270 / 304
MACHINEMATE®

7. MMI – PLC Interface


The MMI/PLC interface enables the communication between the MMI (Man
Machine Interface) and the PLC in both directions.
The interface includes several additional variables than listed in the previous
chapters of this document. The complete list is in the configuration file for the
system variables, named "SystemVars.cfg".

7.1. MMI States to the PLC

7.1.1. MMI_LEVEL

The dword MMI_LEVEL sends the actual MMI level to the PLC.

This dword shows the actual active operating mode of the MMI (i.e., the main
level: MANual, AUTOmatic, DATA, INFO, SYStem, and SETUP) and the next
active level, or the function key level.

Bits
1 ... 16 Other key levels

17 ... 20 3rd function key level Î AND 000F0000H

21 ... 24 2nd function key level Î AND 00F00000H

25 ... 28 1st function key level Î AND 0F000000H

29 ... 31 Operating mode level Î AND 70000000H


32 Zoom key Î AND 80000000H

Because the first 24 bits apply to function levels not reached with the standard
operator displays (and their soft key levels), this dword should be used with
masking out of the first 24 bits.
- (i.e., dword_value AND 0FF00000H).

Bit 32 was used on the Windows NT operator interface to indicate its Zoom
level, which was a temporary state for the other operating modes. In the
Windows 2000 or Linux systems, the Zoom level is one of the main operating
modes so bit 32 is not used in those systems (so it is always 0).

PLC Interface Manual


page 271 / 304
MACHINEMATE®

Value of bit
25 ... 28 Meaning: Dword value
(bit coded)
-------------------------------------------------------------------------------------------------
0001 Function key F1 activated OR 01000000H
0010 Function key F2 activated OR 02000000H
0011 Function key F3 activated OR 03000000H
0100 Function key F4 activated OR 04000000H
0101 Function key F5 activated OR 05000000H
0110 Function key F6 activated OR 06000000H
0111 Function key F7 activated OR 07000000H
1000 Function key F8 activated OR 08000000H

The same bit values (in the left column above) apply to other function key level
activations (for bits 1 to 24).

Value of bit
29 ... 31 Meaning: Dword value
(bit coded)
-------------------------------------------------------------------------------------------------
000 Manual mode active (selected) OR 00000000H
001 Automatic mode active (selected) OR 10000000H
010 Data mode active (selected) OR 20000000H
011 Information mode active (selected) OR 30000000H
100 System mode active (selected) OR 40000000H
101 Setup mode active (selected) OR 50000000H
110 Zoom mode active (selected) OR 60000000H

Examples: = Value
-------------------------------------------------------------------------------------------------
• MANual, incremental mode = 02000000H
• AUTO, program process 1 = 12000000H
• INFO, status treatment = 33000000H
• Zoom mode = 60000000H

PLC Interface Manual


page 272 / 304
MACHINEMATE®

7.1.2. MMI_LASTKEY
The dword MMI_LEVEL sends the last activated key from the MMI to the PLC.

This dword represents the last activated key from the MMI with the following
described hexadecimal coded values :

HEX – value Meaning


-------------------------------------------------------------------------------------------------
0101H Hard key MANual just activated
0102H Hard key AUTOmatic just activated
0103H Hard key DATA just activated
0104H Hard key INFO just activated
0105H Hard key SYStem just activated
0106H Hard key SETUP just activated
0107H Hard key ZOOM just activated

010FH Hard key Help just activated (2000/Linux systems only)

0110H Zoom key just activated (NT systems only)

0201H Soft key F1 just activated


0202H Soft key F2 just activated
0203H Soft key F3 just activated
0204H Soft key F4 just activated
0205H Soft key F5 just activated
0206H Soft key F6 just activated
0207H Soft key F7 just activated
0208H Soft key F8 just activated

The soft key ‘just activated’ condition requires that the soft key actually resulted
in an action, not just that the operator just selected that soft key. If the soft key
is unassigned on the MMI then the operator’s selection of that soft key will just
result in an error message (that the function cannot be selected) and the PLC
will not get the signal that the soft key was activated.

If the PLC wishes to use a soft key to trigger an action within the PLC
application, then the soft key must be assigned. It is possible to create a new
soft key on the MMI that is used just by the PLC, not by the MMI. Using the
MMI Setup capability to add a user defined soft key, the desired soft key can
be given a name and it can be assigned to run a program on the host
computer. Since the soft key will be used just to trigger a PLC event, then the
suggested implementation is to 1) create a batch file (e.g., nothing.bat) that
consists of a single line with a remark statement (e.g., ‘rem do nothing’ is the
first and only line in the file) and 2) assign the soft key to run this batch file.
These steps enable a soft key to be assigned for use by the PLC. Upon the

PLC Interface Manual


page 273 / 304
MACHINEMATE®

operator selecting this newly assigned soft key, the MMI will actually do nothing
productive in this operation since the batch file itself does nothing. However,
since the soft key is assigned to a valid operation, the PLC gets the signal from
the MMI that the soft key was just activated. The sequence to add a user
defined soft key is described in the Operator Manual.

7.1.3. MMISTATION

The dword MMISTATION sends the current CNC station selection from the
MMI to the PLC. It will range in value from 1 to 8.
The operator can change this CNC station selection using the MMI via
SYSTEM, Station Selection (see the Operator Manual).
The PLC can change this CNC station selection using the function
SELECT_NC_STATION (see chapter 3.45).

7.2. PLC Messages to the MMI

The MMI / PLC interface offers the following communication capability to


display PLC messages by the MMI.

7.2.1. PLC Message text file for the MMI

The PLC programmer(s) can create one or more language dependent text files
named "plcerrors_xx.txt" to define their own PLC messages, where "xx"
identifies the language name (e.g., plcerrors_en.txt for English, plcerrors_de.txt
for German, etc.).
This text file (or files) must be placed in the MMI startup directory with the
standard language text files provided with the CNC software (in the default
folder for these configuration files: \Program Files\MM\Hmi\Cfg). In this file, the
PLC programmer can define the messages with the corresponding message
numbers.
The file format is the same as in the standard language files for the CNC. This
file format follows the conventions used in other text files found in Microsoft
Windows environments. The ; character is used to identify comments (all
characters to the right of the ; on the line are ignored during the processing of
the file). Blank or empty lines in the file are ignored. A keyword (for all following
parameters up to the next keyword) is provided between the [ and ] characters;
for this file the keyword must be [plc]. The name of the specific parameter is to
the left of the = character (here it is always just a number) and the assigned
value for that parameter is to the right of that = character.

File Format:
[plc]
; this is the section name of the file
; Comment. Comments can be placed anywhere in the file
; with the semicolon in first position on the line.

PLC Interface Manual


page 274 / 304
MACHINEMATE®

; empty lines are possible


600 = Pressure is too high
; this is a PLC message, with message number 600
800 = undefined value in %1
; message with one placeholder; "%1" represents the
placeholder for variable text from the PLC application
...

There are several rules for the use of messages within this file.

• The message numbers must be greater than 500.


• If a text string is being provided by the PLC (via the TEXT input to
WRITE_ERROR_MESSAGE), then there should be a ‘%1’
placeholder in the message string in this file. If there is no ‘%1’
placeholder in the message in the file and the PLC
WRITE_ERROR_MESSAGE provides a text string for the
message, then the message in this file is displayed.
• If this file is edited then the MMI must be restarted for the new
message(s) to be used.
• Other languages can be supported in these PLC text files if the
files follow this format and the correct language identification is
used.

7.2.2. PLC Message functions


In the PLC library "cncplc.lib", the functions WRITE_ERROR_MESSAGE and
CLEAR_ERROR_MESSAGES are defined to work with these (error)
messages between the PLC Program and the MMI. These functions are
described in detail in section 3 of this document.

7.2.2.1. Function WRITE_ERROR_MESSAGE


The function WRITE_ERROR_MESSAGE transfers the (error) message to the
MMI with the following parameters.
If the ERROR_NUMBER input to the function is not found in the PLC error
message text file or if no such file exists then only the TEXT input string to the
function will be displayed.

7.2.2.2. Function CLEAR_ERROR_MESSAGES


The function CLEAR_ERROR_MESSAGES deletes the (error) message(s)
written by the PLC to the MMI.
This function has a single input parameter (just set it to TRUE or 1) and no
output parameters.

PLC Interface Manual


page 275 / 304
MACHINEMATE®

7.3. PLC Access to CNC Error Messages


All error messages at the CNC can be read by the PLC application.

There are several global variables associated with the PLC access to CNC
error messages. These are similar to those listed in chapter 1.2 of this manual.
However, these global variable names are listed in this chapter because they
are needed only if the PLC requires access to the CNC error messages.

These are all BYTE variables.


CNC_ERR_CNT - the number of errors that have occurred on the
CNC station (the number of errors will range from
0 to 16)

o2CNC_ERR_CNT - the number of errors on CNC station 2


o3CNC_ERR_CNT - the number of errors on CNC station 3
o4CNC_ERR_CNT - the number of errors on CNC station 4
o5CNC_ERR_CNT - the number of errors on CNC station 5
o6CNC_ERR_CNT - the number of errors on CNC station 6
o7CNC_ERR_CNT - the number of errors on CNC station 7
o8CNC_ERR_CNT - the number of errors on CNC station 8

Note that the number of errors in a CNC station will count up from 0 to 16.
Each is the count of CNC errors and does not include those PLC messages
sent to the CNC via the WRITE_ERROR_MESSAGE function. When the PLC
reads one of these errors using the GET_CNC_ERR function block (see
below), then the error count is decremented (to indicate the number of
remaining errors). A control reset (which clears all of the CNC error messages)
also clears the CNC error count. A message acknowledge from the MMI does
not affect the CNC error count. Each variable’s data type is an unsigned byte.

From the cncstd.lib, a function block is also available for the PLC to access
error information from the CNC:

Name Type
GET_CNC_ERR function block

This function block is described below.

PLC Interface Manual


page 276 / 304
MACHINEMATE®

7.3.1. GET_CNC_ERR

This function block, GET_CNC_ERR, allows the PLC application access to the
CNC error information, including the error number, its error status, the error
type and the complete error message string.

The GET_CNC_ERR function block has three input parameters.

ƒ REQ_CHANNEL (BYTE)
The CNC station or channel has a range of 1 to 8, to indicate
from which CNC station the error information will be read.
ƒ REQ_ERR_DIR (INT)
Flag for the navigation direction through the CNC’s error list.
–2 = Get first CNC error
–1 = Get previous CNC error
1 = Get next CNC error
2 = Get last CNC error.
This flag points to the first CNC error after initialization of the
PLC program.
ƒ LANG_ID (DINT)
The language’s ID in which the error’s text will be put into the
output item ERR_TEXT (see also country code pages in
Windows online help and refer to the installed MMI*.txt files). The
language ID definitions are from Microsoft Windows.
For example:
407 hex = 1031 decimal = German
409 hex = 1033 decimal = US English
After this function block is processed by the CNC, the VALID output of this
function block informs the PLC program when the other outputs are written by
the CNC.
The GET_CNC_ERR function block has seven output input parameters.
Remember that the respective output values are valid only when the output
VALID value is 1.
ƒ ERR_NUMBER (WORD)
The CNC error number is shown in the bottom of the left status
bar icon.
ƒ ERR_QUIT_STATE (BYTE)
The conditions that this error can be cleared:
1 = The next keyboard or panel input clears this error.
3 = The CNC clears this error itself.
4 = This error can be cleared by pressing the Ctrl+X keys (Quit
or message acknowledge) or Ctrl+C keys (Control Reset).

PLC Interface Manual


page 277 / 304
MACHINEMATE®

5 = This error can be cleared by pressing the Ctrl+C keys


(Control Reset).
6 = This error cannot be cleared. Only a restart of the CNC
clears this error.
ƒ ERR_OCCASION (BYTE)
This value shows you the type of error:
0 = Start up phase hardware error
1 = Start up phase system error
2 = Hardware error
3 = System error
4 = Servo error
5 = PLC error
6 = Processing error
7 = Control computer error
8 = Operator error
9 = Cycle error
10 = Operating error
11 = Editing error
12 = Communication error
ƒ ERR_TEXT (STRING)
The error message in text format. See also the associated input
parameter LANG_ID that defines the language used for this
message translation (from number to text).
ƒ CHANNEL (BYTE)
The CNC station or channel with this error (a range of 1 to 8).
ƒ VALID (BYTE)
This flag indicates when the other outputs are valid.
0 = The outputs of this function block are not valid.
1 = The outputs of this function block are valid.
ƒ STATE (WORD)
The internal state information about the progress of the function
block call.
0 = The function block is not busy.
1 = The function block was called and the PLC runtime system is
about to prepare the CNC error information.
10 = The request was successfully sent to the CNC.
20 = The CNC has answered and the PLC is preparing the
returned information.

PLC Interface Manual


page 278 / 304
MACHINEMATE®

Notes:
The CNC error that has been read by the PLC will be removed from
the CNC error list after the error’s information has been transferred
into the function block outputs. The count of errors in this CNC
station (CNC_ERR_CNT) will be decreased by one also.

The MMI error texts are stored in the MMI*.txt files (in the directory:
\program files\mm\mmi). Please refer to the installed MMI*.txt files
for reference (as a working example for the file format). The
language ID is stored in the entry 00000 of the MMI*.txt file.

The PLC application should not repeatedly call this function block
until the VALID flag gets set to 1. The PLC runtime system continues
processing the first call of the function block until all error information
for the outputs is valid.

The PLC runtime system can only manage one call of this function
block at a time. If you have more than one instance of this function
block called in your PLC program or you repeatedly call this function
block while the PLC runtime system is responding to the first call, all
further calls will be ignored. You can detect this with the STATE
output value.

Example PLC program with this function block


The following PLC program (written in Structured Text) will read all the CNC
errors from the CNC station 1:

PROGRAM PLC_PRG
VAR
NxtCncErr : BOOL := TRUE;
CncErr : GET_CNC_ERR;
END_VAR

IF (NxtCncErr = TRUE) AND (CNC_ERR_CNT > 0) THEN


CncErr( REQ_ERR_DIR:=1, REQ_CHANNEL:=1, LANG_ID:=1033);
END_IF;

(* prevent read of next error until previous read is processed *)


NxtCncErr := FALSE;
IF (CncErr.VALID = 1) THEN
(* processing the CNC error has completed *)
(* set this flag TRUE only after the CNC error is processed *)
NxtCncErr := TRUE;
END_IF;

PLC Interface Manual


page 279 / 304
MACHINEMATE®

7.4. PLC Interface Display in MMI Info


If I/O bit positions are referenced in the PLC application, then these bits with
their variable names will appear in the MMI display for the PLC Interface
(accessed via INFO, then Interface Display and then PLC Interface).

The format for the signal name will be POU.name. Often the I/O variables are
declared in the PLC application’s global variables so that the entire variable
name is visible in that MMI window (since then it will be displayed as just .name
as there is no POU name for global variables).

Note:

Just declaring the I/O bit position in the PLC application is not sufficient for
the MMI display. The variable must be accessed within the application to be
displayed in the MMI. If an I/O point is not used in the PLC application but its
state is desired from the MMI (e.g., the override switch positions), then use a
‘dummy’ Boolean variable for this required access (e.g., in structured text
add: DUMMY := FEEDOVRD1;).

The same conditions apply if an I/O bit location will be forced. To force an
I/O bit location, at least one bit in the byte must be used in the PLC
application. If none of the bits in the I/O byte are used, then the state of the
I/O bit will not be forced.

7.5. PLC Command to MMI Display


The following function block is provided by the PLC library named cncstd.lib.
This library is required in the PLC program only if the PLC program must
access a function or function block provided by the library.
Name Type
MMI_COMMAND function block

Note: The MMI_COMMAND was added in CNC version 2.0 so it did not exist in
earlier versions. It is compatible only with the browser-based operator interface
introduced with version 2.0, not the earlier version of the MMI.

PLC Interface Manual


page 280 / 304
MACHINEMATE®

7.5.1. MMI_COMMAND
Send a command to the MMI to process like an operator input (as if the
operator had selected the specified key or action). The only commands
supported by this function block are those defined for the operator interface.
This command references the commands defined for the HMI (operator
interface) package. The HMI configuration file (with its default location:
C:\Program Files\MM\HMI\usr\hmi.cfg) will have many lines that look like this:
10000006=pcoord
where the first number indicates the soft key level (in this case the first 1 in the
value indicates this is the first soft key (in System, from Display functions) and
the last 6 in the value indicates this is the sixth soft key, for Program
Coordinate selection), the string after the = is the button’s function. This PLC
function references that last string – the command for the button. The
command string to the MMI is ‘<function>@hmi’. The list of these functions is in
another HMI configuration file (hmi_en.txt in the same folder). There are other
special commands possible from the PLC, including commands like
‘hardkey#1@hmi’ which is the same as the selection of the first hard key
(Manual mode, from the top bar with the respective mode selections) or
‘softkey#2@hmi’ which is the same as the selection of the second soft key (on
whatever is the current operating mode). With these functions and key
commands, the PLC can request operator actions without the operator.

Data : Type Name Comment

input data: STRING Command The command to process.


It has the format of ‘xyz@hmi’ where
‘xyz’ is the operator command
function defined within the operator
interface package.
An example: ‘hardkey#1@hmi’ to
command the Manual mode, just like
selecting the first hard key, or the
Manual mode button.
String can have up to 255 characters,
and it always ends with ‘@hmi’.

output data: DWORD ReturnState The function block’s return value


indicates the result of the command:
2= pending request completion
3= success
4= failure (error message will be
displayed by the operator interface)

If this function is called for the older operator interface (the Windows NT
system, not the browser-based HMI introduced with CNC version 2.0), the
operator interface will generate an error message regarding the unaccepted
command. Only the browser-based HMI will respond to this command from the
PLC.
There are several common applications for this function block.

The first involves the PLC exercising menu navigation commands to activate
the desired display. This involves a series of commands with this function block
to mimic the operator actions. The first command is usually the appropriate
PLC Interface Manual
page 281 / 304
MACHINEMATE®

mode key using a COMMAND string like ‘hardkey#1@hmi’ that performs the
same action as the operator pressing the Manual mode button on the top of the
CNC display. The PLC should monitor the ReturnState for the 3 value. The
next COMMAND string would be like ‘softkey#1@hmi’ that performs the same
action as the operator pressing the first soft key for the active display.
Subsequent ‘softkey#X@hmi’ commands will navigate further into the operator
interface displays.
The PLC logic requires time delays between these MMI commands, with
typically a longer delay after the hardkey# commands than after the softkey#
commands. The reason for this delay is the CNC operator interface must
change its context to recognize the subsequent command from the PLC. If
there is not sufficient delay then a PLC MMI command might be ‘missed’
because the CNC was not ‘ready’ for it. These time delays will vary based on
the CNC model but typical times are 600ms after a hardkey# and 300ms after a
softkey#.

The second common application for this function block is the setting of the
Program Coordinate display function. The Operator Manual describes this
feature and how the axis position column will change based on this display
function. The most common use of this display function is so X position is
shown as diameter not radius when the part program is in diameter mode. The
action for the Program Coordinate display function is ‘pcoord’ (found in the
hmi.cfg file for the particular soft key assignment). Therefore the COMMAND
string for this display function will be ‘pcoord:hmi@hmi’. When this display
function is desired as the power-up default, this PLC command is typically done
after a short delay upon the start of PLC scanning (done by a BOOL local
variable that will be FALSE when the software powers up or restarts; that
transition can trigger a time delay and then this MMI_COMMAND).

Note that the string to the CNC is entirely in lower case, to match its usage
within the operator interface software.

PLC Interface Manual


page 282 / 304
MACHINEMATE®

7.6. Miscellaneous Interface Signals

7.6.1. CNC Shutdown Signals

There is a read-only system variable available in the CNC interface called


SHUTDOWN_REQ. This BOOLEAN is TRUE only when the CNC is about to
shutdown (or exit).
There is a write-only system variable available in the CNC interface called
SHUTDOWN_DISABLE. If this BOOLEAN is set to TRUE, then the CNC will
not shutdown; if the value is reset to FALSE, then the CNC shutdown (or exit)
is allowed.
This signal combination might be used if the PLC must do something (e.g.,
write a record to a log file provided by a PLC application feature) prior to the
CNC shutdown. The SHUTDOWN_DISABLE signal cannot cancel a CNC
shutdown that has begun. The signal can only delay the completion of that
shutdown processing.

There is a read-only system variable in the CNC interface called


SHUTDOWN_CNC_INIT. This BOOLEAN is TRUE only when the CNC
operator has requested a shutdown.
There is a read-only system variable in the CNC interface called
SHUTDOWN_OS_INIT. This BOOLEAN is TRUE only when the CNC
operating system has requested a shutdown.
There is a write-only system variable in the CNC interface called
SHUTDOWN_DENY. If this BOOLEAN is set to TRUE, then the CNC
shutdown request (via SHUTDOWN_CNC_INIT or SHUTDOWN_OS_INIT) has
been denied by the PLC so that shutdown will not occur (i.e., it has been
cancelled). If this BOOLEAN is reset to FALSE, then the next CNC shutdown
request will begin the normal shutdown processing (whose completion can still
be delayed via SHUTDOWN_DISABLE).

7.6.2. Modular IO 24V Supply Check

There is a writable system variable available in the CNC interface called


IGNORE24ERRORS. This BOOLEAN is normally 0, indicating the CNC
should monitor the MIO continuously for power supply problems. The variable
should be set for the short time when the PLC requests the CNC should ignore
the errors with the 24V supply for the MIO output bytes.
The typical errors are either the 24V supply is missing (e.g., a fuse has blown)
or an incorrect voltage (e.g., the power supply is in overload). Another situation
with a possible error condition that can occur is the 24V supply is connected to
the MIO outputs only when the Emergency Stop condition has been removed.
This electrical configuration for MIO outputs is not an error so the PLC must
manage this signal to manage the error detection circuitry. Therefore, there is a
short time delay from when the E-Stop is reset to when the 24V supply is
present, due to the mechanical relay switching. This BOOLEAN controlled via
the PLC can prevent those extraneous errors when the 24V supply is applied to
the MIO outputs during an E-stop reset.
PLC Interface Manual
page 283 / 304
MACHINEMATE®

7.6.3. PLC Application Scan Time

There is a read-only system variable available in the CNC interface called


PLC_TIME[1..5]. The REAL values in the array are set based on the time the
PLC task runs at that priority (0 to 4). The unit for each value is microseconds.
For example, PLC_TIME[4] is the time (in microseconds) when the PLC task is
at a priority of 3 (which is the recommended priority for the PLC tasks in the
CNC).

7.7. PLC String Functions for Messages


The following functions are provided by the PLC library named cncstd.lib. This
library is required in the PLC program only if the application requires one of its
functions.
These functions allow the PLC application to convert floating-point numbers
into formatted ASCII strings.

Name Type
LREAL_TO_STR function
LREAL2STR function
REAL_TO_STR function
REAL2STR function

7.7.1. LREAL_TO_STR
Converts a floating-point value into an ASCII string (default format).

Data : Type Name Comment

input data: LREAL VAL Input value to format as a string

output data: STRING n/a Returns the string (function)

7.7.2. LREAL2STR
Converts a floating-point value into a formatted ASCII string.

Data : Type Name Comment

input data: STRING(5) FLAGS Formatting definition with none,


one or more of:
‘-‘ will left align the string; default
is right aligned.
‘+’ will prefix the output string with
its sign (+ or -); default has sign
only for negative values.
‘0’ will add zeroes up to the
minimum width; default is no
PLC Interface Manual
page 284 / 304
MACHINEMATE®

padding; if both ‘0’ and ‘-‘ are


specified, ‘0’ is ignored.
‘ ‘ will force leading blank if value
is positive; default is no blank; if
both ‘ ‘ and ‘+’ are specified, ‘ ‘ is
ignored.
‘#’ will force output with decimal
point; default is decimal point
only if digits follow the decimal
point.
INT WIDTH Minimum number of characters in
string (-1 = no minimum)
INT PREC Number of characters after the
decimal point; last digit in string
is rounded (default is 6 –
LREAL_TO_STR)
INT FMT Format of string
1 = [-]d.dddd e[sign]ddd
2 = [-]d.dddd E[sign]ddd
3 = [-]dddd.dddd
4 = format 1 or 3, whichever is
more compact
5 = format 2 or 3, whichever is
more compact
LREAL VAL Input value to format as a string

output data: STRING n/a Returns formatted string (function)

7.7.3. REAL_TO_STR
Converts a floating-point value into an ASCII string (default format).

Data : Type Name Comment

input data: REAL VAL Input value to format as a string

output data: STRING n/a Returns the string (function)

7.7.4. REAL2STR
Converts a floating-point value into a formatted ASCII string.

Data : Type Name Comment

input data: STRING(5) FLAGS Formatting definition, with none,


one or more of:
‘-‘ will left align the string; default
is right aligned.
‘+’ will prefix the output string with
its sign (+ or -); default has sign
only for negative values.
‘0’ will add zeroes up to the
minimum width; default is no
padding; if both ‘0’ and ‘-‘ are
PLC Interface Manual
page 285 / 304
MACHINEMATE®

specified, ‘0’ is ignored.


‘ ‘ will force leading blank if value
is positive; default is no blank; if
both ‘ ‘ and ‘+’ are specified, ‘ ‘ is
ignored.
‘#’ will force output with decimal
point; default is decimal point
only if digits follow the decimal
point.
INT WIDTH Minimum number of characters in
string (-1 = no minimum)
INT PREC Number of characters after the
decimal point; last digit in string
is rounded (default is 6 –
LREAL_TO_STR)
INT FMT Format of string
1 = [-]d.dddd e[sign]ddd
2 = [-]d.dddd E[sign]ddd
3 = [-]dddd.dddd
4 = format 1 or 3, whichever is
more compact
5 = format 2 or 3, whichever is
more compact
REAL VAL Input value to format as a string

output data: STRING n/a Returns formatted string (function)

7.8. PLC Time Functions


The following functions are provided by the PLC library named cncstd.lib. This
library is required in the PLC program only if the application requires one of its
functions.
These functions allow the PLC application to obtain date or time information
from the host operating system.

Name Type
GET_LOCAL_TIME function
GET_SYS_DATE_TIME function
GET_SYSTEM_TIME function

Note: These functions was added in CNC version 2.2 so they did not exist in earlier
versions.

7.8.1. GET_LOCAL_TIME
Gets the current local time, in milliseconds, from the host. This DWORD is the
number of milliseconds in the current 24-hour day. Therefore it can be
converted into a TIME value or TIME_OF_DAY (TOD) value using the
appropriate data type conversion (DWORD_TO_TIME or DWORD_TO_TOD).
Since the value returned is the 24-hour time, if the DWORD is converted into a
data type involved with the date the resulting value will not be valid.

PLC Interface Manual


page 286 / 304
MACHINEMATE®

Data : Type Name Comment

input data: BOOL DUMMY Function must have at least one


input (this has no meaning so it
can be either TRUE or FALSE)

output data: DWORD n/a Returns the number of


milliseconds in the local 24-hour
day (function)

7.8.2. GET_SYS_DATE_TIME
Gets the current system time from the host. This DWORD is the number of
seconds since the midnight, January 1, 1970 in Coordinated Universal Time
(so the difference between this UTC and the current local time depends on the
local 24-hour time zone). This value can be converted into a DATE value or
DATE_TIME (DT) value using the appropriate data type conversion
(DWORD_TO_DATE or DWORD_TO_DT). Since the value returned is the
current time in seconds, if the DWORD is converted into a data type involved
with only the time (which is based in milliseconds) the resulting value will not be
valid.

Data : Type Name Comment

input data: BOOL DUMMY Function must have at least one


input (this has no meaning so it
can be either TRUE or FALSE)

output data: DWORD n/a Returns the number of seconds in


coordinated universal time
(function)

7.8.3. GET_SYSTEM_TIME
Gets the current system time, in milliseconds, from the host. This DWORD is
the number of milliseconds in the 24-hour day, according to Coordinated
Universal Time (so the difference between this UTC and the current local time
depends on the local 24-hour time zone). This value can be converted into a
TIME value or TIME_OF_DAY (TOD) value using the appropriate data type
conversion (DWORD_TO_TIME or DWORD_TO_TOD). Since the value
returned is the 24-hour time, if the DWORD is converted into a data type
involved with the date the resulting value will not be valid.

Data : Type Name Comment

input data: BOOL DUMMY Function must have at least one


input (this has no meaning so it
can be either TRUE or FALSE)

output data: DWORD n/a Returns the number of


milliseconds in the universal 24-
hour day (function)

PLC Interface Manual


page 287 / 304
MACHINEMATE®

8. Function interface – SERCOS drives


The following function blocks are provided by the PLC library cncstd.lib. This
library is required in the PLC program only if the CNC has SERCOS drives and
the PLC requires one of these function blocks.
Note that the SERCOS drive interface is an initial hardware selection for the
CNC. The alternative is an analog drive interface and so the SERCOS drive
interface is not available on all controls. A control that has the SERCOS drive
interface can also have a remote analog drive interface (via the 4ENC4A
module) but a control that does not have the SERCOS drive interface can
access only analog drives.

Name Type
GET_RING_STATE function block
READ_SERCOS_PARAMETER function block
RING_COMMAND function block
SERCOS_COMMAND function block
WRITE_SERCOS_PARAMETER function block

8.1. GET_RING_STATE
Gets the current state information for the specified SERCOS ring.

Data Type Name Comment

input data: DWORD RingNumber SERCOS ring (0..3, for ring


number 1..4)

output data: WORD PhaseNumber Active phase in this ring (0..4)


WORD DriveNumber SERCOS drive number within
this ring that has the active
communications (0..7, for
drive number 1..8)
WORD IdentNumber Number of the SERCOS
parameter that is part of the
active communications
(1..32768)
DWORD ReturnState Status for this data request
1 = Channel is busy,
2 = Request still in progress,
3 = Request done ok,
4 = Request failed
DWORD ReturnMessage Message number for the
status after this drive
command

Note: This function block was added in CNC version 2.0 so it did not exist in
earlier versions.

PLC Interface Manual


page 288 / 304
MACHINEMATE®

8.2. READ_SERCOS_PARAMETER
Obtains the data for a specific SERCOS parameter from a specific drive within
a specific SERCOS ring.

Data Type Name Comment

input data: DWORD RingNumber SERCOS ring (0..3, for ring


number 1..4)
DWORD DriveNumber SERCOS drive number (0..7,
for drive number 1..8) within
this ring
WORD ParameterID Number of the parameter to
read from this drive
(1..32768 for standard S
parameters; 32769+ for drive
specific P parameters where
32769 is P1)
DWORD DataLen Number of words needed from
this parameter (1..600)

output data: WORD Data[600] Returns the requested data


within this array
DWORD ReturnState Status for this data request
1 = Channel is busy,
2 = Request still in progress,
3 = Request done ok,
4 = Request failed

DWORD ReturnMessage Message number for the


status after this drive
command

The Data[] output is coded as follows:


• In the variable declarations, declare a variable like:
Data : ARRAY[0..599] OF WORD;
where Data is the name of the array of 600 WORDs.
• The output from the function block would be the variable name with
no brackets, like Data (where Data is the name of the array).

Note: This function block was added in CNC version 1.9 so it did not exist in earlier
versions.

8.3. RING_COMMAND
Performs a specific command within a specific SERCOS ring.

Data Type Name Comment

input data: DWORD RingCommand SERCOS ring command:


1 = initialize / boot,
2 = initialize SERCOS

PLC Interface Manual


page 289 / 304
MACHINEMATE®

interface,
3 = boot this ring to phase 0,
4 = boot this ring to its next
phase,
5 = set the master’s
transmitter current to new
value,
6 = read all the drive
parameters in the ring,
7 = write all the drive
parameters in the ring
DWORD RingNumber SERCOS ring (0..3, for ring
number 1..4)

output data: DWORD ReturnState Status for this data request


1 = Channel is busy,
2 = Request still in progress,
3 = Request done ok,
4 = Request failed
DWORD ReturnMessage Message number for the ring
after this ring command

Note: This function block was added in CNC version 1.9 so it did not exist in earlier
versions.

8.4. SERCOS_COMMAND
Performs a specific command in a specific drive within a specific SERCOS ring.

Data Type Name Comment

input data: DWORD CommandID SERCOS drive command:


4 = activate the command,
5 = execute the command,
7 = clear the command
DWORD RingNumber SERCOS ring (0..3, for ring
number 1..4)
DWORD DriveNumber SERCOS drive number (0..7,
for drive number 1..8) within
this ring
WORD IdentNumber Number of the SERCOS
parameter that defines the
command to perform
(1..32768)

output data: DWORD ReturnState Status for this data request


1 = Channel is busy,
2 = Request still in progress,
3 = Request done ok,
4 = Request failed
DWORD ReturnMessage Message number for the
status after this drive
command

Note: This function block was added in CNC version 1.9 so it did not exist in earlier
versions.
PLC Interface Manual
page 290 / 304
MACHINEMATE®

8.5. WRITE_SERCOS_PARAMETER
Writes the data for a specific SERCOS parameter to a specific drive within a
specific SERCOS ring.

Data Type Name Comment

input data: DWORD RingNumber SERCOS ring (0..3, for ring


number 1..4)
DWORD DriveNumber SERCOS drive number (0..7,
for drive number 1..8) within
this ring
WORD ParameterID Number of the parameter to
read from this drive
(1..32768 for standard S
parameters; 32769+ for drive
specific P parameters where
32769 is P1)
DWORD DataLen Number of words needed from
this parameter (1..600)
WORD Data[600] The new data for the
parameter is within this array

output data: DWORD ReturnState Status for this data request


1 = Channel is busy,
2 = Request still in progress,
3 = Request done ok,
4 = Request failed
DWORD ReturnMessage Message number for the
status after this drive data
update

The Data[] input is coded as follows:


• In the variable declarations, declare a variable like:
Data : ARRAY[0..599] OF WORD;
where Data is the name of the array of 600 WORDs.
• The input to the function block would be the variable name with no
brackets, like Data (where Data is the name of the array).

Note: This function block was added in CNC version 1.9 so it did not exist
in earlier versions.

PLC Interface Manual


page 291 / 304
MACHINEMATE®

9. PLC Project Libraries

The libraries that must be associated with the PLC project depend on the
requirements of the PLC interface. To obtain the list of libraries for a specific
PLC project, first run the PLC programming tool and then open the desired
project. For the list, select the Window item on the top menu bar and then
select Library Manager from the drop down menu list.
The Library Manager feature of the PLC programming tool is described in
Chapter 7 of the CNC Software Manual – PLC Programming.

9.1. Standard.lib

When a new PLC project is created, the default library list usually consists of
only STANDARD.LIB. This library contains the various functions and functions
blocks that are described in Appendix D of the CNC Software Manual – PLC
Programming. The functions and function blocks in this library include those
described (in that manual chapter) for the
• String functions
• Bistable function blocks
• Trigger
• Counter
• Timer

9.2. Cnclib.lib and cncplc.lib

If the PLC application requires any of the functions or function blocks listed in
the Chapter 3 of this manual, then these two libraries must be included in the
PLC project: CNCLIB.LIB and CNCPLC.LIB. The first library adds the low-level
communication interface between the PLC and the CNC. The second library
adds most of the functions and function blocks described in Chapter 3 of this
manual.

9.3. Cffplc.lib

If the CNC application requires more than one CNC station, then the PLC
application might require support for multiple stations as well. To use that
capability then the CFFPLC.LIB library must be included in the PLC project.
This library adds all the functions and function blocks described in Chapter 4.1
of this manual.
Note that the feature of multiple CNC stations is an option in the CNC software
and so it is not available in all controls.

PLC Interface Manual


page 292 / 304
MACHINEMATE®

9.4. Extdata.lib

If the PLC application requires support for direct file access or for direct device
access (such as a serial port (i.e., one of the COM ports) or the parallel port),
then an additional library is needed. To use those items then the
EXTDATA.LIB library must be included in the PLC project. This library adds all
the functions and function blocks described in Chapter 5 of this manual.

9.5. Cncstd.lib
If the PLC application requires access to the CNC tables and data items listed
in chapter 1.2 but for a station other than station 1, then an additional library is
needed. The CNCSTD.LIB library must be included in the project to use those
associated functions. This library adds all the functions described in chapter 4.2
of this manual.

If the PLC application requires access to the CNC error message information or
the special real to string functions then the CNCSTD.LIB library must be
included in the project to use those associated functions and function blocks.
This library adds all the functions and function blocks described in chapters 7.3
and 7.7 of this manual.

If the PLC application requires direct access to the MMI displays (such as
changing the active display) the the CNCSTD.LIB library must be included in
the project to use those associated function blocks. This library adds all the
functions and function blocks described in chapter 7.5 of this manual.

If the PLC application requires access to the host time information then the
CNCSTD.LIB library must be included in the project to use those associated
functions. This library adds all the functions described in chapter 7.8 of this
manual.

If the PLC application requires access to the SERCOS drive interface, then the
CNCSTD.LIB library must be included in the project to use those associated
function blocks. This library adds all the functions and function blocks
described in chapter 8 of this manual.

9.6. Cross reference of operators, functions, function


blocks and libraries
For reference, here is a list of the respective operators, functions and function
blocks provided by the CNC distribution. All operators are defined by the
IEC1131 programming language. The functions and function blocks come from
the PLC project libraries (which are listed in this section).

PLC Interface Manual


page 293 / 304
MACHINEMATE®

IEC1131 IEC1131 IEC1131


Arithmetic Operators Numeric Functions Bistable Function Blocks
(app C, page 9-10+) (app D, page 9-25+) (app D, page 9-29+)
ADD ABS RS
DIV ACOS SEMA
INDEXOF ASIN SR
MOD ATAN
MUL COS Trigger Function Blocks
SIZEOF EXP (app D, page 9-30+)
SUB EXPT F_TRIG
LN R_TRIG
Bit-String Operators LOG
(app C, page 9-12+) SIN Counter Function Blocks
AND SQRT (app D, page 9-31+)
NOT TAN CTD
OR CTU
XOR String Functions CTUD
(app D, page 9-26+)
Bit-Shift Operators CONCAT Timer Function Blocks
(app C, page 9-14+) DELETE (app D, page 9-32+)
ROL FIND TOF
ROR INSERT TON
SHL LEFT TP
SHR LEN
MID
Selection Operators REPLACE
(app C, page 9-15+) RIGHT
LIMIT Note for LD programming: all
MAX of the above IEC1131 function
MIN blocks may be inserted in the LD
MOVE (LD, FDB only) IEC1131 network either as ‘Function
MUX Type Conversion block...’ (i.e., to be used as a
SEL Operators contact; that requires both first
(app D, page 9-22+) input and first output to be
Comparison Operators BOOL_TO Conversions BOOLs in the FB) or as ‘Function
(app C, page 9-17+) block with EN’ (i.e., to be used
EQ TO_BOOL Conversions as a network output).
GE
GT Conversion between Note: The operators, functions
LE Integral Number Types and function blocks on this page
LT come from standard.lib.
NE REAL_TO / LREAL_TO
Conversions
Address Operators
(app C, page 9-20) TIME_TO / TIME_OF_DAY_TO
ADR Conversions
Content Operator ^
DATE_TO / DT_TO
Calling Operator Conversions
(app C, page 9-21)
CAL (IL only) STRING_TO Conversions

TRUNC

Pages are in the PLC


Programming Manual

PLC Interface Manual


page 294 / 304
MACHINEMATE®

CNC Functions from CNC Functions from CNC Functions from


cncplc.lib cncstd.lib extdata.lib
(chapter 3) (most chap 4,some 3,7) (chapter 5)
ACTIVATE_SPOTI CLEAR_AX_ALLOC_CMD EXTCLEARERROR
ACTIVATE_SWORD fGET_D_CORR EXTCLOSEDATACHANNEL
CLEAR_ERROR_MESSAGES fGET_D_R EXTDELETEFILE
CLEAR_G92_OFFSET fGET_D_WEAR EXTGETCOMMCFG
DEACTIVATE_SPOTI fGET_H_CORR EXTGETLASTERROR
DEACTIVATE_SWORD fGET_H_I_CORR EXTGETMAPPINGSIZE
HANDWHEEL_DIRECTION fGET_H_I_WEAR EXTOPENDATACHANNEL
HANDWHEEL_FACTOR_AUTO1 fGET_H_J_CORR EXTREAD
HANDWHEEL_FACTOR_AUTO2 fGET_H_J_WEAR EXTREADDATA
HANDWHEEL_FACTOR_MAN1 fGET_H_WEAR EXTSETCOMMCFG
HANDWHEEL_FACTOR_MAN2 fGET_PARAMETER EXTSETMAPPINGSIZE
HANDWHEEL_NO_AXIS fGET_PART_POS_OFFS EXTWRITE
MOVE_INTERPOLATING_AXIS fGET_VOLATILE_PARAMETER EXTWRITEDATA
MOVE_POSITIONING_AXIS fSET_D_CORR
RESET_HANDWHEEL_FACTOR fSET_D_R
SELECT_NC_STATION fSET_D_WEAR
SET_G92_OFFSET fSET_H_CORR
SET_JOG_INCREMENTS fSET_H_I_CORR
SET_POSITIONING_ADJUST fSET_H_I_WEAR
SET_POSITIONING_FEED fSET_H_J_CORR
WRITE_ANALOG_CHANNEL fSET_H_J_WEAR
WRITE_APPL_DATA fSET_H_WEAR
WRITE_BREAKING_PARAMETER fSET_PARAMETER
WRITE_CUTTING_FORCE fSET_PART_POS_OFFS
WRITE_ERROR_MESSAGE fSET_VOLATILE_PARAMETER
WRITE_GEOMETRIC_D GET_LOCAL_DATE_TIME
WRITE_GEOMETRIC_H GET_LOCAL_TIME
WRITE_GEOMETRIC_Z GET_PARAMETER
WRITE_NO_PIECES GET_SYS_DATE_TIME
WRITE_PLANNED_LIFE GET_SYSTEM_TIME
WRITE_POSITION GET_VOLATILE_PARAMETER
WRITE_RATE_X LREAL_TO_STR
WRITE_RATE_Y LREAL2STR
WRITE_REMAINING_LIFE REAL_TO_STR
WRITE_SPARE_TOOL REAL2STR
WRITE_SPINDLE_CODE SET_PARAMETER
WRITE_SPINDLE_ORIENTATION SET_VOLATILE_PARAMETER
WRITE_SPOTI
WRITE_SUPPLEM_X
WRITE_SUPPLEM_Y
WRITE_SWORD
WRITE_TOOL_NUMBER
WRITE_TOOL_TYPE
WRITE_WARNING_LIMIT

PLC Interface Manual


page 295 / 304
MACHINEMATE®

CNC Function Blocks from CNC Function Blocks


cncplc.lib from cncstd.lib
(chapter 3) (most chap 8,some 3,7)
BLINKER APPLY_AX_ALLOC_CMD
ERASE_NC_PROGRAM_MEMORY DISTANCE_CTRL
LOAD_NC_PROGRAM GET_AX_ALLOC_CMD
READ_ANALOG_CHANNEL GET_CNC_ERR
READ_APPL_DATA GET_RING_STATE
READ_BREAKING_PARAMETER MMI_COMMAND
READ_CUTTING_FORCE READ_BYTE_CNC_VAR
READ_GEOMETRIC_D READ_DWORD_CNC_VAR
READ_GEOMETRIC_H READ_LREAL_CNC_VAR
READ_GEOMETRIC_Z READ_SERCOS_PARAMETER
READ_NO_PIECES READ_WORD_CNC_VAR
READ_PLANNED_LIFE RING_COMMAND
READ_POSITION SERCOS_COMMAND
READ_RATE_X SET_AX_ALLOC_CMD
READ_RATE_Y WRITE_SERCOS_PARAMETER
READ_REMAINING_LIFE
READ_SPARE_TOOL
READ_SUPPLEM_X
READ_SUPPLEM_Y
READ_SWORD
READ_TOOL_NUMBER
READ_TOOL_TYPE
READ_WARNING_LIMIT
READFIRSTBLOCK
SELECT_NC_PROGRAM

Note for LD programming: all


of the function blocks on this
page will be inserted in the LD
network as ‘Function block with
EN’ (i.e., to be used as a
network output).

Chapters are in this


PLC Interface Manual

PLC Interface Manual


page 296 / 304
MACHINEMATE®

Index
A/D input ...................................................... 21, 22, 236 CNC
ACT_POS_1............................................................... 15 Channel (or station).................................................15
Analog Feed Control enable ....................................... 74 Command for Automatic mode and display............99
Analog input ................................................. 21, 22, 236 Command for Manual mode and display ................95
Analog output ............................................... 21, 22, 247 Cycle on ................................................................145
Automatic mode command......................................... 99 Emergency stop.....................................................150
Auxiliary push-button............................................... 158 Feed rate hold........................................................146
Axes are not interpolated .......................................... 165 General state signals..............................................144
Axis Inputs ................................................................24, 54
Actual position.................................................. 15, 18 Optional stop M01 ................................................161
Command position............................................ 15, 18 Outputs..............................................................24, 57
Drift ...................................................................... 161 Program start.........................................................147
Drive enable.................................................... 83, 161 Return to path........................................................160
EGB motion command active............................... 216 Station .....................................................................15
End position.......................................................... 182 CNC data
End position for PLC.................................... 220, 222 Active NC program block number ..........................16
Feed interpolation enabled...................................... 71 Active NC program number....................................16
Feed rate ........................................................... 16, 18 Active subroutine program number.........................16
Feedback check disable .......................................... 78 Actual feed rate .......................................................16
Home switch input.................................................. 85 Actual position ........................................................15
Homed ok ............................................................. 183 c2xxxx for Station 2 data ........................................18
Homing all in sequence .................................... 66, 98 Command feed rate .................................................16
Homing one axis..................................................... 98 Command position ..................................................15
In position............................................................. 181 D-corrections...........................................................15
Interpolation enabled .............................................. 84 G-corrections...........................................................15
Is mirrored .................................................... 113, 191 H-corrections...........................................................15
Jog continuous ............................................ 92, 94, 96 Machine position.....................................................15
Jog incremental........................................... 92, 94, 96 P-Parameters ...................................................15, 226
Jog mode continuous ............................................ 149 Zero offsets .............................................................15
Jog mode incremental ........................................... 148 CNC data interface......................................................15
Jog via handwheel ............................................ 92, 94 CNC function interface ..................... 223, 257, 258, 288
Machine position .............................................. 15, 18 CNC tables interface ...................................................15
Mirroring strobe...................................................... 80 CNC_ERR_CNT...............................................276, 279
Motion command active ....................................... 192 COM1 .......................................................................268
Motion with handwheel ........................................ 193 Control reset................................................25, 154, 276
Move by PLC active ..................................... 219, 221 Cycle
Move by PLC completed .............................. 220, 222 Start.........................................................................65
Move by PLC enabled .......................................... 116 Stop .........................................................................68
Multiple axis jog........................................... 123, 124 Cycle input byte ..........................................................89
Pitch error comp ................................................... 163 Cycle output byte ......................................................185
Position CAM state............................................... 195 D/A output ....................................................21, 22, 247
Second set of software limits .................................. 86 D001............................................................15, 140, 237
Stepper control........................................................ 83 DDE interface ...........................................................270
Switch-over spindle/rotational axis ...................... 207 Direct mode...............................................................103
Will move during program ................................... 161 Distance control
BCD-code is valid .................................................... 173 Enable .....................................................................81
Block delete (/) active............................................... 162 Status.....................................................................172
BLOCKNUMBER...................................................... 16 D-Parameters...............................................................15
Byte number assignments ........................................... 12 DR001.........................................................................15
CAM signal for axis position.................................... 194 Drift of analog axis ...................................................161
Close axis control loop ............................................... 82 DriveOnLock ..............................................................83
CMD_POS_1.............................................................. 15 DW001........................................................................15

PLC Interface Manual


page 297 / 304
MACHINEMATE®

EDM signals ............................................... 79, 161, 168 BLINKER .............................................................227


EGB .......................................................................... 169 CLEAR_ERROR_MESSAGES ...........227, 249, 275
Electrical input...................................................... 19, 20 CLEAR_G92_OFFSET ........................................227
Electrical output.................................................... 19, 20 DEACTIVATE_SPOTI ........................................228
Electronic gear box DEACTIVATE_SWORD .....................226, 228, 253
Active ................................................................... 169 DISTANCE_CTRL...............................................228
Control signals...................................................... 217 ERASE_NC_PROGRAM_MEMORY.................229
Motion signals ...................................................... 216 EXTCLEARERROR ............................................266
Table synchronized............................................... 169 EXTCLOSEDATACHANNEL ............................267
Emergency stop state .................................................. 64 EXTOPENDATACHANNEL ..............................268
End of Program (M02/M30)..................................... 152 EXTREADDATA.................................................269
Error messages EXTWRITEDATA ...............................................269
Clear those from PLC ........................................... 275 fACTIVATE_SPOTI ............................................257
Count in CNC ....................................................... 276 fACTIVATE_SWORD.........................................257
File for PLC messages.......................................... 274 fCLEAR_G92_OFFSET .......................................257
Get CNC from PLC .............................................. 277 fDEACTIVATE_SPOTI .......................................257
Sent from PLC ...................................................... 275 fDEACTIVATE_SWORD....................................257
External data fERASE_NC_PROGRAM_MEMORY................257
Channel types ....................................................... 268 fGET_D_CORR....................................................259
Function error list ................................................. 266 fGET_D_R............................................................259
Function interface ................................................. 266 fGET_D_WEAR...................................................259
Serial data transfers .............................................. 269 fGET_H_CORR....................................................259
External operating mode fGET_H_I_CORR ................................................260
Additional function................................................. 96 fGET_H_I_WEAR................................................260
AUTOMATIC sequential block ............................. 96 fGET_H_J_CORR ................................................260
AUTOMATIC single block.................................... 96 fGET_H_J_WEAR ...............................................260
CNC........................................................................ 96 fGET_H_WEAR...................................................261
Control reset ........................................................... 97 fGET_PARAMETER ...........................................261
Hand release ........................................................... 97 fGET_PART_POS_OFFS.....................................261
Homing ................................................................... 96 fHANDWHEEL_DIRECTION ............................257
Manual mode .......................................................... 92 fHANDWHEEL_FACTOR_AUTO1 ...................257
Manual move in automatic mode............................ 97 fHANDWHEEL_FACTOR_AUTO2 ...................257
Manual positioning ................................................. 93 fHANDWHEEL_FACTOR_MAN1.....................257
Move continuous .............................................. 92, 97 fHANDWHEEL_FACTOR_MAN2.....................257
Move incremental ............................................. 92, 97 fHANDWHEEL_NO_AXIS.................................257
Move with handwheel ............................................ 92 fLOAD_NC_PROGRAM .....................................257
PLC has priority over operator ............................... 95 fMOVE_INTERPOLATING_AXIS.....................257
Program run errors................................................ 105 fMOVE_POSITIONING_AXIS ...........................257
Program selection ................................................... 99 fREAD_ANALOG_CHANNEL...........................257
Replies of the CNC for NC program select .......... 104 fREAD_APPL_DATA..........................................257
Retreat activation.................................................... 97 fREAD_SWORD ..................................................257
Fast output signal.............................................. 128, 208 fREADFIRSTBLOCK ..........................................257
FCOMM ..................................................................... 16 fRESET_HANDWHEEL_FACTOR ....................258
Feed rate fSELECT_NC_PROGRAM .................................258
Actual ..................................................................... 16 fSET_D_CORR ....................................................262
Command ............................................................... 16 fSET_D_R.............................................................262
Hold ........................................................................ 68 fSET_D_WEAR....................................................262
Override................................................................ 114 fSET_G92_OFFSET.............................................258
Feed rate per rotation (G95) ................. 69, 72, 109, 111 fSET_H_CORR ....................................................263
Fieldbus IO ................................................................. 20 fSET_H_I_CORR .................................................263
File access................................................................. 268 fSET_H_I_WEAR ................................................263
Five-axes function control ................................ 143, 218 fSET_H_J_CORR.................................................264
Forcing...................................................................... 280 fSET_H_J_WEAR ................................................264
FREAL ....................................................................... 16 fSET_H_WEAR....................................................264
Function fSET_JOG_INCREMENTS .................................258
ACTIVATE_SPOTI ............................................. 226 fSET_PARAMETER ............................................265
ACTIVATE_SWORD.......... 226, 228, 241, 253, 255 fSET_PART_POS_OFFS .....................................265
PLC Interface Manual
page 298 / 304
MACHINEMATE®

fSET_POSITIONING_FEED............................... 258 SET_JOG_INCREMENTS...................123, 124, 245


fWRITE_ANALOG_CHANNEL ........................ 258 SET_PARAMETER .............................................246
fWRITE_APPL_DATA ....................................... 258 SET_POSITIONING_ADJUST ...........................246
fWRITE_SPINDLE_CODE ................................. 258 SET_POSITIONING_FEED ................116, 235, 246
fWRITE_SPINDLE_ORIENTATION................. 258 WRITE_ANALOG_CHANNEL ..........................247
fWRITE_SPOTI ................................................... 258 WRITE_APPL_DATA .........................................247
fWRITE_SWORD................................................ 258 WRITE_BREAKING_PARAMETER .................248
GET_CNC_ERR .......................................... 276, 277 WRITE_CUTTING_FORCE................................248
GET_LOCAL_TIME ........................................... 286 WRITE_ERROR_MESSAGE ..............248, 275, 276
GET_PARAMETER ............................................ 230 WRITE_GEOMETRIC_D....................................249
GET_RING_STATE ............................................ 288 WRITE_GEOMETRIC_H....................................249
GET_SYS_DATE_TIME..................................... 287 WRITE_GEOMETRIC_Z ....................................250
GET_SYSTEM_TIME......................................... 287 WRITE_NO_PIECES...........................................250
HANDWHEEL_DIRECTION ............................. 230 WRITE_PLANNED_LIFE ...................................250
HANDWHEEL_FACTOR_AUTO1 .................... 230 WRITE_POSITION..............................................251
HANDWHEEL_FACTOR_AUTO2 .................... 231 WRITE_RATE_X.................................................251
HANDWHEEL_FACTOR_MAN1...................... 232 WRITE_RATE_Y.................................................251
HANDWHEEL_FACTOR_MAN2...................... 232 WRITE_REMAINING_LIFE...............................252
HANDWHEEL_NO_AXIS.................................. 234 WRITE_SERCOS_PARAMETER.......................291
LOAD_NC_PROGRAM...................................... 234 WRITE_SPARE_TOOL.......................................252
LREAL_TO_STR................................................. 284 WRITE_SPINDLE_CODE...................................252
LREAL2STR........................................................ 284 WRITE_SPINDLE_ORIENTATION...................253
MMI_COMMAND .............................................. 281 WRITE_SPOTI.............................................226, 254
MOVE_INTERPOLATING_AXIS80, 116, 219, 220, WRITE_SUPPLEM_X .........................................255
235, 246 WRITE_SUPPLEM_Y .........................................255
MOVE_POSITIONING_AXIS ..... 87, 221, 222, 235, WRITE_SWORD..........................................226, 255
246 WRITE_TOOL_NUMBER ..................................256
READ_ANALOG_CHANNEL ........................... 236 WRITE_TOOL_TYPE .........................................256
READ_APPL_DATA .......................................... 236 WRITE_WARNING_LIMIT................................256
READ_BREAKING_PARAMETER................... 237 Function blocks
READ_CUTTING_FORCE ................................. 237 List ........................................................................293
READ_GEOMETRIC_D ..................................... 237 Programming.........................................................225
READ_GEOMETRIC_H ..................................... 238 Functions
READ_GEOMETRIC_Z...................................... 238 List ........................................................................293
READ_NO_PIECES ............................................ 238 Programming.........................................................225
READ_PLANNED_LIFE ............................ 130, 239 G01 override active...................................................162
READ_POSITION ............................................... 239 G10..............................................................................81
READ_RATE_X .................................................. 239 G54_1..........................................................................15
READ_RATE_Y .................................................. 240 G63............................................................................114
READ_REMAINING_LIFE ................................ 240 Gear Hobber active ...................................................169
READ_SERCOS_PARAMETER ........................ 289 Geo.Corr.D........................................................140, 237
READ_SPARE_TOOL ........................................ 240 Geo.Corr.H........................................................140, 238
READ_SUPPLEM_X .......................................... 241 G-Parameters...............................................................15
READ_SUPPLEM_Y .......................................... 241 H001............................................................15, 140, 238
READ_SWORD................................................... 241 H001_I ........................................................................15
READ_TOOL_NUMBER.................................... 242 H001_J ........................................................................15
READ_TOOL_TYPE........................................... 242 Handwheel
READ_WARNING_LIMIT ................................. 243 Control signals ......................................................117
READFIRSTBLOCK........................................... 243 Direction ...............................................................230
REAL_TO_STR ................................................... 285 Factor in Auto ...............................................230, 231
REAL2STR .......................................................... 285 Factor in Manual ...................................................232
RESET_HANDWHEEL_FACTOR..................... 243 Increment ................................................................94
RING_COMMAND ............................................. 289 Lost ticks...............................................................170
SELECT_NC_PROGRAM .................................. 244 Reset factor in Auto ..............................................243
SELECT_NC_STATION ............. 119, 149, 244, 274 HMI..................................................................See MMI
SERCOS_COMMAND........................................ 290 Homing cycles complete ...........................................156
SET_G92_OFFSET.............................................. 245 H-Parameters...............................................................15
PLC Interface Manual
page 299 / 304
MACHINEMATE®

HW001 ....................................................................... 15 IN_MIRR_STROBE...........................................80, 113


HW001_I .................................................................... 15 IN_MIRR01 ..............................................................113
HW001_J.................................................................... 15 IN_MIRROR......................................... 35, 80, 113, 191
IB cycle block............................................................. 89 IN_NO_HDW_RESET...............................................73
IGNORE24ERRORS................................................ 283 IN_NO_TCP .............................................................143
IN_AFC_EN............................................................... 74 IN_NULLV01...............................................69, 72, 109
IN_BACK_TRAFO_OFF ........................................ 143 IN_OVERR01.....................................................94, 114
IN_BACK_TRAFO_ON .......................................... 143 IN_OVERR09...........................................................115
IN_BACKWARD............................................... 76, 160 IN_OVERRIDE ..................................................36, 114
IN_BLOCK_DEL............................................... 75, 162 IN_PARK01..............................................................111
IN_BLOCK_DELn..................................................... 75 IN_PARKING.....................................................35, 111
IN_CANCELBLK ............................................ 125, 204 IN_PITCHERR ...................................................77, 163
IN_COORD_DEF .................................................... 143 IN_PITCHERRn .........................................................77
IN_CYCB_01 ............................................................. 89 IN_PLC_NO_RETREAT ...................................80, 116
IN_CYCLEB ........................................................ 31, 89 IN_POS_01 .........................................................87, 235
IN_DIS_ENABLE...................................................... 81 IN_REPEAT ...............................................................79
IN_DISABLE ..................................................... 32, 106 IN_REV_01 ..............................................................110
IN_DREN01 ............................................................... 84 IN_SINGLE_STEP...........................................126, 205
IN_DRIVEEN .............................................. 29, 84, 165 IN_SPINDLE......................................................34, 109
IN_DRIVEON.............................. 29, 82, 165, 182, 235 IN_START.......... 65, 68, 87, 88, 98, 145, 147, 151, 152
IN_DRON01....................................................... 82, 155 IN_STOPn 65, 66, 68, 87, 116, 145, 146, 165, 167, 172,
IN_ENABLE .............66, 71, 84, 95, 165, 167, 174, 182 182
IN_EXT_01 ................................................................ 90 IN_STRTPOS ....................................... 31, 87, 221, 222
IN_EXT_17 ................................................................ 99 IN_SW_AXES....................................................33, 106
IN_EXTMODE ......25, 32, 90, 112, 114, 119, 123, 124, IN_SWAX01.............................................................106
148, 149, 150, 160, 186, 187, 245 IN_SWLIMIT .......................................................30, 86
IN_FASTIO........................................................ 38, 120 IN_TCP_ACTIVE ....................................................143
IN_FASTM......................................................... 47, 128 IN_TCP_COORD .....................................................143
IN_FASTM_BIT1 .................................................... 128 IN_TOOL....................................................48, 129, 132
IN_FASTSELECT.............................................. 39, 122 IN_TOOLACTIVE ...........................................130, 210
IN_FIVEAXES........................................... 50, 143, 218 IN_TOOLCHANGE 129, 131, 133, 134, 135, 136, 137,
IN_FORWARD .......................................................... 76 138, 211
IN_G01_OVER .................................................. 75, 162 IN_TOOLPLACE ....... 48, 131, 133, 134, 136, 137, 138
IN_G01_OVERn ........................................................ 75 IN_TOOLPOS .................................. 130, 131, 139, 210
IN_GEAR01 ............................................................. 107 IN_TOOLRELEASE 129, 131, 133, 135, 137, 140, 212
IN_HDAX01 ............................................................ 117 IN_TOOLREQ............................ 49, 130, 131, 139, 210
IN_HDW1_DISABLE...................................... 117, 119 IN_TRANSF .... 66, 70, 87, 88, 116, 133, 134, 135, 136,
IN_HDWHEEL .................................................. 37, 117 137, 138, 167, 172, 174
IN_HOME01n ............................................................ 85 IN_WITH_MOVE ......................................................77
IN_HOMING ................................................. 30, 84, 85 IN_WITH_MOVEn ............................................77, 161
IN_IGNRMSERR....................................................... 78 INEMERGENCn ............ 64, 66, 82, 145, 150, 157, 165
IN_INSPECT.............................................................. 79 INFSELECT01 .........................................................122
IN_INTERVA ............................................................ 79 INFSIGNAL01 .........................................................120
IN_IPOMT01 ................................................... 116, 235 INGENERAL1................................................27, 28, 63
IN_IPOMVMT ................................... 36, 116, 219, 220 INGENERAL2............................................................79
IN_IPR................................................................ 46, 125 INMASK01...............................................................121
IN_IPR_DO_STEP........................................... 126, 206 INPLAYBACK...........................................................73
IN_IR_ACT................................................................ 52 Input byte number .......................................................12
IN_IR_EN................................................................... 51 Interpolating axis
IN_IR_RD_IO ............................................................ 51 Move by PLC........................................219, 220, 235
IN_JMNS............................................................ 41, 124 Inverted signals ...........................................................25
IN_JMNS_01.................................................... 123, 124 IO
IN_JPLS ............................................................. 40, 123 24v supply check...................................................283
IN_JPLS_01 ..................................................... 123, 124 Byte number assignments .......................................20
IN_LIMIT01............................................................... 86 Display ..................................................................280
IN_M1STOP....................................................... 76, 161 Forcing ..................................................................280
IN_M1STOPn............................................................. 76 Logic examples .......................................................19
PLC Interface Manual
page 300 / 304
MACHINEMATE®

Libraries InpositioningArea..................................................182
Cffplc.lib....................................................... 257, 292 M40Appl ...............................................................107
Cnclib.lib .............................................................. 292 ManOverride .........................................................114
Cncplc.lib.............................................. 223, 292, 295 OverrideAppl ................................................114, 115
Cncstd.lib......223, 226, 258, 276, 280, 284, 286, 288, ParkAxesAppl .......................................................112
293, 295 ParkAxesInitialState..............................................112
Extdata.lib............................................. 266, 293, 295 PLCMirrorReset....................................................113
List of functions and function blocks ................... 293 PLCOverrideByteNo.............................................115
Standard.lib................................................... 292, 294 Read specific parameter ........................................236
Light output .......................................................... 19, 20 RefAddressAppl......................................................85
LPT........................................................................... 268 RefAxesAppl...........................................................85
M00 .......................................................................... 151 SAxisFeedAppl .......................................................94
M01 ............................................................ 76, 151, 161 ShifingSpindleSpeed.............................................108
M02 .................................................................... 25, 152 SoftwareCamAppl.................................................195
M03 .................................................................. 108, 252 SoftwareCamValue ...............................................195
M05 .......................................................................... 252 SoftwareLimitMinus ...............................................86
M06 .......................................................... 132, 213, 214 SoftwareLimitPlus ..................................................86
M19 .................................................................. 176, 253 SpindleBCDNo .....................................................252
M30 ............................................................ 25, 152, 172 SpindleFeedbackAppl ...........................................190
M40 .......................................................................... 108 SpindleInpositionDiff....................................189, 190
M41 .......................................................................... 108 SpindleInpositionPerCent .....................................189
Machine input............................................................. 19 SpindleOverride ....................................................115
Machine output ........................................................... 19 SpindleShiftingSpeed............................................253
Machine Parameter SpindleSlopTime...................................................108
AdditionKeyIOAddress ........ 114, 146, 147, 158, 159 SpindleStopRPM...................................................253
AutoFeedoverride ................................................. 114 TransmissionRatio ................................................253
AxisSlopeTime ..................................................... 235 WCycleByteNo .......................................................89
AxisSpeedMaxAppl.............................................. 246 Write specific parameter .......................................247
BCDByteMaskIndex .................................... 128, 208 MAINPROGNUMBER ..............................................16
BCDDistanceTime........................................ 154, 174 Manual mode command..............................................95
BCDStrobeTime ............................................. 72, 174 M-code ..............................................................170, 173
CharacterApplTab ........................................ 174, 241 MMI
CycleAnalogIn...................................................... 236 Axis jog with handwheel selection........................193
CycleAnalogOut ................................................... 247 CNC Station is active............................................149
DistContrMCodeOn................................................ 81 Command from PLC.............................................281
DistSignalByte........................................................ 81 Command with hardkey# ......................................282
DriveOnAppl .......................................................... 83 Command with softkey# .......................................282
EGBLagDiff1 ....................................................... 217 Function interface .................................275, 277, 280
EGBLagDiff2 ....................................................... 217 Function key level.................................................271
EGBSynchronDifferencePLC............................... 169 Hard key selection from PLC................................281
ExtModeHandwheelFeed ............... 94, 230, 232, 233 Info PLC Interface ................................................280
ExtModeHandwheelFeed2 ........................... 230, 232 Operating mode level ............................................271
ExtModeJogInkr ..................................................... 94 PLC interface ........................................................271
ExtModeManFeed .................................................. 94 Program Coordinate display function ...................282
FaktInchMetric ..................................................... 233 Soft key selection from PLC .................................281
FastIOByteAppl1.................................................. 122 Zoom key ..............................................................271
FastIOByteAppl2.................................................. 122 MMI_LASTKEY ......................................................273
FastIOPLCByteBitMask....................................... 121 MMI_LEVEL ...........................................................271
FastIOPLCByteIO ........................................ 120, 122 MMISTATION .........................................................274
FastIOPLCByteOutMask...................................... 121 Multiple axis jog ...............................................123, 124
GCodeAppl............................................................. 25 Multiple CNC stations
HandwheelBCDAppl............................................ 118 CNC data names .....................................................18
HandwheelBCDNo............................................... 118 CNC interface names ..............................................26
HandwheelNo1Axis.............................................. 119 PLC function names......................................257, 258
HandwheelNo1Factor........................... 230, 231, 232 Multiplex mode .........................................................100
HandwheelPLCByte ............................................. 118 NC block single step .................................................127
HCorrAxes...................................................... 16, 260 NC block single step mode .......................................126
PLC Interface Manual
page 301 / 304
MACHINEMATE®

NC block transfers enabled................................. 70, 172 ON_CONTROL01 ....................................................191


NC part program....................................... 229, 234, 244 ON_COORD_DEF ...................................................218
NC program ON_CYCB01............................................................185
Block number ......................................................... 16 ON_CYCLE_STOP ..................................................172
Number ............................................................. 16, 18 ON_CYCLEON65, 68, 70, 71, 84, 88, 96, 99, 105, 130,
NC program processing 145
Block transfers enabled .................................. 70, 172 ON_DIST_CTRL......................................................172
Cycle stop ....................................................... 68, 172 ON_EGB_ACTIVE ..................................................169
Error...................................................................... 157 ON_EGB_SYNC ......................................................169
In backward direction ........................................... 160 ON_EGBC01 ............................................................217
Override G01 at rapid ........................................... 162 ON_EGBCONTROL ..........................................50, 217
Read to block active ............................................. 170 ON_EGBM01 ...........................................................216
Single block step command .................................. 127 ON_EGBMOTION.............................................50, 216
Single step command............................................ 206 ON_EMERG.............................................................150
Single step mode active ........................................ 205 ON_EXT_01 .............................................................186
Single step mode enabled ..................................... 126 ON_EXT_17 .............................................................187
Skip blocks with / ................................................. 162 ON_FASTM .......................................................47, 208
Start ........................................................................ 65 ON_FASTM_BIT1 ...................................................208
Stop......................................................................... 68 ON_FIVEAXES .................................................51, 218
Will stop on M01.................................................. 161 ON_G01_OVER .................................................75, 162
With axis movement............................................. 161 ON_GP_NOTEMPTY ..............................................209
Without axis movement........................................ 161 ON_HANDW01 .......................................................193
No feedback control.................................................. 155 ON_HDW_TICKS_LOST1......................................170
ON_ADDKEY1 ....................................................... 158 ON_HDW_TICKS_LOST2......................................171
ON_ADDKEY2 ....................................................... 159 ON_HDW_TICKS_LOST3......................................171
ON_ADDMISSN...................................................... 159 ON_HOME_OK .......................................................156
ON_AUTO ............................................... 126, 127, 148 ON_HOME01 ...........................................................183
ON_AUTOFOCUS .................................................. 172 ON_HOMEOK .........................................................168
ON_BACK_TRAFO ................................................ 218 ON_HOMING ..........................................................148
ON_BACKW ..................................................... 76, 160 ON_INC_JOG...........................................................148
ON_BCD01 .............................................................. 177 ON_INP01 ....................................................82, 88, 181
ON_BLKCHNG ....................................................... 161 ON_INTRET.............................................................168
ON_BLOCK_DEL ............................................. 75, 162 ON_INTVEND .........................................................168
ON_CAM1_01 ......................................................... 194 ON_INTVHLD .........................................................168
ON_CAM1_02 ......................................................... 194 ON_IPR ..............................................................46, 204
ON_CAM1_03 ......................................................... 194 ON_IPR_DO_STEP..................................................206
ON_CAM1_04 ......................................................... 194 ON_IR_ACT...............................................................52
ON_CAM1_05 ......................................................... 196 ON_IR_EN .................................................................51
ON_CAM1_09 ......................................................... 197 ON_IR_PROG_ACT ..................................................52
ON_CAM1_13 ......................................................... 198 ON_IR_RD_IO ...........................................................51
ON_CAM1_17 ......................................................... 199 ON_JOGMODE........................................................148
ON_CAM1_21 ......................................................... 200 ON_M1STOP .....................................................76, 161
ON_CAM1_25 ......................................................... 201 ON_MDI ...................................................................148
ON_CAM1_29 ......................................................... 202 ON_MEMORY_MODE ...........................................205
ON_CAM1_4 ..................................................... 38, 194 ON_MEMORY_OPERATION_ACTIVE................205
ON_CAM13_16 ................................................. 41, 198 ON_MIRR01.............................................................191
ON_CAM17_20 ................................................. 42, 199 ON_MOVE01 .....................................................72, 190
ON_CAM21_24 ................................................. 43, 200 ON_NCERROR........................................................157
ON_CAM25_28 ................................................. 44, 201 ON_NO_CNTR ............................................64, 83, 155
ON_CAM29_32 ................................................. 45, 202 ON_NO_TCP............................................................218
ON_CAM5_8 ..................................................... 39, 196 ON_NP_NOTEMPTY ..............................................209
ON_CAM9_12 ................................................... 40, 197 ON_OP_NOTEMPTY ..............................................209
ON_CANCELBLK .......................................... 125, 204 ON_PANEL..............................................................159
ON_CMNDM01................................................. 88, 192 ON_PANEL01..........................................................203
ON_CMNDP01 .................................................. 88, 192 ON_PITCHERR .................................................77, 163
ON_CNC_CHAN_ACT........................................... 149 ON_PLACENOTVAL..............................................209
ON_CONT_JOG ...................................................... 149 ON_PLC_IPO_ACT ...................................52, 219, 235
PLC Interface Manual
page 302 / 304
MACHINEMATE®

ON_PLC_IPO_ACT_01........................................... 219 ONCMND_P.......................................................36, 192


ON_PLC_IPO_ENDP ................................ 53, 220, 235 ONCONTROL..............................................35, 85, 191
ON_PLC_IPO_ENDP_01 ........................................ 220 ONCYCBYTE ....................................................31, 185
ON_PLC_POS_ACT.................................. 53, 221, 235 ONEXTMODE ..................... 32, 91, 104, 154, 156, 186
ON_PLC_POS_ACT_01.......................................... 221 ONGENERAL1 ..................................................27, 144
ON_PLC_POS_ENDP ............................... 53, 222, 235 ONGENERAL2 ..................................................28, 164
ON_PLC_POS_ENDP_01 ....................................... 222 ONHANDWH.....................................................37, 193
ON_PLCMDONE .............................................. 33, 188 ONHOMINGOK.................................................30, 183
ON_PLCMDONE01 ................................................ 188 ONINPOS ...................................................30, 165, 181
ON_POS_01 ....................................................... 88, 184 ONMIRROR .......................................................35, 191
ON_PRG_END ................................................ 152, 172 ONPANEL..........................................................46, 203
ON_PRG_STP.................................................... 67, 151 ONPOSAXES .....................................................31, 184
ON_PROGRAM............................................... 159, 172 ONREADY ...................................................32, 83, 188
ON_RAPID ...................................................... 130, 166 ONSPINDLE ......................................................34, 189
ON_READ_TO_BLK ...................................... 170, 176 ONTOOL ....................................................48, 132, 209
ON_READY01......................................................... 188 Operator interface ............................................See MMI
ON_RESET .............................................. 150, 152, 154 Operators
ON_RETREAT ........................................................ 160 List ........................................................................293
ON_SINGLE ............................................ 126, 148, 205 Output byte number ....................................................12
ON_SINGLE_STEP......................................... 126, 205 P001 ............................................................................15
ON_SP_NOTEMPTY .............................................. 209 Parallel port access....................................................268
ON_SPARENOTFND.............................................. 214 Parking axis...............................................................111
ON_STAND ................................... 68, 70, 71, 130, 165 Part program....................... See NC program processing
ON_STAND01 ................................................. 130, 189 Path interpolation enabled...........................................71
ON_STARTNC .................................................. 65, 147 Pitch error compensation ..........................................163
ON_STOPNCn ................................................... 68, 146 Playback......................................................................74
ON_STROBE1 ..................151, 152, 154, 173, 178, 180 PLC
ON_STROBE2 ......................................................... 173 CNC function interface .........................................225
ON_STROBE3 ......................................................... 173 CNC shutdown......................................................283
ON_STROBE4 ......................................................... 173 Command to MMI ................................................281
ON_SWAX......................................................... 47, 207 Critical interface signals..........................................62
ON_SWAX01........................................................... 207 End spindle control ...............................................253
ON_TACT01............................................................ 215 Error message................................................227, 248
ON_TCP_ACTIVE .................................................. 218 Error message text file ..........................................274
ON_TCP_COORD ................................................... 218 Interface diagram ....................................................11
ON_TEACHED........................................................ 160 Introduction to interface..........................................12
ON_THREAD .............................................. 69, 72, 167 MIO 24v supply check..........................................283
ON_TLOC01............................................................ 215 POU definition ........................................................23
ON_TOOL_IS_ACT ........................ 134, 136, 138, 213 RETAIN data ..........................................................14
ON_TOOLANSWER.......129, 133, 134, 135, 136, 137, Scan time...............................................................284
138, 212 Scanning and IO timing ..........................................23
ON_TOOLDIR......................... 133, 134, 137, 138, 211 String functions .....................................................284
ON_TOOLERROR .......................................... 139, 212 Take spindle control..............................................226
ON_TOOLINPOS ............................................ 135, 212 Time functions ......................................................286
ON_TOOLLIFEEND ............................................... 210 PLC_TIME ...............................................................284
ON_TOOLNOTFND................................................ 213 Positioning axis
ON_TOOLPLACE ............................. 49, 133, 137, 215 Control ....................................................................87
ON_TOOLPOINT ............................ 130, 135, 139, 210 Move .....................................................................235
ON_TOOLREF ........................................................ 211 Move at end point .................................................222
ON_TOOLSTART ....129, 133, 134, 136, 137, 138, 211 Move status ...........................................................221
ON_TOOLTABLE............................................. 49, 215 Set feed rate...........................................................246
ON_TOOLWARNING ............................................ 210 Start.........................................................................87
ON_TRANSF ........................................................... 172 Stop .........................................................................87
ON_WITH_MOVE .................................... 77, 161, 176 P-Parameters ...............................................................15
ONBCDWORD1 ........................ 29, 151, 152, 176, 177 Probe
ONBCDWORD2 ................................................ 29, 177 PLC input signal....................................................120
ONCMND_M..................................................... 36, 192 PLC mask for input ...............................................121
PLC Interface Manual
page 303 / 304
MACHINEMATE®

PLC selects source for input ................................. 122 Positioning axis .......................................................87
Program ..............................See NC program processing Stepper axis control.....................................................83
Program End................................... See End of Program Stop positioning axis...................................................87
Program stop (M00/M01) ......................................... 151 SUBPROGNUMBER .................................................16
Programmed homing (G74)........................................ 84 Switch input ..........................................................19, 20
Rapid traverse (G00) ................................................ 166 Switch-over spindle/rotational axis...................106, 207
RETAIN data in PLC ................................................. 14 S-word............................................... 226, 228, 241, 255
RMS............................................................................ 78 Systemvars.cfg ..........................................................271
S-code............................................................... 173, 176 T-code ............................................... 170, 173, 242, 256
Sercos axis TCP programming (G180/G181/G182/G183) ..143, 218
Command function ............................................... 290 Teach panel
Drive ready ........................................................... 188 Active....................................................................159
Position control loop closed.................................. 191 PLC function key ..................................................203
Read parameter function....................................... 289 Teaching a part program .............................................74
Write parameter function...................................... 291 Test run without movement ......................................161
SERCOS interface Thread cutting (G33/G34)....... 69, 70, 72, 109, 111, 167
Get ring state......................................................... 288 Tool change
Issue command to ring.......................................... 289 Flow chart .............................................................142
PLC function names ............................................. 288 Sequences..............................................................132
Serial port access ...................................................... 268 Tool data
SET_POS_1................................................................ 15 Breaking parameter .......................................237, 248
SHUTDOWN_CNC_INIT ....................................... 283 Cutting force .................................................237, 248
SHUTDOWN_DENY .............................................. 283 Geometric compensation D...........................237, 249
SHUTDOWN_DISABLE ........................................ 283 Geometric compensation H...........................238, 249
SHUTDOWN_OS_INIT .......................................... 283 Geometric compensation Z ...........................238, 250
SHUTDOWN_REQ ................................................. 283 Magazine position .........................................239, 251
Signal interface ........................................................... 23 Planned tool life ............................................239, 250
Spindle Rate of wear in X ..........................................239, 251
Actual position........................................................ 17 Rate of wear in Y ..........................................240, 251
At speed ................................................................ 190 Remaining number of pieces.........................238, 250
At standstill........................................................... 189 Remaining tool life........................................240, 252
Gear stage selection .............................................. 107 Spare tool number .........................................240, 252
M-code to start/stop .............................................. 252 Supplementary compensation for X..............241, 255
Orient (M19)................................. 109, 110, 176, 253 Supplementary compensation for Y..............241, 255
Output reversed polarity ....................................... 110 Tool life warning limit ..................................243, 256
Output set to zero.................................................. 109 Tool number..................................................242, 256
PLC ends control .................................................. 253 Tool type .......................................................242, 256
PLC takes control ................................................. 226 Tool location values ..................................................242
Speed (S-word) ..................................................... 226 Tool magazine location.............................................215
Speed override .............................. 115, 226, 228, 254 Tool magazine location request ................................131
Stopped ................................................................. 189 Tool management control .........................................129
Switch-over spindle/rotational axis .............. 106, 207 Tool management signals..........................................209
Start Tool table location ....................................................215
Homing a single axis from PLC ............................. 98 Tool table location request........................................131
Homing sequence ................................................... 65 Tool type values ........................................................242
Part program ........................................................... 65 Zero offsets .................................................................15

PLC Interface Manual


page 304 / 304

You might also like