User Tools

Site Tools


mycnc:global_variables
Variable Name Variable Address Comments
GVAR_MODAL_G0_G3 4001 Modal state of G00, G01, G02, G03, G33, G34
GVAR_MODAL_G96_G97 4002 Modal state of G96, G97
GVAR_MODAL_G68_G69 4004 Modal state of G68, G69
GVAR_MODAL_G98_G99 4005 Modal state of G98, G99
GVAR_MODAL_G20_G21 4006 Modal state of G20, G21
GVAR_MODAL_G40_G42 4007 Modal state of G40, G41, G42
GVAR_MODAL_G25_G26 4008 Modal state of G25, G26
GVAR_MODAL_G22_G23 4009 Modal state of G22, G23
GVAR_MODAL_G80_G89 4010 Modal state of G80 - G89
GVAR_MODAL_G66_G67 4012 Modal state of G66, G67
GVAR_MODAL_G54_G59 4014 Modal state of G54-G59
GVAR_MODAL_G17_G19 4016 Modal state of G17-G19
GVAR_TOOL_1_X_CORRECTION 4600 +98
GVAR_TOOL_1_Z_CORRECTION 4700 +98
GVAR_RUNNING_STOP 4800
GVAR_CURRENT_BLOCK_END_POSITION 5001 (+8) program position at the end of current block
GVAR_CURRENT_MACHINE_POSITION 5021 (+8) current position in machine coordinates
GVAR_CURRENT_PROGRAM_POSITION 5041 (+8)
GVAR_OFFSET_G38_PROBE 5061
GVAR_G38_PROBE_RESULT 5070
GVAR_OFFSET_G28 5161
GVAR_OFFSET_G30 5181
GVAR_OFFSET_G92 5211
GVAR_COORD_SYSTEM_NUMBER 5220 Register keeps Current Coordinates System number
1- G54, 2- G55, 3- G56,
4- G57, 5- G58, 6- G59,
7- G59.1, 8- G59.2, 9- G59.3
GVAR_OFFSET_G54_DATA 5221 (+8) Offsets between Machine and Work coordinates for Coordinates system #1 (G54)
#5221 for X, #5222 for Y, #5223 for Z, #5224 for A, #5225 for B, #5226 for C, #5227 for U, #5228 for V, #5229 for W
GVAR_OFFSET_G55_DATA 5241 (+8) Offsets between Machine and Work coordinates for Coordinates system #1 (G55)
GVAR_OFFSET_G56_DATA 5261 (+8) Offsets between Machine and Work coordinates for Coordinates system #1 (G56)
GVAR_OFFSET_G57_DATA 5281 (+8) Offsets between Machine and Work coordinates for Coordinates system #1 (G57)
GVAR_OFFSET_G58_DATA 5301 (+8) Offsets between Machine and Work coordinates for Coordinates system #1 (G58)
GVAR_OFFSET_G59_DATA 5321 (+8) Offsets between Machine and Work coordinates for Coordinates system #1 (G59)
GVAR_OFFSET_G591_DATA 5341 (+8) Offsets between Machine and Work coordinates for Coordinates system #1 (G59.1)
GVAR_OFFSET_G592_DATA 5361 (+8) Offsets between Machine and Work coordinates for Coordinates system #1 (G59.2)
GVAR_OFFSET_G593_DATA 5381 (+8) Offsets between Machine and Work coordinates for Coordinates system #1 (G59.3)
GVAR_CHECK_TOOL_MISMATCH 5397
GVAR_CHECK_TOOL_BREAKAGE 5398
GVAR_OFFSET_TOOL_PARAMS 5400
GVAR_CURRENT_TOOL_NUMBER 5400
GVAR_CURRENT_TOOL_OFFSET 5401 +8 for all axes
GVAR_SCHEDULED_TOOL_NUMBER 5409 tool number, that going to be next in tool holder
GVAR_CURRENT_TOOL_DIAMETER 5410
GVAR_TOOL_FRONTANGLE 5411
GVAR_TOOL_BACKANGLE 5412
GVAR_TOOL_ORIENTATION 5413
GVAR_TOOL_HOLDER_ORIENTATION 5415
GVAR_SOFT_LIMITS_MIN 5421 +8
GVAR_SOFT_LIMITS_MAX 5431 +8
GVAR_OFFSET_G282 5441
GVAR_HOME_AFTER_POSITION 5451
GVAR_CURRENT_NUM_LINE 5480 Stop NC line
GVAR_CURRENT_NUM_NC 5460 Stop NC line
GVAR_CURRENT_NC_POSITION 5461
GVAR_TOOL_SENSOR_POSITION 5471 +8
GVAR_SURFACE_SENSOR_WIDTH 5490
GVAR_PIERCE_HEIGHT 5491
GVAR_OFFSETZ_MANUAL 5492
GVAR_OFFSETZ_THC 5493
GVAR_SURFACE_SENSOR_NUMBER 5494
GVAR_SURFACE_SENSOR_TYPE 5495
GVAR_SHEET_THICKNESS 5496
GVAR_OFFSET_G283 5501
GVAR_OFFSET_G284 5511 +9
GVAR_END_SENSORS_IGNORE 5521 Writing “1” to this register will turn off Hardware Limit Sensors control temporarily.
GVAR_JOG_STEP_SIZE 5522
GVAR_JOG_STEP_FLOAT 5523
GVAR_SPINDLE_SPEED 5524
GVAR_SOFT_LIMITS_IGNORE 5525 Writing “1” to this register will turn off Software Limits control temporarily.
GVAR_M30_SCHEDULED_REWIND 5526
GVAR_SHOW_NCMESSAGE 5527
GVAR_DRAWING_MODE 5528
GVAR_SHOCK_SENSOR_IGNORE 5529
GVAR_STEP_PER_UNIT 5530 +6
GVAR_PARKING1 5541 (+6)
GVAR_PARKING2 5551 (+6)
GVAR_PARKING3 5561 (+6)
GVAR_PARKING4 5571 (+6)
GVAR_PARKING5 5581 (+6)
GVAR_PARKING6 5591 (+6)
GVAR_CURRENT_TOOLCHANGER_TYPE 5600
GVAR_TOOLCHANGER_UNLOAD_OFFSET 5601 +8
GVAR_TOOLCHANGER_BLOW_OFF_OFFSET 5610 +8
GVAR_MYDEV_MSG_COUNTER 5630 +64 till 5694
GVAR_TECHNOLOGY_CFG 5701
0- flexible;
1- plasma;
2- gas;
3- mill;
4- lathe;
5- laser engraving
enum{
 TECH5701_FLEX=0,
 TECH5701_PLASMA,    //1
 TECH5701_GAS,       //2
 TECH5701_MILL,      //3
 TECH5701_LATHE,     //4
 TECH5701_LASER_ENG  //5
};
GVAR_THC_ENABLE 5702 0- disable; 1- enable
GVAR_IHC_ENABLE 5703 0- disable; 1- enable
GVAR_ET5_SLOW_PID_ENABLE 5705 ET5 SLOW PID: 0- disable; 1- enable
GVAR_CV_MODE 5710
GVAR_CV_TOLERANCE 5711
GVAR_SOFT_LIMITS_CHECKER 5714
GVAR_LATHE_GEARS 5715
GVAR_MODE_SINGLE_BLOCK 5720
GVAR_POSITION_STORED 5900
GVAR_CURRENT_MOTION_CODE 6060
GVAR_CURRENT_MOTION_WORK_PTR 6061 Motion controller work command pointer
GVAR_CURRENT_MOTION_LAST_PTR 6062 Motion controller work command pointer
GVAR_CURRENT_NC_LINE 6063 Current NC line number
GVAR_TOTAL_NC_LINES 6064
GVAR_SYSTEM_JOB_RUN 6065
GVAR_OIL_LENGTH_COUNTER 6080
GVAR_OIL_REVERSE_COUNTER 6081
GVAR_SOFT_LIMITS_CONTROL 6083
GVAR_TOOLCHANGER_POSITION 6101 +8
GVAR_TOOLCHANGER_NEXT_POSITION 6111 +6
GVAR_TOOLCHANGER_1_POSITION 6121 +6
GVAR_TOOLCHANGER_2_POSITION 6131 +6
GVAR_TOOLCHANGER_3_POSITION 6141 +6
GVAR_TOOLCHANGER_4_POSITION 6151 +6
GVAR_TOOLCHANGER_5_POSITION 6161 +6
GVAR_TOOLCHANGER_6_POSITION 6171 +6
GVAR_TOOLCHANGER_7_POSITION 6181 +6
GVAR_TOOLCHANGER_8_POSITION 6191 +6
GVAR_TOOLCHANGER_9_POSITION 6201 +6
GVAR_TOOLCHANGER_10_POSITION 6211 +6
GVAR_TOOLCHANGER_11_POSITION 6221 +6
GVAR_TOOLCHANGER_12_POSITION 6231 +6
GVAR_TOOLCHANGER_13_POSITION 6241 +6
GVAR_TOOLCHANGER_14_POSITION 6251 +6
GVAR_TOOLCHANGER_15_POSITION 6261 +6
GVAR_TOOLCHANGER_16_POSITION 6271 +6
GVAR_TOOL_CHANGE_SPEED 6970
GVAR_TAGENTKNIFE_ANGLE 7001
GVAR_TAGENTKNIFE_POSITION
GVAR_FEEDRATE_UNIT 7003
GVAR_ROTATERATE_UNIT 7004
GVAR_TANGENTKNIFE_ENABLE 7005
GVAR_PLC_MOVE_PROCESS 7006
GVAR_THC_PWMSPEED 7009
GVAR_THC_ARC_VOLTAGE 7010
GVAR_THC_ARC_VOLTAGE_REF 7011
GVAR_THC_ARC_VOLTAGE_ADJ 7012
GVAR_SAFE_HEIGHT (GVAR_TOOL_LIFT) 7020 Height value for safe XY motion.
GVAR_CREEP_SPEED 7021 Safe speed while motion down to path position.
GVAR_FEED_SPEED 7030 Feed Speed +9
GVAR_FEED_SPEED_X 7030 Feed Speed_X
GVAR_RAPID_SPEED 7040 +9
GVAR_RAPID_SPEED_X 7041 Rapid Speed_X
GVAR_JOG_SPEED 7050 +9
GVAR_JOG_SPEED_X 7050 Jog Speed_X
GVAR_MARKING_SPEED 7060 +9
GVAR_JOG_STEP_UNLIMITED 7070 the value is “1” if Current Jog Mode is “Unlimited”, otherwize is “0” (integer)
GVAR_JOG_LOCKED 7071 the value is “1” if Jogging is Locked, otherwize is “0” (integer)
GVAR_MOTION_OVERSPEED 7072
GVAR_SPINDLE_OVERSPEED 7073
GVAR_JOG_OVERSPEED 7074
GVAR_PROBE_SENSOR_DIAMETER 7075
GVAR_PROBE_SENSOR_XOFFSET 7076
GVAR_PROBE_SENSOR_YOFFSET 7077
GVAR_MOTION_OVERSPEED_G0 7079
GVAR_PLC_MOVE_SPEED 7080
GVAR_PLC_MOVE_ACCELERATION 7081
GVAR_PLC_RESET_COORDINATES 7082
GVAR_CAMERA_READY 7090
GVAR_MULTIDEV_MASK 7100
GVAR_MULTIDEV_ENABLE1 7101
GVAR_MULTIDEV_ENABLE2 7102
GVAR_MULTIDEV_ENABLE3 7103
GVAR_MULTIDEV_ENABLE4 7104
GVAR_MULTIDEV_ENABLE5 7105
GVAR_MULTIDEV_ENABLE6 7106
GVAR_MULTIDEV_ENABLE7 7107
GVAR_MULTIDEV_ENABLE8 7108
GVAR_MULTIDEV_ENABLE9 7109
GVAR_MULTIDEV_ENABLE10 7110
GVAR_MULTIDEV_ENABLE11 7111
GVAR_MULTIDEV_ENABLE12 7112
GVAR_MULTIDEV_ENABLE13 7113
GVAR_MULTIDEV_ENABLE14 7114
GVAR_MULTIDEV_ENABLE15 7115
GVAR_MULTIDEV_ENABLE16 7116
GVAR_MULTIDEV_ENABLE32 7132 reserved up to 32 devices
GVAR_MD_MASTER_MOTION_CODE 7140 master
GVAR_M1_CONDITIONAL_STOP 7150
GVAR_LATHE_THREAD_PULLOUT 7154
GVAR_SPINDLE_ORIENTATION 7155
GVAR_PLASMA_PROCESS_CURRENT 7156
GVAR_ALIGN_CHECK 7170
GVAR_HW_INPUTS0 7180
GVAR_HW_INPUTS1 7181
GVAR_HW_INPUTS2 7182
GVAR_HW_INPUTS3 7183
GVAR_HW_OUTPUTS0 7184
GVAR_HW_OUTPUTS1 7185
GVAR_HW_OUTPUTS2 7186
GVAR_HW_OUTPUTS3 7187
GVAR_HW_INPUTS4 7188
GVAR_HW_INPUTS5 7189
GVAR_HW_INPUTS6 7190
GVAR_HW_INPUTS7 7191
GVAR_HW_OUTPUTS4 7192
GVAR_HW_OUTPUTS5 7193
GVAR_HW_OUTPUTS6 7194
GVAR_HW_OUTPUTS7 7195
GVAR_HW_ADC0 7196
GVAR_HW_ADC1 7197
GVAR_HW_ADC2 7198
GVAR_HW_ADC3 7199
GVAR_HW_ADC4 7200
GVAR_HW_ADC5 7201
GVAR_HW_ADC6 7202
GVAR_HW_ADC7 7203
GVAR_HW_INP_TCOUNT0 7206
GVAR_HW_INP_TCOUNT1 7207
GVAR_HW_INP_TCOUNT2 7208
GVAR_HW_INP_TCOUNT3 7209
GVAR_PARKING_LAST 7210
GVAR_RTCP_DEBUG_X 7211 RTCP correction data for X axis is stored in this register for debug purpose. This register is read-only
GVAR_RTCP_DEBUG_Y 7212 RTCP correction data for Y axis is stored in this register for debug purpose. This register is read-only
GVAR_RTCP_DEBUG_Z 7213 RTCP correction data for Z axis is stored in this register for debug purpose. This register is read-only
GVAR_RTCP_SHOULDER 7215 Shoulder Length (in units) for RTCP correction calculation.
GVAR_HEAD1_ENABLE 7221
GVAR_HEAD2_ENABLE 7222
GVAR_HEAD3_ENABLE 7223
GVAR_HEAD4_ENABLE 7224
GVAR_HCONTROL_VREF 7229
GVAR_PLC_USER_DATA 7230 (+32)
GVAR_PLC_USER_DATA_LAST 7261
GVAR_HW_DAC0 7270
GVAR_HW_DAC1 7271
GVAR_HW_DAC2 7272
GVAR_HW_DAC3 7273
GVAR_HW_DAC4 7274
GVAR_HW_DAC5 7275
GVAR_HW_DAC6 7276
GVAR_HW_DAC7 7277
GVAR_HW_PWM0 7278
GVAR_HW_PWM1 7279
GVAR_HW_PWM2 7280
GVAR_HW_PWM3 7281
GVAR_HW_PWM4 7282
GVAR_HW_PWM5 7283
GVAR_HW_PWM6 7284
GVAR_HW_PWM7 7285
GVAR_GOTO_PROGRAMMING 7290
GVAR_GOTO_POSITION 7291 +16
GVAR_REFERENCE_POSITION 7311 +16
GVAR_PRG_RECT_P 7330 +16
GVAR_PRG_RECT_M 7350 +16
GVAR_PLC_SPINDLE_STATE 7370
GVAR_PLC_SPINDLE_SPEED 7371
GVAR_PLC_COOLANT_STATE 7372
GVAR_PLC_MIST_STATE 7373
GVAR_JOG_STEP_SIZE 5522 prepresents current jog step size (double)
GVAR_JOG_STEP_0_0001 7381 the value is “1” if Current Jog Step Size is “0.0001”,
otherwize is “0” (integer)
GVAR_JOG_STEP_0_001 7382 the value is “1” if Current Jog Step Size is “0.001”,
otherwize is “0” (integer)
GVAR_JOG_STEP_0_01 7383 the value is “1” if Current Jog Step Size is “0.01”,
otherwize is “0” (integer)
GVAR_JOG_STEP_0_1 7384 the value is “1” if Current Jog Step Size is “0.1”,
otherwize is “0” (integer)
GVAR_JOG_STEP_1_0 7385 the value is “1” if Current Jog Step Size is “1.0”,
otherwize is “0” (integer)
GVAR_JOG_STEP_10 7386 the value is “1” if Current Jog Step Size is “10”,
otherwize is “0” (integer)
GVAR_SYSTEM_CONFIGURED 7390
GVAR_HOMING_X_RESET 7391
GVAR_HOMING_Y_RESET 7392
GVAR_HOMING_Z_RESET 7393
GVAR_HOMING_A_RESET 7394
GVAR_HOMING_B_RESET 7395
GVAR_HOMING_C_RESET 7396
GVAR_PRG_EXTREMA_P 7400 +16
GVAR_PRG_EXTREMA_M 7420 +16
GVAR_CURRENT_FEEDRATE 7440
GVAR_TUBE_DIAMETER 7450
GVAR_HT_CURRENT_SETPOINT
GVAR_PLASMA_PROCESS_CURRENT
GVAR_HT_PLASMA_PREFLOW 7461
GVAR_HT_PLASMA_CUTFLOW 7462
GVAR_HT_SHIELD_PREFLOW 7463
GVAR_HT_SHIELD_CUTFLOW 7464
GVAR_HT_PLASMA_GAS_TYPE 7465
GVAR_HT_SHIELD_GAS_TYPE 7466
GVAR_HT_GAS_MIXING_SETPOINT 7467
GVAR_HT_SYSTEM_ERROR 7468
GVAR_HT_SYSTEM_STATUS 7469
GVAR_HT_PUMP_CONTROL 7470
GVAR_HT_FIRMWARE_VERSION 7471
GVAR_HT_TEST_CUTFLOW_GASES 7472
GVAR_HT_TEST_PREFLOW_GASES 7473
GVAR_HT_LINE_VOLTAGE 7474
GVAR_HT_CHOPPER_CURRENT 7475
GVAR_HT_WORK_LEAD_CURRENT 7476
GVAR_HT_CHOPPER_TEMPERATURE 7477
GVAR_HT_TRANS_TEMPERATURE 7478
GVAR_HT_GAS_PRESSURE 7479
GVAR_HT_COOLANT_FLOW_RATE 7480
GVAR_HT_CURRENT_ACTUAL 7481
GVAR_OXYFUEL_PREHEAT_COUNTDOUN 7490
GVAR_OXYFUEL_PREHEAT_COUNTDOUN_V2 7491
GVAR_PROBE_SENSOR_CORRECTION_XMINUS 7501
GVAR_PROBE_SENSOR_CORRECTION_XPLUS 7502
GVAR_PROBE_SENSOR_CORRECTION_YMINUS 7503
GVAR_PROBE_SENSOR_CORRECTION_YPLUS 7504
GVAR_PROBE_SENSOR_CORRECTION_CENTERX 7505
GVAR_PROBE_SENSOR_CORRECTION_CENTERY 7506
GVAR_CUTTING_FROM_EDGE 7520
GVAR_MIST_PULSE_WIDTH 7521 NS-CNC Pulse Mist Mode
GVAR_MIST_PULSE_PAUSE 7522
GVAR_GANTRY_CORRECTION 7525
GVAR_DRAWING_FAST 7530
GVAR_SHOW2D_AXISA_RADIUS 7540
GVAR_ASSIGN_TOOL_OFFSET_X 7515
GVAR_ASSIGN_TOOL_OFFSET_Z 7517
GVAR_LATHE_TOOL_LENGTH_CORRECTION_X 7511
GVAR_LATHE_TOOL_LENGTH_CORRECTION_Z 7513
GVAR_LATHE_TOOL_OFFSET_CORRECTION_X 7514
GVAR_SAW_WIDTH 7550
GVAR_SAW_POSTION_START 7551
GVAR_SAW_POSTION_END 7552
GVAR_SAW_SLOT_L 7553
GVAR_SAW_SLOT_L1 7554
GVAR_SAW_GROOVE_L 7555
GVAR_SAW_GROOVE_T 7556
GVAR_SAW_Z_SAFE 7557
GVAR_SAW_Z_WORK 7558
GVAR_SAW_CUT_WIDTH 7559
GVAR_SAW_DIAMETER 7560
THC Control variables
THC #0
GVAR_THC0_CONTROL 7570 THC API
GVAR_THC0_INPUT 7571 THC API
GVAR_THC0_VREF 7572 THC API
GVAR_THC0_OFFSETZ 7573 THC API
GVAR_THC0_ENABLED 7574 THC API
THC #1
GVAR_THC1_CONTROL 7575 THC API
GVAR_THC1_INPUT 7576 THC API
GVAR_THC1_VREF 7577 THC API
GVAR_THC1_OFFSETZ 7578 THC API
GVAR_THC1_ENABLED 7579 THC API
THC #
GVAR_THC2_CONTROL 7580 THC API
GVAR_THC2_INPUT 7581 THC API
GVAR_THC2_VREF 7582 THC API
GVAR_THC2_OFFSETZ 7583 THC API
GVAR_THC2_ENABLED 7584 THC API
THC #3
GVAR_THC3_CONTROL 7585 THC API
GVAR_THC3_INPUT 7586 THC API
GVAR_THC3_VREF 7587 THC API
GVAR_THC3_OFFSETZ 7588 THC API
GVAR_THC3_ENABLED 7589 THC API
GVAR_KNIFE_FLAG 7587 PLC/Software controlled variable.
Tool change PLC procedure writes “1” to the register
when Tool number changed to Tangential Knife Tool,
otherwise writes “0”.
GVAR_ET5_ENCODER 9000 +16
GVAR_ET5_EXPOSITION 9016 +16
GVAR_ET5_ENCODER_Z 9032 +16
GVAR_ET5_ENCODER_WZ 9048 +16
GVAR_ENCODER_Z_EVENT 9070
GVAR_POPUP_MESSAGE 9100 +16
GVAR_SERVO_PID_ON 60000
GVAR_SERVO_PID_OFF 60001
Modbus devices API
GVAR_MODBUS_SET_ID 60010 Value written to this registed is used as Modbus ID of device to communicate with
GVAR_MODBUS_SET_PROTOCOL 60011 Writing to this register change Modbus protocol.
"0" - Modbus/RTU, 
"1" - Modbus/ASCII
GVAR_MODBUS_SET_SPEED 60012 Writing to this register will change RS485/Modbus speed. Available speeds are
1200, 2400, 4800, 
9600, 19200, 38400, 
57600, 115200
GVAR_MODBUS_SET_CONNECTION 60013 Change UART connection parameters: number of bits (8 or 7), parity (none, odd, even), number of stop bits (1, 2). Data comes in 3 low nibbles. The lowest is stop bits, then parity, then number of bits. Example:
0x801=8,N,1
0x712=7,O,2
0x822=8,E,2
GVAR_MODBUS_SET_VALUE 60019 Writing to register will latch the value in shadow register
GVAR_MODBUS_SET_ADDRESS 60020 Writing to register will latch Address to read in shadow register
GVAR_MODBUS_WRITE 60030 Writing to register will send value from shadow register to Modbus devive to address given in written value
GVAR_MODBUS_READ 60031 Read from this register will send read inquiry to Modbus device (PLC controller will be in till Regiter value received from Modbus device). Writing to this register will send ready inquiry to Modbus device. The value written is used as Register address to read

Global Variables Description

mycnc/global_variables.txt · Last modified: 2018/06/11 17:07 by skirillov