Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

send hex to modbus device


chalit Feb 25, 2020 09:26 AM

Hi,

I would like to send hex command to modbus device as:

Send command: 01 03 00 04 00 02 CRClow CRC high

Firstly, i use

OutString = CHR(&H01)& CHR(&H03)& CHR(&H00)& CHR(&H04)& CHR(&H00)&CHR(&H02)& CHR(&HCA)&CHR(&H85)&CHR(&H0D)&CHR(&H0A)

and use Device Config/terminal to see transmission from CR1000X datalogger..

in the terminal shown:

16:23:45.000 T 01 03 04 02 CA 85 0D 0A ........
16:24:05.000 T 01 03 04 02 CA 85 0D 0A ........
16:24:25.000 T 01 03 04 02 CA 85 0D 0A ........

nocticed that the hex 00 is missing, and no response from modbus device

Regard,

Chalit I


JDavis Feb 25, 2020 04:10 PM

That looks like standard Modbus RTU protocol. You should use the ModbusMaster () instruction in the CR1000X. That will create a properly formatted command.

Log in or register to post/reply in the forum.