Support Forums
Modbus function 0x03

Hi all,

I have to use modbus function 0x03 to read values from a probe. But ist seems that the DT80 only supports 0x04. I was able to send the command manually via serial but when I try to read the answer which I can log in a terminal all CV variables stay empty. I tried %1b[CVx] and %1c[CVx] as well but no success. The exact command I used to read the values from serial port is 1SERIAL("%*3b%1b[4CV]%1b[3CV]%1b[2CV]%1b[1CV]\e",W)
Any suggestions to get this work?

Thanks in advance
Torsten

Edit: firmwae version is 9.22

Hi all, I have to use modbus function 0x03 to read values from a probe. But ist seems that the DT80 only supports 0x04. I was able to send the command manually via serial but when I try to read the answer which I can log in a terminal all CV variables stay empty. I tried %1b[CVx] and %1c[CVx] as well but no success. The exact command I used to read the values from serial port is 1SERIAL("%*3b%1b[4CV]%1b[3CV]%1b[2CV]%1b[1CV]\e",W) Any suggestions to get this work? Thanks in advance Torsten Edit: firmwae version is 9.22
edited Nov 13 '19 at 12:16 pm

Hi Torsten,

There is a bit opposition on MODBUS function declaration within DT with the real MODBUS function.
When you declare R4 as MODBUS syntax, it is actually targeting MODBUS function 3 (and vice versa R3 for MODBUS function 4) . Perhaps this issue is caused by confusion of MODBUS option selection.

You can also replicate MODBUS syntax using SERIAL channel, the best way to check the parsing is using SERIAL diagnostic P56=1. You will know when you see the diagnostic whether your code is correct or not. A missing of one string may cause incorrect parsing result.

Best regards,
Rudy Gunawan

Hi Torsten, There is a bit opposition on MODBUS function declaration within DT with the real MODBUS function. When you declare R4 as MODBUS syntax, it is actually targeting MODBUS function 3 (and vice versa R3 for MODBUS function 4) . Perhaps this issue is caused by confusion of MODBUS option selection. You can also replicate MODBUS syntax using SERIAL channel, the best way to check the parsing is using SERIAL diagnostic P56=1. You will know when you see the diagnostic whether your code is correct or not. A missing of one string may cause incorrect parsing result. Best regards, Rudy Gunawan
112
1
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft