This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Absolute zero Modbus Experience
#1
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 !

Attached Files
.pdf   9050746.pdf (Size: 1.61 MB / Downloads: 18)
Reply
#2
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/
------------------------------
Ctrl+F5
Reply
#3
(25.09.2024, 13:12)Daniel Wrote: 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/

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

Attached Files Thumbnail(s)
   
Reply
#4
Share a screenshot of working example from read test.
------------------------------
Ctrl+F5
Reply
#5
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
Reply
#6
(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?

Attached Files Thumbnail(s)
   
Reply
#7
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-...s_datatype
------------------------------
Ctrl+F5
Reply
#8
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.
Reply


Forum Jump: