
[Description]
Reads the custom macro variable data stored in the CNC.
This function is used for controlling flow of the machining program of
CNC by the application program exchanging data between the custom
macro program in CNC and the application program, etc.
Types of custom macro variable are as follows.
(1) Local variables ( #1,..,#33 )
Readable. The local variables which belong to the macro program just
being executed when the application program calls this function are
read.
(2) Common variables ( #100,..,#149, #500,..,#531 )
Readable. In case that Custom macro common variable 900 sets option is
added, #100,..,#199 and #500,..,#999 are available to be read.
(3) System variables ( #1000,.. )
Readable.
Refer "USER'S MANUAL" of CNC for details of custom macro variables.
Specify the custom macro variable number to be read in "number" with
binary format.
The variable data is stored in both "buf.mcr_val" and "buf.dec_val".
mcr_val 4-byte singed binary format data.
(The negative value is represented as 2's
complement.) Variable value converted into
integer.
dec_val 2-byte signed binary format data.
(The negative value is represented as 2's
complement.) Digit number after decimal point.
The following values are read concretely.
Variable data
displayed in
CNC screen mcr_val dec_val
---------------+---------------+---------------
Blank(void) 0 -1
0.000 0 3
0.0000001 1 7
0000.0001 1 4
00000.100 100 3
00001.000 1000 3
00010.000 10000 3
100000.00 10000000 2
99999999. 99999999 0
00123.000 123000 3
-00123.000 -123000 3