M_Macro Variable
M_Macro Variable
匯出日期:2021-08-05
修改日期:2021-05-31
机床产品/Machine Tool Products – Macro Variable.
Variable applied in MACRO can be separated into 3 categories, which are Local Variables (#1~#400), System
Variables (#1000~#31986) and Global Variables (@1~@165535). Rules of life cycle, reading, and writing are different
in each category, further details is given in chapters below.
– 2
机床产品/Machine Tool Products – Macro Variable.
1 Global Variables
Number Description R/W Rule Data Type
@0 VACANT R -
@60000~ Expansion global variables (go with No3813, only for CE R/W Double
@79999 system)
Remarks • Unless being power-off, all global variables have no life cycle limit.
• If @1~@400 needs to be remained after power-off, please goes with No3811.
• DOS only supports R0~R7999, please be extra careful when applying the corresponding
global variables.
• For register corresponding to @, the available range is as below:
• R50~R80, R101~R511, R1024~R4095, R5800~R7999, R10000~R10999,
R15000~R65535
Global Variables – 3
机床产品/Machine Tool Products – Macro Variable.
2 Local Variables
Number Descriptions R/W Rule Data Type
#0 VACANT R -
Remarks • The life cycle of local variables applied in MACRO is limited to the MACRO execution. After
execution is done, local variable returns to VACANT automatically.
• Subprogram can share local variables with main program, the life cycle of local variable also
ends when main program is completed.
• Please refer to "Argument Explanation for MACRO argument chart.
Local Variables – 4
机床产品/Machine Tool Products – Macro Variable.
3 System Variables
3.1 Modal Information in pre-interpreting(#1000~#1112)
Number Descriptions R/W Rule Data Type
System Variables – 5
机床产品/Machine Tool Products – Macro Variable.
System Variables – 6
机床产品/Machine Tool Products – Macro Variable.
System Variables – 7
机床产品/Machine Tool Products – Macro Variable.
#15 Quiet mode, system only records the program coordinate and does not organize the R/W Long
00 motion plan
0:OFF; 1:ON
#15 • Bit 0:Whether to run single-block execution control when PLC C40 is on R/W Long
02 0:run single-block execution (default), return to 0 after system Reset
1:don't run single block execution
• Bit1:Whether the system continue to run the following program before MST codes
are not finished (not provided for now)
0:wait (default), return to 0 after system Reset
1:don't wait, thus PLC S30(DEN) won't output
• If single block execution function is not enable, step function of simulation is not
supported.
#15 • Bit 1:Whether feedhold and axis/spindle override take effect R/W Long
04 0:Feedhold and axis/spindle ratio Override take effect (default value)
1:Feedhold invalid during machining, axis/spindle override is fixed to 100%.
• Bit 2:Whether feedhold takes effect
0:Feedhold takes effect during machining (default value) .
1:Feedhold during machining is invalid.
• Bit 3:Whether rapid moving ratio override take effect
0:Rapid moving ratio override takes effect during machining (default value)
1:Rapid moving ratio fixed to 100% during machining.
• Bit 4:Whether cutting ratio override take effect
0:Cutting ratio override takes effect during machining (default value)
1:Cutting ratio fixed to 100% during machining.
• Bit 5:Whether spindle ratio override take effect
0:Spindle ratio override takes effect during machining (default value)
1:Spindle ratio fixed to 100% during machining.
Note 1: #1504.2~#1504.5 is valid after version 10.114.51
Note 2: If #1504 bit1, bit2 on, Reset is invalid.
If #1504 bit1, bit3~bit5 on, the MPG simulation will be inactive when running the
corresponding motion.( all / rapid move / cutting / spindle ).
System Variables – 8
机床产品/Machine Tool Products – Macro Variable.
System Variables – 9
机床产品/Machine Tool Products – Macro Variable.
Other Reserved
s
Notifications:If this parameter is modified during machining, it takes effect when
interpreted-instructions before #1510 are all completed.
#16 Least Input Unit for Linear Axis, corresponds to Pr17 control precision(Least Input Unit, R Long
00 LIU)
#16 Least Input Unit for Rotary Axis, corresponds to Pr17 control precision(Least Input Unit, R Long
02 LIU)
System Variables – 10
机床产品/Machine Tool Products – Macro Variable.
System Variables – 11
机床产品/Machine Tool Products – Macro Variable.
#16 • bit 0:Is the skip source corresponding to G31 Skip Function triggered R Long
08 0:Not triggered
1:Already Triggered (after C62 ON, the axis starts decelerating to 0, and the 0th bit of
#1608 is 1 only when the axis completely decelerates to 0)
• bit 1~18:Is the skip source corresponding to each axis set by G31.10 triggered while
executing multi-axis multi-signal skip function? Bit 1~18 are corresponding to the 1st~
18th axis.
0:Not triggered
1:Already Triggered (after C62 ON, the axis starts decelerating to 0, and the bit value
of the corresponding axis is 1 only when the axis completely decelerates to 0)
Axis name(Pr321~) X Y Z1 Z2 Z3 Z4
bit 1 2 3 4 5 6
value 0 0 1 0 1 0
System Variables – 12
机床产品/Machine Tool Products – Macro Variable.
#16 Default workpiece coordinates number: G54: #1040=1; G55: #1040=2; G56: #1040=3… R/W Long
12
System Variables – 13
机床产品/Machine Tool Products – Macro Variable.
#13 Program coordinate of each axis at the end of the block R Dou
01~ (please note, if system reads #1301~#1308 immediately in the next line of G43, G44, G49, ble
G53, G54, G54 P_, G92.1, the program coordinate of last moving command block is
#13 obtained. It's suggested to apply #1341~#1358 or #1411~#1419 to get the current program
18 coordinate of each axis)
#13 Machine coordinate of each axis, which is not readable while moving. R Dou
21~ ble
#13
38
#13
58
#13 The program coordinate of each axis when the skip source corresponding to G31 or R Dou
61~ G31.10/G31.11 skip function is triggered. ble
For software versions 10.116.38M, 10.116.54K, 10.118.0F, 10.118.6 and after, the value is
#13
cleared to 0 if CNC just powered on, RESET, program ends, system executing G31, G31.11
78
or G28.1 again, to avoid showing the previous escape location before skip signal comes in
and causes misjudgment.
#13
98
#14
03
System Variables – 14
机床产品/Machine Tool Products – Macro Variable.
#14
06
#14 Workpiece coordinate of XYZABCUVW axes at the end of the block, the correspondence R Dou
11~ are: ble
1411(X); 1412(Y); 1413(Z)
#14 1414(A); 1415(B); 1416(C)
19 1417(U); 1418(V); 1419(W)
#14
38
#14 The machine coordinate of each axis when the skip source corresponding to G31 or R Dou
41~ G31.10/G31.11 skip function is triggered. ble
For software versions 10.116.38M, 10.116.54K, 10.118.0F, 10.118.6 and after, the value is
#14
cleared to 0 after CNC just powered on, RESET, program ends, system executing G31,
58
G31.11 or G28.1 again, to avoid showing the previous escape location before skip signal
comes in and causes misjudgment.
#14 Offset value of each axis when executing Enable Halted Point Return (Pr3852) R Dou
61~ ble
#14
78
#14 Position of rotary axes that can achieve tool alignment with tilted working plane. Units R Dou
81~ are IU. Relation to rotary axis is: ble
#14
1481(A axis); 1482(B axis); 1483(C axis)
83
Notice:
• If the tool alignment angle for corresponding axis direction is invalid, the # value will
return VACANT.
System Variables – 15
机床产品/Machine Tool Products – Macro Variable.
#1800 Tracking error of rigid tapping on rotary axis (milli degree) R Double
#1803 Maximum tracking error of 2nd rigid tapping on Z axis (μm) R Double
Valid version: 10.114.16~10.116.5
#1804 Maximum tracking error of 3rd rigid tapping on Z axis (μm) R Double
Valid version: 10.114.16~10.116.5
#1805 Maximum tracking error of 4th rigid tapping on Z axis (μm) R Double
Valid version: 10.114.16~10.116.5
#1806 Maximum tracking error of 5th rigid tapping on Z axis (μm) R Double
Valid version: 10.114.16~10.116.5
#1807 Maximum tracking error of 6th rigid tapping on Z axis (μm) R Double
Valid version: 10.114.16~10.116.5
#1810 Feedback pulse number of gap control from Z axis encoder R LONG
System Variables – 16
机床产品/Machine Tool Products – Macro Variable.
#1819 Path output mode. System organizes the motion plan and output the path to R/W LONG
Macro Stack (for G73), please execute WAIT() before using
0: disabled; 1: enabled
#1820 Mute mode. System organizes the motion plan without actual command output. R/W Double
Goes with G10 L1100.
0: disabled; 1: enabled
#1824 Valid cutting control mode, G61, G62, G63, G64 R Double
G04 4 G34 34
#1827 Valid workpiece coordinate number. G54: #1040=1; G55: #1040=2; G56: R Double
#1040=3…
System Variables – 17
机床产品/Machine Tool Products – Macro Variable.
#1828 Estimated machining error with current operating parameters (BLU, not R Double
displaying when Pr3808 is set to 0)
Valid version: before 10.116.54A (included)
#1830 The servo backward compensation function applied, each number represents: R Double
#1830 0 1 2 3 4 5
Note 1: Pn109 is the feedforward of Yaskawa drive, enabled when it's bigger
than 0.
Note 2: ZPEC and SPA won't be enabled at the same time.
Note 3: if #1830 = 3 or 5, it means 2 servo backward compensation functions are
enabled at the same time, it might lead to intense vibration of the machine.
Valid version: after 10.116.33 (included)
#1831 Machining spindle coupling mode, G51.2 , G113 , G114.1 , G114.3 R Double
System Variables – 18
机床产品/Machine Tool Products – Macro Variable.
#1856 Tapping Start Position ( point R level in absolute ). Reserved when restart, Unit : R/W Double
mm
#1857 Tapping Spindle CW / CCW Mode. Reserved when restart. R/W Long
0 : 未給定
3 : CW
4 : CCW
#1858 Tapping Spindle Speed. Reserved when restart, Unit : rev/min R/W Long
#1859 Tapping Axis Feedrate. Reserved when restart, Unit : mm/min R/W Double
System Variables – 19
机床产品/Machine Tool Products – Macro Variable.
#1901 G92, G92.1 coordinate system offset value of each axis R/W Double
~
#1918
#1941 3rd software positive stroke limit of each axis (IU) R/W Double
~
#1958
#1961 3rd software negative stroke limit of each axis (IU) R/W Double
~
#1978
System Variables – 20
机床产品/Machine Tool Products – Macro Variable.
#1080~ Modal variables for electric control personnel (disappear when R/W Double
#1099 system power off)
#2001~ Modal variables for system internal use (disappear when system R/W Double
#2100 reset)
#3001~ Modal variables for electric control personnel (disappear when R/W Double
#3100 system reset)
Remarks Life cycle of modal variables is not limited to a single MACRO. Thus, it can be used to access
variables between different MACROs.
#4001~ Customized parameters fro system internal use (parameter 4001~4100) R Double
#4100
Remarks
System Variables – 21
机床产品/Machine Tool Products – Macro Variable.
Pr3816 set 2
Multi-Axis Tool Table
Lathe Tool Table
System Variables – 22
机床产品/Machine Tool Products – Macro Variable.
… … ... … ... … … … …
System Variables – 23
机床产品/Machine Tool Products – Macro Variable.
Pr3816 set 3
Multi-Axis Tool Table
System Variables – 24
机床产品/Machine Tool Products – Macro Variable.
… ... ... … … … …
System Variables – 25
机床产品/Machine Tool Products – Macro Variable.
… … R/W Double
… … R/W Double
… … R/W Double
System Variables – 26
机床产品/Machine Tool Products – Macro Variable.
System Variables – 27