The read diagnostics data are stored in "buf" in following order.
+-----------------------+
│ Data number 1 │ <-- buf[0].datano
│-----------------------│
│ Type 1 │ <-- buf[0].type
│-----------------------│
│ Data 1 │ <-- buf[0].u.cdata/idata/ldata/
│ │ cdatas/idatas/ldatas
│-----------------------│
:
│-----------------------│
│ Data number n │ <-- buf[n].datano
│-----------------------│
│ Type n │ <-- buf[n].type
│-----------------------│
│ Data n │ <-- buf[n].u.cdata/idata/ldata/
│ │ cdatas/idatas/ldatas
+-----------------------+
"Type" includes both diagnostics data type in the upper byte and axis
type in the lower byte.
Type (upper byte) Diagnostics data type
-----------------------+---------------------
0 Byte
1 Word
2 2-Word
Axis type (lower byte) Diagnostics data type
-----------------------+---------------------------------
0 Ordinary (none axis type) data
-1 All axes data of axis type data
1,..,amount of One specified axis data
controlled axis of axis type data
The diagnostics data is stored in "Data".
The diagnostics data of none axis type data or the axis type data
which was read for one specified axis is stored in
"buf[i].u.cdata/idata/ldata". The axis type data which were read
for all axes are stored in "buf[i].u.cdatas/idatas/ldatas" in
axis number order.
The array size of each members of "iodbpsdr.u.cdatas/idatas/ldatas"
which is used for reading all axes's data is always 32 regardless
of the amount of controlled axes. In case that the amount of controlled
axes is less than 32, no data are stored in the members corresponding
with the axes No. (amount of controlled axes + 1),..,32.
Each buf[i] is suffixed with dummy data so that the total data size
is a multiple of 4-bytes.
The data format depends on each diagnostics data. The format of
Byte/Word/2-Word data is generally signed binary.
In case of reading bit data, also the masked bit on the CNC's
diagnostics screen can be read without masking. Therefore, there may be
difference between the contents of displayed data on the CNC's screen
and ones read by this function.