EasyManua.ls Logo

Centroid M400 - Advanced Macro Statements

Centroid M400
302 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
M-Series Operator’s Manual 4/9/15 11-8
Index Description Returns R/W
27201-27208 ACDC drive estimated brake wattage for axes 1-8 R
27301-27308 Real motor encoder positions for axes 1-8
Motor encoder positions that accounts
for lash, MPG, and scale offsets.
(Note that these can be different from
what is displayed as Abs Pos in the
PID menu.)
R
27401-27408 Scale encoder positions for axes 1-8 R
29000-31999 User variables. These variables retain their values
until the CNC software is exited.
Floating point value R/W
50001-51312 PLC Inputs 1-1312 Jog Panel is on INP1057-1312 R
60001-61312 PLC Outputs 1-1312 Jog Panel is on OUT1057-1312 R
70001-71024 PLC Memory Bits 1-1024 R
80001-89999 Reserved R
90001-90064 Timer 1-64 status bits R
91001-91064 Reserved R
92001-92064 Reserved R
93001-93256 Stage 1-256 status bits R
94001-94256 Fast Stage 1-256 status bits R
95001-95256 Reserved R
96001-96044 W1-W44 (32-bit signed integers) R
97001-97022* DW1-DW22 (64-bit signed integers) R
98001-98044 FW1-FW44 (32-bit floats) R
99001-99022 DFW1-DFW22 (64-bit floats) R
* Since user or system variables are turned into (double) floating point values when referenced in an M- or
G-code program, the 64-bit integer values lose precision when they exceed 2
53
(9,007,199,254,740,992).
Examples:
#100 = #5041 ; set user variable #100 to the X axis current position
G90 X[#5041+1+7/32] ; move the X axis 1 7/32 units (1.2188) incrementally
#2501 = #5021 ; set WCS#1 X value to the current X position
#2703=[#2703+1/8] ; add 1/8 units (.125) to the WCS#3 Z value
; Subroutine parameter and local variable access.
G1 X#A Y#B Z#C F#F ; move to the coordinates passed as parameters
#[Q] = #F * .10 ; Assign local variable #Q to 10% of #F
#17 = #7 * .10 ; Same statement as previous using number references.
#[C] = 0.05 ; Reassign #C. (Value passed as parameter is lost.)
Advanced Macro Statements
NOTICE
Branching and conditional execution are extremely powerful tools that, combined with
access to system variables, allow you to do many things that would otherwise be
impossible. Nevertheless, using branching and conditional execution can introduce
undesirable and even unpredictable behavior into your programs. Undesirable effects
can occur simply by graphing a program. The least of these undesirable effects could be
entering an endless loop, failing to draw anything, or wiping out all the information in
your tool library or WCS settings. It is your responsibility to make sure that undesirable
things do not happen in your programs. You must monitor the job processing and search
modes in your program, if necessary, and take appropriate action. Until you are
confident of the actions of your program, you should step through it one block at a time
to confirm your program logic.

Table of Contents

Related product manuals