
[Description]
Reads the PMC data within the specified address range.
This function is used for exchanging various data between the C
application and the PMC ladder software.
Specify the discrimination code corresponding to the PMC address to be
read in "adr_type".
The discrimination code is either a binary numeric value of 0,..,9 or
an alphabetic character such as 'G' or 'R', etc. (described later)
Specify the type of PMC data to be read in "data_type" with binary
format.
data_type Type of PMC data Byte size
---------------+-----------------------+--------------
0 Byte type 1
1 Word type 2
2 2-Word type 4
Specify the start PMC address in "s_number" and the end one in
"e_number" with binary format.
The read data are stored in one of "buf.u.cdata[i]", "buf.u.idata[i]"
or "buf.u.ldata[i]" according to its type.
The data format is same as the one in the PMC.
The data format of Timer (T0000-T0079) is as follows.
Timer number Unit
---------------+----------
T0000 - T0007 48 [msec]
T0008 - T0079 8 [msec]
For example, when 800 [msec] is set in T0010, 100 is read by this
fucntion.
Example of arguments specification
(1) Reading "D0100" (Word type data).
adr_type 9 or 'D'
data_type 1
s_number 100
e_number 101
length 8+2*1 (=10)
buf.u.idata[0] Content of "D0100" will be stored.
(2) Reading "R0200" through "R0209" (Byte type data).
adr_type 5 or 'R'
data_type 0
s_number 200
e_number 209
length 8+1*10 (=18)
buf.u.cdata[0] Contents of "R0200",..,"R0209" will be stored.
,..,buf.u.cdata[9]