User Tools

Site Tools


No renderer 'odt' found for mode 'odt'
mycnc:global_variables_description

This is an old revision of the document!


Global Variables Description

A global variable is a variable which is used by the myCNC application to store some information about a particular process, flag or setting. A full list of global variables is available here.

The values stored in these global variables are defined in the myCNC profile that is being used, within the cnc-variables.xml file. This file contains a list of CNC and global variables that the program utilizes, as well as their values and minimum/maximum possible values.

These min/max values are useful to set up once during the machine setup to provide realistic bounds for the range of a certain global variable.

The syntax then is the following:

<value name="motion-acceleration-z" min="1" max="20000" step="50">1000</value>

where:

  • name is the variable name
  • min and max represent the bounds of the range
  • step represents the step value for when the variable value is increased or decreased (useful for on-screen buttons)
  • in this example, 1000 represents the current value of the aforementioned variable

List of global variables

5521

Writing “1” to register #5521 turn off Hardware Limit Sensors control temporarily. For example, it can be used if Home sensor is used as limit sensor as well. In this case Hardware Limits control should be disabled temporarily during Homing procedure to not abort Homing when LImit sensor triggered. At the end of Homing procedure Hardware Limits control should be enabled again, however it will be made automatically after procedure running finished.

Writing Constant value to Register can be made with G10 L80 code. Example -

G10 L80 P5521 Q1 (Write 1 to #5521)

5525

Writing “1” to register #5525 turn off Software Limits control temporarily. For example, it can be used for Homing procedure when Machine position is not yet defined or for Auto Tool change procedure if Tool Changer position is situated outside of working area. Software Limits control can be enabled by resetting the register (writing “0”). The register will be reset automatically when g-code running finished.

Writing Constant value to Register can be made with G10 L80 code. Example -

G10 L80 P5525 Q0 (Write 0 to #5525)

60010

Value written to this registed is used as Modbus ID of device to communicate with

60011

Writing to this register change Modbus protocol.

"0" - Modbus/RTU, 
"1" - Modbus/ASCII

60012

Writing to this register will change RS485/Modbus speed. Available speeds are

1200, 2400, 4800, 
9600, 19200, 38400, 
57600, 115200

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

60019

Writing to register will latch the value in shadow register. Value from shadow register will be used on write operation

60020

Writing to register will latch Address to read in shadow register

60030

Writing to register will send value from shadow register to Modbus devive to address given in written value

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 Table

mycnc/global_variables_description.1585244487.txt.gz · Last modified: 2020/03/26 13:41 by ivan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki