Modbus Serial

The format of MODBUS that is implemented is RTU. For identification of messages we use the fields
known as slave address and function code in the MODBUS header. The RemTrans.Address[0] and [1]
define these fields in the ProviewR environment. Se MODBUS specifications documents for more information.

Modbus Serial is not yet implemented as an I/O-system in ProviewR. You have to configure the messages
yourself by using RemnodeModbus and specifying RemTrans-object for the various operations you
want to perform. Modbus works in a request/reply manner, so for each operation you want to perform
you specify one RemTrans-object for sending and one for receiving. Except for the Modbus-header of the
message and the checksum handling you have to specify the content of the message to send in the
send-buffer. In the same way you must decode the content of a received message yourself.

Modbus TCP is implemented as an I/O-system in ProviewR. See more information about this in the document
"Guide to I/O-systems". With Modbus TCP you don't have to care about the encoding of the messages.

Receiving messages

When we receive a buffer, we search for RemTrans.Address[0] and [1] that matches the fields
slave address and function code in the message header.
If the data object for this message is big enough to contain the message, the message will be stored,
and the DataValid flag will be set.

Sending messages

Messages will be sent using the contents of RemTrans.Address[0] and [1] as the fields
slave address and function code in the message header.