
B-63983EN/02 5.WINDOW FUNCTIONS
- 447 -
5.4.13 Writing a Custom Macro Variable (Low-speed Response)
[Description]
Data can be written in a custom macro variable in the CNC.
For details of common variables, refer to the Operator's manual of the
CNC.
[Input data structure]
Top address + 0
2
4
6
8
10
(Function code)
22
(Completion code)
−
(Need not be set)
(Data length)
L
(L: Byte length of custom
macro variable data)
(Data number)
N
(N = Custom macro variable number)
(Data attribute)
0
Custom macro variable data (4 bytes)
Mantissa (custom macro B)
Signed binary
(A negative value is represented in
2's complement.)
Value
Custom macro variable data (2 bytes)
Exponent (custom macro B):
The number of decimal digits
Signed binary
14
L = 6: Custom macro B
The mantissa of a floating-point
number is indicated in 4 bytes,
and the exponent is indicated in
2 bytes.
[Completion codes]
0: The custom macro variable has been written normally.
2: The specified data length is invalid because it is not 6.
3: A custom macro variable number that cannot be written as the data
number was specified.
6: The additional custom macro or common variable option has not
been provided.
7: The custom macro variable is write-protected.