18.03.2019, 17:01 (This post was last modified: 18.03.2019, 17:11 by sx3.)
Hello,
I'm having difficulties writing to one particular register. I don't know if the device or the documentation is faulty, or if we are sending out wrong type to it.
I can read on Modbus documention that there are different commands, FC01 = read, FC05 = Write single, FC15 = Write multiple.
Can I in JSON mapper define for example FC05?
I have spoke with one guy that say he doesn't have any trouble resetting the filter timer over modbus using 0x0006 register.
However, he uses a Siemens Pxc100 with RTU module, and his command is "5x00005", I was thinking the 5x=FC05?
Funny thing is, I'm able to write to the first 4 registers in above list without problem and the JSON is identical, so I believe it should work as I have written in the JSON and something must be wrong in the device handling Modbus.
18.03.2019, 17:17 (This post was last modified: 18.03.2019, 17:20 by sx3.)
No errors in the log.
I have tested reading, however this particular coil I have problem with always reads 0, so it would be hard to find the correct coil this way.
When I write 1 to the coil, it returns to 0 after a second or two. I have tried reading the coil as fastest I can after I've have sent 1 (< 1sec), but always read 0.
Reading Coil-0 return true, which is correct. The rest are false. (as it should be)
Reading coils >5 gives "Illegal data address", so probably coil 5 is correct.. And if we are using correct command I guess something is corrupted in device firmware!?
The documentation states that read always returns 0 for this coil. And since addressing starts with 1 there the correct address for filter reset is 5 that you are already using.
I increased the timeout even to 5 seconds but it does the same. In the log, after overnight, Read failed: Illegal data value and read failed: Operation timed out
13.03.2020, 08:09 (This post was last modified: 13.03.2020, 14:58 by davidchispas.)
(13.03.2020, 07:58)admin Wrote: Try lowering baud rate to 19200. You will need to change baud rate in RTU settings first then do write address to UIO20.
I made the changes and it gives me the same errors ... If I remove the load 120 Ohms the device flashes red.
Hi
Any other tests you can do? From what I saw in some other post, these types of errors are frequent. I don't know if anyone managed to fix it.
Cheers
You still haven't provided full profile that you are using for reading registers. You can also test using second RS-485 port if there's a hardware issue of some sort.
Another thing to try is to read register data via script. You need to disable modbus mapper before running this script. Post what you get in Logs tab. Change baud rate (19200) if needed.
(16.03.2020, 11:16)admin Wrote: You still haven't provided full profile that you are using for reading registers. You can also test using second RS-485 port if there's a hardware issue of some sort.
Another thing to try is to read register data via script. You need to disable modbus mapper before running this script. Post what you get in Logs tab. Change baud rate (19200) if needed.
What do I need to add to get the channel status? when i reset the power supply i dont get the actual status of the channel. Is there a possibility to register it in a different object?
Whenever this happens, it is always off. Is there a chance it will keep the last state?
You can copy definition for each coil and set "writable": true, "write_only": true for control and "writable": false, "write_only": false for status. This way you can map different objects to control and status.
(04.06.2020, 11:16)admin Wrote: You can copy definition for each coil and set "writable": true, "write_only": true for control and "writable": false, "write_only": false for status. This way you can map different objects to control and status.