Modbus Address
-
I am having some trouble getting Modbus TCP/IP working with Watlow Instrument. I believe it is with deals absolute address vs relative address.
It appears to me that the address input of the data point is relative to data type selected is this the case?
Documentation does not clear it up for me so if anyone has worked with Modbus would appreciate some feedback on putting in absolute address.
-
Mango uses 0 based offsets which you should be able to covert from the address provided in your documentation. If you post some example of the addresses I might be able to help figure out the correct offset.
-
First Example
Parameter Name: Analog Input Value Input 1 Module 1
Range: -99,999 to 99,999
Data Type IEE Float Read Only
Float = IEEE 754 32 Bit
Modbus Relative Address: 27586Second Example
Parameter Name: Sensor Type Input 1 Module 1
Range: Off (62) Thermal Couple (95) Millivolts (56) Volts (104) Miliamps (112) RTD 100 Ohm (113) RTD 1,000 Ohm (114) 1K Potentiometer (155)
Data Type unsigned 16-bit Read/Write
Modbus Relative Address: 27594I have been able to read to instrument using Modbus Test aplicaiton.
On Side note I can also communicate to same instrument using SCPI (Standard commands for programmable instruments original designed as IEE488 but over Ethernet TCP/IP using ASCII text strings on port 5025
-
Managed to get it working.
Had to use 4 byte float swappedNext item is for me to take in these integers such as in second example and have them be shown and recorded as what they represent.
-
You can use the Range text renderer property under the data point settings for your second example.
-
@hanse1pk said:
Managed to get it working.
Had to use 4 byte float swappedNext item is for me to take in these integers such as in second example and have them be shown and recorded as what they represent.
This doc might be useful to you: http://wiki.infiniteautomation.com/doku.php?id=tipsandtricks:bestpractice
In my experience (having added probably a dozen different types of device to Mango using Modbus) there is always a bit of fluffing around initially to discover the magic transformation to get from the manufacturer's address to the address that Mango expects.
The first thing I usually do is look in the documentation for the modbus registers and find a register that can be easily identified - usually something like a 'hardware model number' or other known value.
Then you can use the 'Modbus Read Data' and 'Point Locator Test' functions on the Data Source page to test out different registers to try to hit the value you want.
In an extreme example, the manufacturer's documentation may say that a holding register is located at 43004, but you might find that the actual register you need to input into Mango is 3003 (43004 - 40001). Software such as 'Modbus poll' or 'CAS Modbus Scanner' also helps in figuring this out.