Page 11 of 37 |
4.1.4.Map Descriptor Example 1 – IO Read
This example provides all the required information to read and write to the IO memory area of the PLC. The following Map Descriptor creates a task for the driver to read the first 20 Words from the CIO memory area and store them in the Data Array DA_CIO. The first word from the PLC will be stored as the first element in the Data Array. Whenever an upstream device writes any element in the Data Array, the Driver will write the same value to the PLC at the corresponding address. This scheme is known as
Map_Descriptor_Name, | Data_Array_Name, | Data_Array_Offset, | Function, | Node_Name |
| Address, |
| Length, | Data_Type, | Command_Name, | Unit_number |
CMD_CIO, | DA_CIO, | 0, | RDBC, | PLC1, |
| 0, |
| 20, |
| MEMORY AREA READ, | 0 |
One of the Data Arrays declared in the Data_Array section
The Data for CIO memory area from the Node (PLC1) will be stored in this Data Array.
Offset within the Data Array at which Driver will the store the data for initial Address defined under “Address” parameter.
In particular this case data for Address 0 will be stored at offset 0, for Address 1 offset 1 and so on.
Forcing the Driver to issue a read request for each Scan_Interval .
In particular case Driver will read this portion of CIO memory area for each second if Scan_Interval is set 1s.
This is the logical name of the target device having the parameters defined in section “Client Node Descriptors”.
Starting Address of the memory area to read.
Specify the number of elements (number of Words in this case) to read from PLC.
Specifies the type of target memory at PLC.
Also this parameter can be Unit number at PLC replaced with
Memory_Code parameter. See chapter 6 to for memory codes read CIO Word area.
Command Name specifies the Main and Sub request codes to make a request to read this memory from PLC. Assigning Direct MRC and SRC parameters can replace this parameter. See chapter 6 to know valid MRC
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.fieldserver.com Tel: (408)