Is it possible to send a character's string variables from one Modbus RTU master to its related Modbus slave?
variable name VAR_1,type string
intial value '1234-01-05-10:15:36.125'
Thanks in advance.
Modbus allows transfer of data in terms of Coils (1 bit) or Registers (16-bit). You can send strings if you build them as a series of registers containing each 2 8-bit CHAR values (ASCII). But this implementation is all yours to develop.
Some of our powermeters (Modbus slaves) transfer timestamp information to the master in this way. Look at the ION 7500 Modbus mapping, for example. Data Records (transferred as 2 regiters, FLOAT vaue) are followed by 2 32-bit UINT registers with time data in ASCII format.
Hope this helps,
Sure, just pack the ASCII encoded string variables into consecutive Modbus registers, packed two characters per "register" and you are good to go.
Just remember, that Modbus does not specify this definition. You are on your own to get the Modbus Master and the Modbus Slave to be able to understand the communication. In fact the protocol specification does not specify "ANY TYPE DECLARATIONS", you either read "bits" or "words".