Absolute zero Modbus Experience - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10) +--- Thread: Absolute zero Modbus Experience (/showthread.php?tid=5631) |
Absolute zero Modbus Experience - PolymorphedCust - 25.09.2024 Hi I've got a costumer with a Modbus device, that I can't seem to find a JSON file/profile for. I'd like to actually learn how this is done, so I was hoping one of you wanted to take the time to explain the basics, for me to make a JSON Profile. The manual is here. Thanks a lot ! RE: Absolute zero Modbus Experience - Daniel - 25.09.2024 Hi Start by using Read test and read a register you know what the value is like temperature. Play with different settings and once you get correct reading drop it here and I can help you start with the profile. https://kb.logicmachine.net/misc/modbus-profile/ RE: Absolute zero Modbus Experience - PolymorphedCust - 25.10.2024 (25.09.2024, 13:12)Daniel Wrote: Hi Hi I've gotten what I believe are some correct read data. I did take notice; the list of registers is 1 number higher that the read test responds to (probably because the first register is actually no. 0 and not 1) Then I began trying to make a profile with your UIO20 profile as a baseline. Does it look like I'm doing it right? Is there anything I should be alerted about, when making the profile? Modbus registers Thanks a lot RE: Absolute zero Modbus Experience - Daniel - 25.10.2024 Share a screenshot of working example from read test. RE: Absolute zero Modbus Experience - admin - 25.10.2024 You should add "datatype" entries where applicable. This is the modbus register type which can be different from the object (bus_datatype). For On/Off you should set "datatype": "uint16", "bus_datatype": "bool" since it only has two states: 0/1. For temperature values use "datatype": "int16", "bus_datatype": "float16", "value_multiplier": 0.1 RE: Absolute zero Modbus Experience - PolymorphedCust - 25.10.2024 (25.10.2024, 07:42)Daniel Wrote: Share a screenshot of working example from read test. Here is a read test for the operation mode. (99, though the table says 100) Admin: How do I know when it is uint16 and when it is int16? I've added some custom values for the On/off signal. Is it still possible with the bus-type: Bool? RE: Absolute zero Modbus Experience - Daniel - 25.10.2024 The documentation should define the datatype but it is not always correct, the easiest is to check with read test you have Data Type there, if it is not set then it is int16. Yes you can use bool full list is here: https://kb.logicmachine.net/misc/modbus-profile/#bus_datatype RE: Absolute zero Modbus Experience - admin - 25.10.2024 int16 is signed (-32768..32767), uint16 is unsigned (0..65535). If the documentation specifies value range which can be negative then use int16. Both data types can be used if the actual value range is 0..32767. You can set custom value for 1 bit values. Use 0 for false/off and 1 for true/on. |