01-30-2015 03:06 AM
Hi community,
I have a watlow pm temperature controller connected to my computer with an ethernet cable. I need to communicate with the device via modbus tcp. I know for sure that the unit is functioning as if I use a modbustcp test program (see the first attachement), then I can read the temperature of the K type thermocouple which is connected to the unit. (the IP is 192.168.10.3, and I read two words from address 360). The temperature on the screenshot is 23.61992C
I would like to do this from LabVIEW by using an IO server. My problem starts at the beginning. I right click on my computer >> new >> I/O server >> Modbus
then in the popup window I select "Modbus ethernet" in the top right corner. I have attached this popup window. What is the Address in the communication settings section. The IP need to be entered at the bottom, so I have no clue what is the Address field is referring to.
Then I try to create bound variables... I see a huge list of registers, but honestly I dont understand how the address 360 I use in the standalone program translates to this list. Which one should I select from the list? Whatever I select gives me either 0 or FALSE if its a boolean. According to the documentation 360 is the relative address and the absolute is 400361. Actually there are a register list from 400001-465535, but if I select 400361-400362 I still read zero.
Reading only zeros and FALSE values... thats suspicious. Something is wrong.
Please help out with your thought!
02-02-2015 12:01 PM
What happens when you enter 360 as the address when you are setting up the I/O server?
02-02-2015 12:46 PM
I have tried that and 360 is automatically corrected to 255
02-02-2015 01:39 PM
The address is a number between 0-255 that identifies "This session"
02-02-2015 01:58 PM
see if this happens to help you understand
02-02-2015 02:09 PM
Unfortunately that gives me nothing, certainly not what can be read by the tcp test app.
As I made more and more experiments I have found that I can communicate with the unit via the modbus driver I have found on the NI page.
Is it expected that I can do modbus thru that driver but no via the I/O server?
02-03-2015 01:38 AM
Hi,
You say: 'According to the documentation 360 is the relative address and the absolute is 400361.'
You have to remember that the '360' is the real ModBus address and the '400361' tells you that ModBus function code 4 must be used to read relative address 361.
Kees
02-04-2015 03:03 AM
Ok, I keep that in mind. Still no success with the reading the temp though.
02-04-2015 06:35 AM - edited 02-04-2015 06:36 AM
OK, just a quick (and dirty) test. Can you try this VI.
Kees
02-04-2015 06:38 AM
Yeap, this works and I was able to do something like this before with the modbus drivers. And I am willing to go with it if I have no other choice. But as we have this I/O server thing built in to LabVIEW I am wondering if that would or would not be a better solution.