LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using DSC to read and Write to a Modbus Device

I am trying to use DSC to Read and write data to a Modbus device over a TCP network. The device is a Watlow F4 controller and it is connected to an eChamber Gateway by Tidal Engineering which takes the incoming communication from the TCP network and translates it to a serial (485)coomunication to talk to the controller. I have setup the OPC server Using Modbus TCP. I have no problem setting up the tags. I start running into difficulty when DSC is run for the first time. When I first try to write to a particular register the quality of the tag data goes to bad and stays there until I try to write again. It also appears that the Server and Tag engine don't always agree on the quality of the data. I have noticed times when the
server indicated Good data and the tag engine indicated bad. Finally when I try to write to a series of registers I have a great deal of difficulty if any of the data gets to the controller and is saved it's a maricale. Unfortunately I have never been able to successfully write all of the data. The server indicates a lot of garbled communication and often says there is no Response from the socket. Whenever I test the TCP network it seems to be operating properly. I have also switched out the Gateways and I have had no better luck. I have even tried altering the Poll rates of the server and Tag Engine with no better reults. Any suggestions would be helpful if not life/career saving. Thanks in advance for your time.
0 Kudos
Message 1 of 4
(4,984 Views)


Hello Mike,

Just to make sure I got your setup correctly, the Watlow controller has a Serial interface; you connect this to what essentially is a Serial-to-Ethernet converter (Gateway)? And then use the OPC Server. Right?

What OPC Server are you using? Is it the Lookout Protocol Drivers (LPD)?

Have you ever successfully written to at least one register on the controller? You may want to step-back and take a look at what component in your setup might be failing.

One thing you might want to try as a troubleshooting experiment, if feasible, is to remove the Gateway from the picture -- connect the Watlow controller directly to the Serial port on the PC and use Modbus Serial OPC. Does this work correctly? I suspect some of your problems are
because of this TCP to Serial conversion.

If even the direct Serial doesn't work, you will want to remove the OPC from the picture next. For this, do you have some diagnostic software that came with the controller? You somehow will want to talk to the Watlow directly (not via OPC).

If there's no diagnostic software from Watlow, try downloading some free/demo Modbus drivers for LabVIEW. Here's one such (which I have not tested personally):

http://www.air.nl/nlibrary/modbus_vi.html

If you can talk to the controller directly (via Serial) without OPC, you can go back and start adding components.

I hope this at least gives you some ideas. And hopefully someone else will chip-in with more suggestions.

Regards and good luck,

Khalid


0 Kudos
Message 2 of 4
(4,983 Views)
I appreciate you taking the time to try and help. You have correctly interperted the setup. I am using the Industrial Automation Server. Specifically the the OPCLookout Drivers. I can successfully write to one register at a time. I am wondering if the problem lies in the server setup. On the Modbus setup when you go into the advanced section there are a number of configuration options. Mainly they just indicate the max number of registers to read at any one time. It defaults to 2000 for the discrete registers and 125 for the holding registers. I had to set them all to 1 because the server failed to communicate properly due to the fact that the registers I need to read and write to are not consecutive. I've been wondering if I should just setup all of the add
ress in the server so taht it can take advantage of the multiple read function and then just select the registers I need in DSC??? I have considered doing that but haven't gone taht route since I will have to make this work over an ethernet network no matter what.At least your suggestion would tell me if the gateway ws the issue. I'll give the free modbus drivers a try. Thanks again.
0 Kudos
Message 3 of 4
(4,983 Views)

In DSC's Tag Config Editor, though you'll see a range for the registers, you can create tags only for those registers you're interested in.

Modbus Server in LPD does try to do "batch read" to optimize the communications. If the registers do not fall in a given "block," it will poll again to read the remaining registers.

Khalid


0 Kudos
Message 4 of 4
(4,983 Views)