Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

control Watlow EZ-Zone PM using LabView

Hello,

I'm trying to control an EZ-Zone temp controller using LabView 2011

http://www.watlow.com/products/controllers/ez-zone-pm-controller.cfm?famid=14

 

Its communication protocol is Modbus RTU. It appeared that Watlow had a driver for it but it was written for 32-bit OS and standard bus so I cannot use it since my OS is 64-bit and use RS 232-to-USB cable.  After searching in this forum, I found out about NI Modbus library which I downloaded and tried it out.

First, I used the MB Serial Master Query Read Holding Registers.vi to read the current temperature. When I ran the VI with parameters set as Mode RTU, slave address 1, starting address 360, quantiy 2, I received timeout error code 6101. I tried to change the timeout duration but still received the same error code.  Has anyone used the NI Modbus library with success before or any suggestion regarding timeout error?

 

Attached is an example on how to assemble a Modbus packet for this controller.

 

Thank you

 

Tim

0 Kudos
Message 1 of 8
(6,356 Views)

Hey LVNewbie85,

 

I was able to find this KnowledgeBase article that describes the timeout error you are getting:

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LXwSAM&l=en-US

 

It looks like it is a hardware communication problem rather than a software issue.

 

Hope This Helps,

 

Doug B

Applications Engineer
National Instruments
0 Kudos
Message 2 of 8
(6,329 Views)

Doug,

 

Thanks for your reply. I am able to communicate with the instrument now but it keeps giving me random numbers output in Reading Holding Registers.VI from NI Modbus library.  I'm trying to find out where can I find the documentation for the NI Modbus library since it did not come with the zip file I downloaded from NI.

 

 

Thanks

 

Tim

0 Kudos
Message 3 of 8
(6,321 Views)

Hey LVNewbie85,

 

Here is a link to a KnowledgeBase article that describes how to access the Modbus Library help files:

 

http://digital.ni.com/public.nsf/allkb/4E3BDFC165A8AA2886257722001C56CB 

 

Also, there are examples in the LabVIEW Example Finder that are pretty well documented that might also be helpful.

 

Hope This Helps,

 

Doug B

Applications Engineer
National Instruments
0 Kudos
Message 4 of 8
(6,307 Views)

Hey Tim,

 

Did you ever resolve this?  We have someone over here who is trying to do something similar.

 

Matt

0 Kudos
Message 5 of 8
(6,062 Views)

Hey Matt,

 

Yes, I have resolved it.  Please let me know if I could be any help

 

Tim

0 Kudos
Message 6 of 8
(6,018 Views)

Hi Tim

 

I was wondering if you could give me any help or show me what your final result with these controllers was. I am completely new to LabVIEW and seeing a successful piece of code would really help me out. I am a graduate student and my end result is a ways off, but I think what you have mentioned in this thread would be a great start. If you could help me out, please let me know!

 

Thank you so much,

 

Jimmy

0 Kudos
Message 7 of 8
(5,796 Views)

Hi Jimmy,

 

I have a few resources I would like to point you towards.

 

First, the easiest way to do Modbus communication through LabVIEW will be through the DSC Module.

https://www.ni.com/en-us/shop/product/labview-datalogging-and-supervisory-control-module.html

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x0QgCAI&l=en-US

 

Also, the Modbus Library you are attempting to use has now been updated to a newer, better version. Unlike the LabVIEW DSC module, which gives you access to Modbus coils through Shared Variable Nodes, these APIs give you access to the raw Modbus network commands, meaning you have to build your communication scheme yourself. As a note, neither of these libraries are officially supported by NI. However, the new Modbus API has a dedicated forum which is monitored by developers.

Old Library (not recommended for new development): http://zone.ni.com/devzone/cda/epd/p/id/4756 

New, Modbus API: https://forums.ni.com/t5/Reference-Design-Content/LabVIEW-Modbus-API/ta-p/3524019

Modbus API Discussion Forum: https://forums.ni.com/t5/NI-Labs-Discussions/NI-LabVIEW-Modbus-API-Discussion/td-p/3373078

 

You mentioned it being helpful to see completed examples. For both the Modbus Library and the Modbus API, they install with Master and Slave communication examples. You can try running these when getting started with your Modbus PLC communication.

Joey S.
Senior Product Manager, Software
National Instruments
0 Kudos
Message 8 of 8
(5,778 Views)