mycnc:global_variables
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
mycnc:global_variables [2019/10/15 11:15] – ivan | mycnc:global_variables [2023/12/07 10:01] – ivan | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Global Variables====== | ||
+ | |||
+ | ^ Related articles ^ | ||
+ | | [[plc: | ||
+ | | [[mycnc: | ||
+ | |||
+ | ----- | ||
+ | |||
^ Variable Name ^ Variable Address ^ Comments ^ | ^ Variable Name ^ Variable Address ^ Comments ^ | ||
- | |GVAR_MODAL_G0_G3 |4001 | Modal state of G00, G01, G02, G03, G33, G34 | | + | | GVARIABLE_USER_SPACE_START | 3500 | Custom user variables (also can use global variables below #2000). Read more in [[mycnc: |
- | |GVAR_MODAL_G96_G97 | + | | GVARIABLE_USER_SPACE_END | 3900 | | |
- | |GVAR_MODAL_G68_G69 | + | |GVAR_MODAL_G0_G3 |4001 | Modal state of G00, G01, G02, G03 - motion |
- | |GVAR_MODAL_G98_G99 | + | |GVAR_MODAL2_G17_G19 |
- | |GVAR_MODAL_G20_G21 | 4006 | Modal state of G20, G21 | | + | |GVAR_MODAL3_G90_G91 |
- | |GVAR_MODAL_G40_G42 | 4007 | Modal state of G40, G41, G42 | | + | |GVAR_MODAL5_G93_G94 |
- | |GVAR_MODAL_G25_G26 | + | |GVAR_MODAL_G20_G21 | 4006 | Modal state of G20, G21 - units | |
+ | |GVAR_MODAL_G40_G42 | 4007 | Modal state of G40, G41, G42 - cutter diameter | ||
+ | |GVAR_MODAL8_G43_G49 | ||
|GVAR_MODAL_G22_G23 | 4009 | Modal state of G22, G23 | | |GVAR_MODAL_G22_G23 | 4009 | Modal state of G22, G23 | | ||
- | |GVAR_MODAL_G80_G89 | + | |GVAR_MODAL10_G98_G99 |
- | |GVAR_MODAL_G66_G67 | + | |GVAR_MODAL12_G54_G59 |
|GVAR_MODAL_G54_G59 | 4014 | Modal state of G54-G59 | | |GVAR_MODAL_G54_G59 | 4014 | Modal state of G54-G59 | | ||
|GVAR_MODAL_G17_G19 | 4016 | Modal state of G17-G19 | | |GVAR_MODAL_G17_G19 | 4016 | Modal state of G17-G19 | | ||
Line 22: | Line 32: | ||
|GVAR_G38_PROBE_RESULT | 5070 | Stores the result of the probe coming into contact with a surface | | |GVAR_G38_PROBE_RESULT | 5070 | Stores the result of the probe coming into contact with a surface | | ||
^ | ^ | ||
- | |GVAR_OFFSET_G28 | 5161 | Machine coordinates for G28 Home Position \\ 5161 - G28 X Position \\ 5162 - G28 Y Position \\ 5163 - G28 Z Position \\ 5164 - G28 A Position \\ 5165 - G28 B Position \\ 5166 - G28 C Position \\ 5167 - G28 U Position \\ 5168 - G28 V Position \\ 5169 - G28 W Position | | + | | GVAR_SPEED_CURRENT_XYZ | 5110 | Current XYZ speed | |
+ | | GVAR_SPEED_CURRENT_ABC | 5111 | Current ABC speed | | ||
+ | | GVAR_OFFSET_G28 | 5161 | Machine coordinates for G28 Home Position \\ 5161 - G28 X Position \\ 5162 - G28 Y Position \\ 5163 - G28 Z Position \\ 5164 - G28 A Position \\ 5165 - G28 B Position \\ 5166 - G28 C Position \\ 5167 - G28 U Position \\ 5168 - G28 V Position \\ 5169 - G28 W Position | | ||
|GVAR_OFFSET_G30 | 5181 | Machine coordinates for G30 Home Position \\ 5181 - G30 X Position \\ 5182 - G30 Y Position \\ 5183 - G30 Z Position \\ 5184 - G30 A Position \\ 5185 - G30 B Position \\ 5186 - G30 C Position \\ 5187 - G30 U Position \\ 5188 - G30 V Position \\ 5189 - G30 W Position | | |GVAR_OFFSET_G30 | 5181 | Machine coordinates for G30 Home Position \\ 5181 - G30 X Position \\ 5182 - G30 Y Position \\ 5183 - G30 Z Position \\ 5184 - G30 A Position \\ 5185 - G30 B Position \\ 5186 - G30 C Position \\ 5187 - G30 U Position \\ 5188 - G30 V Position \\ 5189 - G30 W Position | | ||
|< | |< | ||
Line 69: | Line 81: | ||
| GVAR_JOG_STEP_FLOAT | 5523 | Obsolete global variable to set a float value for the jog step using the on-screen buttons. Has since been replaced, only used on old profile versions. | | | GVAR_JOG_STEP_FLOAT | 5523 | Obsolete global variable to set a float value for the jog step using the on-screen buttons. Has since been replaced, only used on old profile versions. | | ||
| GVAR_SPINDLE_SPEED | 5524 | Register represents given Spindle Speed. It's equal to " | | GVAR_SPINDLE_SPEED | 5524 | Register represents given Spindle Speed. It's equal to " | ||
- | | [[mycnc: | + | | [[mycnc: |
| GVAR_M30_SCHEDULED_REWIND | 5526 | The scheduled rewind allows the user to move back to the beginning of the program after the program run has completed. After moving back to the beginning, this variable is set to 0, so the M30 command needs to be added to the file every time the rewind is required (not on by default) | | | GVAR_M30_SCHEDULED_REWIND | 5526 | The scheduled rewind allows the user to move back to the beginning of the program after the program run has completed. After moving back to the beginning, this variable is set to 0, so the M30 command needs to be added to the file every time the rewind is required (not on by default) | | ||
| GVAR_SHOW_NCMESSAGE | 5527 | Reserved for future development to be able to display a line of text from the G-code file | | | GVAR_SHOW_NCMESSAGE | 5527 | Reserved for future development to be able to display a line of text from the G-code file | | ||
Line 75: | Line 87: | ||
| GVAR_SHOCK_SENSOR_IGNORE | 5529 | Ignores shock sensor data (useful when utilizing the sensors for procedures other than shock information gathering) | | | GVAR_SHOCK_SENSOR_IGNORE | 5529 | Ignores shock sensor data (useful when utilizing the sensors for procedures other than shock information gathering) | | ||
| GVAR_STEP_PER_UNIT | 5530 | (+6) Specifies the steps per unit value | | | GVAR_STEP_PER_UNIT | 5530 | (+6) Specifies the steps per unit value | | ||
+ | | GVAR_SET_PLC_MOVE_VERSION | 5539 | A new version of g0moveA, calculated entirely inside the controller, saving the pause time that would otherwise be present for the command to be processed software-side | | ||
| < | | < | ||
| < | | < | ||
Line 109: | Line 122: | ||
| GVAR_MODE_SINGLE_BLOCK | 5720 | Writing " | | GVAR_MODE_SINGLE_BLOCK | 5720 | Writing " | ||
| GVAR_POSITION_LOG_DATA | 5730 | Height map logging. If Logging is stopped, writing to this register does not have an effect. If the Logging is started, writing any value to this register will add current position to the Log data array. Beside of storing into the Log Array, the Log position is stored into Global Variables 5731-5736 as well (5731 - X, 5732 - Y, 5733 - Z, 5734 - A, 5735 - B, 5736 - C) | | | GVAR_POSITION_LOG_DATA | 5730 | Height map logging. If Logging is stopped, writing to this register does not have an effect. If the Logging is started, writing any value to this register will add current position to the Log data array. Beside of storing into the Log Array, the Log position is stored into Global Variables 5731-5736 as well (5731 - X, 5732 - Y, 5733 - Z, 5734 - A, 5735 - B, 5736 - C) | | ||
- | | GVAR_POSITION_LOG_CMD | 5740 | Begin/Eng Height Map Log. Writing “1” to this register will start logging. Writing “0” to this register will stop logging and save the data which will be stored in a log file with a given filename and time stamp. Writing " | + | | GVAR_POSITION_LOG_CMD | 5740 | Begin/Eng Height Map Log. Writing “1” to this register will start logging. Writing “0” to this register will stop logging and save the data which will be stored in a log file with a given filename and time stamp. Writing " |
| GVAR_POSITION_STORED | 5900 | This register stores the flag (0 or 1) for whether the current position has been saved in flash memory. This is done every few seconds after the movement has been stopped in order to conserve the number of write operations onto flash memory. The variable flag visualization can be seen in the Diagnostics window in the bottom-right corner next to the stop button (grey for not saved - 0, red for saved - 1) | | | GVAR_POSITION_STORED | 5900 | This register stores the flag (0 or 1) for whether the current position has been saved in flash memory. This is done every few seconds after the movement has been stopped in order to conserve the number of write operations onto flash memory. The variable flag visualization can be seen in the Diagnostics window in the bottom-right corner next to the stop button (grey for not saved - 0, red for saved - 1) | | ||
| GVAR_CURRENT_MOTION_CODE | 6060 | Specifies the current motion code (useful to wait until motion has finished, for example). | | | GVAR_CURRENT_MOTION_CODE | 6060 | Specifies the current motion code (useful to wait until motion has finished, for example). | | ||
Line 126: | Line 139: | ||
| GVAR_TOOLCHANGER_POSITION | 6101 | Specifies the tool changer position on the machine (+8 axes) | | | GVAR_TOOLCHANGER_POSITION | 6101 | Specifies the tool changer position on the machine (+8 axes) | | ||
| GVAR_TOOLCHANGER_NEXT_POSITION | 6111 | +6 | | | GVAR_TOOLCHANGER_NEXT_POSITION | 6111 | +6 | | ||
+ | | GVAR_TOOLPOT_01_TIME | 6120 | Current work time, in s, for tool pot 1 (+10 for every subsequent pot) | | ||
| GVAR_TOOLPOT_1_POSITION | 6121 | +6. Registers 6121-6271 specify the positions for the tool pots | | | GVAR_TOOLPOT_1_POSITION | 6121 | +6. Registers 6121-6271 specify the positions for the tool pots | | ||
| GVAR_TOOLPOT_2_POSITION | 6131 | +6 | | | GVAR_TOOLPOT_2_POSITION | 6131 | +6 | | ||
Line 170: | Line 184: | ||
| GVAR_MOTION_OVERSPEED | 7072 | Register represents Motion Overrate percentage. | | GVAR_MOTION_OVERSPEED | 7072 | Register represents Motion Overrate percentage. | ||
| GVAR_SPINDLE_OVERSPEED | 7073 | Register represents Spindle Overrate percentage. \\ Actual Spindle speed will be \\ Actual_Speed=Default_Speed * Spindle_Overspeed/ | | GVAR_SPINDLE_OVERSPEED | 7073 | Register represents Spindle Overrate percentage. \\ Actual Spindle speed will be \\ Actual_Speed=Default_Speed * Spindle_Overspeed/ | ||
- | | GVAR_JOG_OVERSPEED | 7074 | The jog overspeed value is directly edited through this global variable | | + | | GVAR_JOG_OVERSPEED | 7074 | The jog overspeed value is directly edited through this global variable |
| GVAR_PROBE_SENSOR_DIAMETER | 7075 | Specifies the probe sensor diameter in mm | | | GVAR_PROBE_SENSOR_DIAMETER | 7075 | Specifies the probe sensor diameter in mm | | ||
| GVAR_PROBE_SENSOR_XOFFSET | 7076 | X-axis offset for the probe sensor in millimeters | | | GVAR_PROBE_SENSOR_XOFFSET | 7076 | X-axis offset for the probe sensor in millimeters | | ||
Line 188: | Line 202: | ||
| GVAR_PLASMA_PROCESS_CURRENT | 7156 | The value for plasma current is stored in this register | | | GVAR_PLASMA_PROCESS_CURRENT | 7156 | The value for plasma current is stored in this register | | ||
| GVAR_ALIGN_CHECK | 7170 | Reserved for future development regarding the gantry alignment procedure | | | GVAR_ALIGN_CHECK | 7170 | Reserved for future development regarding the gantry alignment procedure | | ||
- | | GVAR_HW_INPUTS0 | 7180 | Stores the input value in 32 bit increments. In this way, Input0 is 0-31, Input1 is 32-63, etc | | + | | GVAR_HW_INPUTS0 | 7180 | Stores the input value in 32 bit increments. In this way, Input0 is 31-0, Input1 is 63-32, etc. More here: [[mycnc: |
| GVAR_HW_INPUTS1 | 7181 | | | | GVAR_HW_INPUTS1 | 7181 | | | ||
| GVAR_HW_INPUTS2 | 7182 | | | | GVAR_HW_INPUTS2 | 7182 | | | ||
| GVAR_HW_INPUTS3 | 7183 | | | | GVAR_HW_INPUTS3 | 7183 | | | ||
- | | GVAR_HW_OUTPUTS0 | 7184 | Stores the output value (can be both read and written to) | | + | | GVAR_HW_OUTPUTS0 | 7184 | Stores the output value (can be both read and written to) similar to input values 7180-7183. more here: [[mycnc: |
| GVAR_HW_OUTPUTS1 | 7185 | Stores the output value (can be both read and written to) | | | GVAR_HW_OUTPUTS1 | 7185 | Stores the output value (can be both read and written to) | | ||
| GVAR_HW_OUTPUTS2 | 7186 | Stores the output value (can be both read and written to) | | | GVAR_HW_OUTPUTS2 | 7186 | Stores the output value (can be both read and written to) | | ||
Line 257: | Line 271: | ||
| GVAR_JOG_STEP_1_0 | 7385 | the value is " | | GVAR_JOG_STEP_1_0 | 7385 | the value is " | ||
| GVAR_JOG_STEP_10 | 7386 | the value is " | | GVAR_JOG_STEP_10 | 7386 | the value is " | ||
+ | | GVAR_JOG_SHIFT_STATE | 7388 | Writing " | ||
+ | | GVAR_JOG_CTRL_STATE | 7389 | Writing " | ||
| GVAR_SYSTEM_CONFIGURED | 7390 | Specifies that homing has been performed for all axes and that the system is configured and ready to use | | | GVAR_SYSTEM_CONFIGURED | 7390 | Specifies that homing has been performed for all axes and that the system is configured and ready to use | | ||
| GVAR_HOMING_X_RESET | 7391 | The register value is used as a flag that Homing X needed. \\ The value is automatically set to " | | GVAR_HOMING_X_RESET | 7391 | The register value is used as a flag that Homing X needed. \\ The value is automatically set to " | ||
Line 305: | Line 321: | ||
| GVAR_SHOW2D_AXISA_RADIUS | 7540 | Used on certain tube-cutting machine setups to unfold the a-axis for easier visualization. The radius of the tube is set in this register. This should only be used if the user does not want the 4-axis visualization | | | GVAR_SHOW2D_AXISA_RADIUS | 7540 | Used on certain tube-cutting machine setups to unfold the a-axis for easier visualization. The radius of the tube is set in this register. This should only be used if the user does not want the 4-axis visualization | | ||
| GVAR_ASSIGN_TOOL_OFFSET_X | 7515 | This register specifies the x-axis tool offset | | | GVAR_ASSIGN_TOOL_OFFSET_X | 7515 | This register specifies the x-axis tool offset | | ||
- | | GVAR_ASSIGN_TOOL_OFFSET_Z | 7517 | This register specifies the z-axis tool offset| | + | | GVAR_ASSIGN_TOOL_OFFSET_Z |
| GVAR_LATHE_TOOL_LENGTH_CORRECTION_X | 7511 | Specifies the x-axis tool length correction for lathes | | | GVAR_LATHE_TOOL_LENGTH_CORRECTION_X | 7511 | Specifies the x-axis tool length correction for lathes | | ||
| GVAR_LATHE_TOOL_LENGTH_CORRECTION_Z | 7513 | Specifies the y-axis tool length correction for lathes | | | GVAR_LATHE_TOOL_LENGTH_CORRECTION_Z | 7513 | Specifies the y-axis tool length correction for lathes | | ||
Line 354: | Line 370: | ||
| GVAR_CUTPROCESS_TIME_SOFT_OXY_START | 7604 | Cutchart - time value for the oxyfuel cutting start | | | GVAR_CUTPROCESS_TIME_SOFT_OXY_START | 7604 | Cutchart - time value for the oxyfuel cutting start | | ||
| GVAR_CUTPROCESS_CUTSPEED | 7605 | Specifies the cutting speed | | | GVAR_CUTPROCESS_CUTSPEED | 7605 | Specifies the cutting speed | | ||
+ | | GVAR_CUTPROCESS_CUTSPEED_LOW | 7606 | Low cutting speed for arcs/holes | | ||
+ | | GVAR_CUTPROCESS_CUTSPEED_LOW_P | ||
^ Oxy Fuel cutting, Automatic Gas Console ^^^ | ^ Oxy Fuel cutting, Automatic Gas Console ^^^ | ||
| GVAR_CUTPROCESS_AGC_IGNITION_FUEL | 7610 | Automatic gas console ignition fuel variable | | | GVAR_CUTPROCESS_AGC_IGNITION_FUEL | 7610 | Automatic gas console ignition fuel variable | | ||
Line 412: | Line 430: | ||
| GVAR_CUTPROCESS_TECHNOLOGY | 7686 | Denotes the technology for the cutting process. | | GVAR_CUTPROCESS_TECHNOLOGY | 7686 | Denotes the technology for the cutting process. | ||
| GVAR_CUTPROCESS_REVISION | 7687 | The cutchart version used (reserved for Hypertherm machines) | | | GVAR_CUTPROCESS_REVISION | 7687 | The cutchart version used (reserved for Hypertherm machines) | | ||
+ | | GVAR_CUTCHART_FEEDRATE_PRIORITY | 7696 | Indicates feedrate priority between cutcharts and F-codes in the program. More info here: [[mycnc: | ||
+ | | | 8045 | Sensing speed low | | ||
+ | | | 8046 | Distance sensing speed low | | ||
+ | | | 8048 | IHC Stage | | ||
^ Timers ^^^ | ^ Timers ^^^ | ||
| GVAR_TIMER0_ENABLED | 8100 | Writing " | | GVAR_TIMER0_ENABLED | 8100 | Writing " | ||
Line 429: | Line 451: | ||
| GVAR_TIMER3_PULSE | 8114 | A value written to this register specifies the Timer 3 Pulse width in milliseconds | | | GVAR_TIMER3_PULSE | 8114 | A value written to this register specifies the Timer 3 Pulse width in milliseconds | | ||
| GVAR_TIMER3_PAUSE | 8115 | A value written to this register specifies the Timer 3 Pause in milliseconds | | | GVAR_TIMER3_PAUSE | 8115 | A value written to this register specifies the Timer 3 Pause in milliseconds | | ||
+ | | | 8119 | A value for setting up the PWM frequency to control modulation | | ||
| GVAR_GENERATOR_FRQ_RATIO | 8132 | Ratio for the step-dir coolant control to convert the step motor values into the software units. Set experimentally. | | | GVAR_GENERATOR_FRQ_RATIO | 8132 | Ratio for the step-dir coolant control to convert the step motor values into the software units. Set experimentally. | | ||
| GVAR_GENERATOR_FRQ | 8133 | Rate, in ml/hour, for the step-dir coolant control | | | GVAR_GENERATOR_FRQ | 8133 | Rate, in ml/hour, for the step-dir coolant control | | ||
Line 438: | Line 461: | ||
| GVAR_CURRENT_XWORK_POSITION | 8231 | (+8) Stores the current work position for the 8 axes | | | GVAR_CURRENT_XWORK_POSITION | 8231 | (+8) Stores the current work position for the 8 axes | | ||
| GVAR_CURRENT_XMACHINE_CORRECTION | 8241 | (+8) Stores the current machine correction for the 8 axes| | | GVAR_CURRENT_XMACHINE_CORRECTION | 8241 | (+8) Stores the current machine correction for the 8 axes| | ||
+ | ^ Laser Cutting ^^^ | ||
+ | | GVAR_LASER_PRESET_SELECT | ||
+ | | GVAR_LASER_PRESET_SAVE | 8471 | Save the current parameters as a cutting preset for the specified number | ||
+ | ^ PLC Move (Positioning/ | ||
+ | | GVAR_G0PLUS_SPEED | 8330 | Set motion speed for AxisPlus PLC move commands in pulses/ | ||
+ | | GVAR_G0PLUS_TIME | 8331 | Set motion acceleration time for AxisPlus PLC move commands in milliseconds (0.001 sec) | | ||
+ | | GVAR_G0PLUS_STATE | 8332 | If reading this register returns a zero, this indicates that the AxisPlus is not active/ | ||
+ | | GVAR_AXPLUS_JOG | 8340 | [[mycnc: | ||
+ | | GVAR_AXPLUS_MSPEED | 8341 | Set Jog speed for AxisPlus PLC move commands | ||
+ | | GVAR_AXPLUS_MACCEL | 8342 | Set Jog acceleration for AxisPlus PLC move commands | ||
+ | | GVAR_FOCUS_STEP_PER_UNIT | 8491 | Step per unit value for the independent Focus axis | | ||
+ | | GVAR_FOCUS_G0_SPEED | 8492 | Focus axis - G0 speed | | ||
+ | | GVAR_FOCUS_G0_TIME | 8493 | [[mycnc: | ||
+ | | GVAR_FOCUS_MSPEED | 8494 | | | ||
+ | | GVAR_FOCUS_MTIME | 8495 | | | ||
+ | | GVAR_FOCUS_SOFTMINUS | 8496 | | | ||
+ | | GVAR_FOCUS_SOFTPLUS | 8497 | | | ||
+ | | GVAR_FOCUS_JOG | 8498 | | | ||
+ | | GVAR_FOCUS_G0_STATE | 8499 | | | ||
+ | | GVAR_FOCUS_SET_ZERO | 8502 | Set zero for the focus axis | | ||
+ | | GVAR_FOCUS_SET_MAX_POS | 8503 | Set maximum position for the focus axis | | ||
+ | | GVAR_FOCUS_SET_MIN_POS | 8504 | Set minimum position for the focus axis | | ||
+ | | GVAR_FOCUS_HARDLIMITS | 8505 | Set hardware limit port number for focus axis | | ||
+ | | GVAR_AXPLUS_STEP_PER_UNIT | 8511 | [[mycnc: | ||
+ | | GVAR_AXPLUS_POSITION | 8514 | [[mycnc: | ||
+ | | GVAR_FOCUS_POSITION | 8515 | [[mycnc: | ||
+ | | GVAR_AXPLUS_LIFT | 8516 | | | ||
+ | | GVAR_FOCUS_LIFT | 8517 | | | ||
+ | | GVAR_AXPLUS_STOP | 8518 | | | ||
+ | | GVAR_FOCUS_STOP | 8519 | | | ||
+ | | GVAR_AXPLUS_SET_ZERO | 8522 | Writing 999999 to this register will reset the soft limits. Otherwise this allows to set a coordinate to a given value (in units of 1000 >1.000). Article: [[mycnc: | ||
+ | | GVAR_AXPLUS_SET_MAX_POS | 8523 | If the value of this register is equal to zero, then current position is taken as the maximum position for the axis | | ||
+ | | GVAR_AXPLUS_SET_MIN_POS | 8524 | If the value of this register is equal to zero, then current position is taken as the minimum position for the axis | | ||
+ | | GVAR_AXPLUS_HARDLIMITS | 8525 | | | ||
+ | | GVAR_G0PLC_SPEED | 8630 | Set motion speed for PLC move commands in pulses/ | ||
+ | | GVAR_G0PLC_TIME | 8631 | Set motion acceleration time for PLC move commands in milliseconds (0.001 sec) | | ||
+ | | GVAR_G0PLC_SPEED_UNITS | 8632 | Set motion speed for PLC move commands in units/ | ||
+ | | GVAR_PLC_JOGSPEED_UNITS | 8634 | Set motion speed for jog in units/min | | ||
+ | | GVAR_PLC_JOG | 8635 | | ||
^ Encoders ^^^ | ^ Encoders ^^^ | ||
| GVAR_ET5_ENCODER | 9000 | (+16) Registers represent Encoder values. Writing to this registers does not affect anything. Selected channel Current Encoder value will be returned when reading these registers. \\ Reading these registers from the controller Hardware PLC will return actual Encoder value. \\ Encoder values in the software are updated about every 128ms. This delay should be counted when using Encoder values from the Software PLC. \\ 9000 - Encoder #0 value \\ 9001 - Encoder #1 value \\ 9002 - Encoder #2 value \\ 9003 - Encoder #3 value \\ 9004 - Encoder #4 value \\ 9005 - Encoder #5 value \\ 9006 - Encoder #6 value \\ 9007 - Encoder #7 value | | | GVAR_ET5_ENCODER | 9000 | (+16) Registers represent Encoder values. Writing to this registers does not affect anything. Selected channel Current Encoder value will be returned when reading these registers. \\ Reading these registers from the controller Hardware PLC will return actual Encoder value. \\ Encoder values in the software are updated about every 128ms. This delay should be counted when using Encoder values from the Software PLC. \\ 9000 - Encoder #0 value \\ 9001 - Encoder #1 value \\ 9002 - Encoder #2 value \\ 9003 - Encoder #3 value \\ 9004 - Encoder #4 value \\ 9005 - Encoder #5 value \\ 9006 - Encoder #6 value \\ 9007 - Encoder #7 value | | ||
Line 447: | Line 509: | ||
| | 9200 | +16. Reserved to display the encoder position on an infinite scale (no value turnover on every full encoder turn, instead the value will keep climbing indefinitely into the positives/ | | | 9200 | +16. Reserved to display the encoder position on an infinite scale (no value turnover on every full encoder turn, instead the value will keep climbing indefinitely into the positives/ | ||
| | 9216 | +16. Reserved to display the encoder position on an infinite scale WITH the current encoder dimension (to indicate the current encoder position) | | | | 9216 | +16. Reserved to display the encoder position on an infinite scale WITH the current encoder dimension (to indicate the current encoder position) | | ||
+ | | GVAR_SENSORS_ERROR | 9299 | Indicates whether any alarm has been triggered (by writing 0 or 1 into the global variable) | | ||
+ | | GVAR_SENSOR0_ERROR | 9300 | +63. Indicates whether a particular alarm sensor has been triggered. The following alarm numbers are currently available: \\ XPlus - 0 \\ XMinus - 1 \\ YPlus - 2 \\ YMinus - 3 \\ ZPlus - 4 \\ ZMinus - 5 \\ Shock - 6 \\ XNotReady - 7 \\ X2NotReady - 8 \\ YNotReady - 9 \\ ZNotReady - 10 \\ ANotReady - 11 \\ BNotReady - 12 \\ CNotReady - 13 \\ Coolant - 14 \\ Air - 15 \\ Oxygen - 16 \\ Emergency - 17 \\ Emergency2 - 18 \\ Gas - 19 \\ MyCNC_NotPresent - 20 \\ SafetySwitch - 21 \\ MotorShort - 22 \\ Spindle - 23 \\ Y2NotReady - 24 \\ APlus - 25 \\ AMinus - 26 \\ BPlus - 27 \\ BMinus - 28 \\ CPlus - 29 \\ CMinus - 30 \\ ServoAlarm - 31 \\ MyHead_NotPresent - 32 \\ ServoErrorX - 33 \\ ServoErrorY - 34 \\ ServoErrorZ - 35 \\ ServoErrorA - 36 \\ ServoErrorB - 37 \\ ServoErrorC - 38 \\ ServoErrorPlus - 39 | | ||
+ | | GVAR_SELECTED_TOOL_ID | 9630 | Experimental - Current tool ID | | ||
+ | | GVAR_SELECTED_TOOL_NAME | 9631 | Current tool name | | ||
+ | | GVAR_SELECTED_TOOL_MATERIAL | 9632 | Experimental | | ||
+ | | GVAR_SELECTED_TOOL_DIAMETER | 9633 | Experimental | | ||
+ | | GVAR_SELECTED_TOOL_PROGRESS | 9635 | Experimental | | ||
+ | | GVAR_SELECTED_TOOL_WORK_TIME | 9636 | Experimental - tool work time (from ATC pots config dialog) | | ||
+ | | GVAR_SELECTED_TOOL_NUMBER | 9637 | Experimental - current tool # | | ||
+ | | GVAR_SELECTED_TOOL_POT | 9638 | Experimental | | ||
+ | | GVAR_SET_MPOSITION | 9701 | +20. Writing to this global variable from PLC sets machine position for the coordinates X,Y,Z,etc. | | ||
+ | | GVAR_SET_WPOSITION | 9721 | +20. Writing to this global variable from PLC sets the work (program) position for the coordinates X,Y,Z,etc. | | ||
+ | | | 9795 | Independent axis - THC low speed percentage | | ||
+ | | | 9796 | Independent axis - THC OFF arc radius | | ||
+ | | | 9797 | Independent axis - THC max speed | | ||
+ | | | 20000 | +100. Debug information will be displayed in the log when a value is written to one of these variables. More info here: [[mycnc: | ||
| GVAR_SERVO_PID_ON | 60000 | Denotes that the servo PID is ON | | | GVAR_SERVO_PID_ON | 60000 | Denotes that the servo PID is ON | | ||
| GVAR_SERVO_PID_OFF | 60001 | Denotes that the servo PID is OFF | | | GVAR_SERVO_PID_OFF | 60001 | Denotes that the servo PID is OFF | | ||
Line 469: | Line 547: | ||
| GVAR_MODBUS_READ_INPUTS | 60039 | **Read multiple coils**. This will request the address of the first coil to read and the number of coils to read. The Modbus device will respond with the number of bytes to follow and the coil input values | | GVAR_MODBUS_READ_INPUTS | 60039 | **Read multiple coils**. This will request the address of the first coil to read and the number of coils to read. The Modbus device will respond with the number of bytes to follow and the coil input values | ||
| GVAR_MODBUS_INPUT_REGS0 | 60060 | Input register 0 (+31) | | | GVAR_MODBUS_INPUT_REGS0 | 60060 | Input register 0 (+31) | | ||
+ | ^ Other ^^^ | ||
+ | | GVAR_EXT_SHOW_WIDGET | [[mycnc: | ||
+ | | GVAR_EXT_HIDE_WIDGET | 64201 | Hide a widget by writing an ID number (specified in the XML files as id=" | ||
+ | ^ Software PLC exclusive variables ^^^ | ||
+ | | GVAR_EXT_REFRESH_NC | 100001 | Refresh nc program | | ||
+ | | GVAR_EXT_PLAYER_PLAY | 100002 | Play | | ||
+ | | GVAR_EXT_RESET_NC | 100003 | Reset nc program | | ||
+ | | GVAR_EXT_RUN_CODE | 100010 | Run G-code (for example, gvarset(100010, | ||
+ | | GVAR_EXT_PENDANT_MOVEX | 100020 | Move X axis by specified distance | | ||
+ | | GVAR_EXT_PENDANT_MOVEY | 100021 | | | ||
+ | | GVAR_EXT_PENDANT_MOVEZ | 100022 | | | ||
+ | | GVAR_EXT_PENDANT_MOVEA | 100023 | | | ||
+ | | GVAR_EXT_PENDANT_MOVEB | 100024 | | | ||
+ | | GVAR_EXT_PENDANT_MOVEC | 100025 | | | ||
+ | | GVAR_EXT_PENDANT_MOVEU | 100026 | | | ||
+ | | GVAR_EXT_PENDANT_MOVEV | 100027 | | | ||
+ | | GVAR_EXT_DIRECT_PLC | 100040 | Run a Hardware PLC from Software PLC | | ||
+ | | GVAR_EXT_DIRECT_PLC_PARAM | 100041 | Allows to send a Param variable to the Hardware PLC | | ||
+ | | GVAR_EXT_SET_MACHINE_X | 100050 | Set machine coordinate from Software PLC | | ||
+ | | GVAR_EXT_SET_MACHINE_Y | 100051 | | | ||
+ | | GVAR_EXT_SET_MACHINE_Z | 100052 | | | ||
+ | | GVAR_EXT_SET_MACHINE_A | 100053 | | | ||
+ | | GVAR_EXT_SET_MACHINE_B | 100054 | | | ||
+ | | GVAR_EXT_SET_MACHINE_C | 100055 | | | ||
+ | | GVAR_EXT_SET_MACHINE_U | 100056 | | | ||
+ | | GVAR_EXT_SET_MACHINE_V | 100057 | | | ||
[[mycnc:: | [[mycnc:: | ||
mycnc/global_variables.txt · Last modified: 2024/05/13 15:45 by ivan