FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual Page 16 of 21
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
Appendix A.2. Single Writes
For pure write operations where the function = WRBC or WRBX, the driver defaults to using
Function Codes 15 and 16 (Multiple writes). It is possible to force the driver to use Function
Codes 5 and 6 (Single Writes) by manipulating the Data_Type parameter as follows:
For Address_Type ADU:
Address range
Data_Type Function Code (Write)
1 - 65536 Single_Coil 5
1 - 65536 Single_Register l
6
For Address_Type PDU:
Address range
Data_Type
Function Code (Write)
0 - 65535 FC05 5
0 - 65535 FC06 6
For Address_Type Modicon_5digit
Address range
Data_Type Function Code (Write)
40001 - 49999 Single_Register
6
30001 - 39999 Single_Coil 5.
Example: FC 6 = Write Single Register
Add a parameter to the Modbus client side Map Descriptor called Data_Type.
If you specify the Data_Type as Single_Register and the Function as WRBC or WRBX,
then a Modbus poll with FC 6 will be generated.
Logically Single Register implies a length of one, and even if you try to set the length longer
in the csv file, the length is limited to 1 in the driver.
Appendix A.3. Read/write Operation
When using the driver as a Modbus master, the function RDBC allows read/write capability
with Register and Coil data types. If defaults are used, then Function codes 5 and 6 (Single
Writes) are used to write data back to the registers being read, regardless of data length
being read. If multiple writes (FC 15 and 16) are needed for Read/write operation, the user
needs to specify the Node_Type parameter in the Client Side Nodes Section and set it to
Block_Mode.
Note that block writes of length 1 are currently all that is supported.