LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus TCP with Beckhoff (Wago)

Hi,
I'm looking for examples/how to/lib/dll to build a communication to a Beckhoff BK9000(similar to Wago 750) which have a Ethernet - Modbus TCP Option.
I'm able to write via LabVIEW-TCP-Functions but only once after powering on and the result/answer is more confusing.

For the lookout OPC variant i heared there is still some additional software needed - true? or is it possible to set up the communication with lookout OPC without third party driver?

Thanks for any help
Hans
0 Kudos
Message 1 of 23
(16,278 Views)
Hi Hans,

An option is to use Beckhoff's TwinCAT I/O software. The ADS.OCX ActiveX drivers can be called within LabVIEW.

There is a license fee (~$150 I think) and you'll have to climb a bit of a learning curve, but it has some nice side effects, such as you can configure the variables in TwinCAT, map to physical I/O there, and become hardware independent in you LabVIEW code.

You can download a 30day trial of TwinCAT for free from Beckhoff.com

Regards,
Ben Zimmer
Software Developer, Meikle Automation, Inc.
0 Kudos
Message 2 of 23
(16,277 Views)
Hi Ben,

that would be ok if we wouldn't have to setup and change several notebooks we will use. In that case every TwinCAT- installation has to be registered regarding to a system-generated key. That is what we want to avoid, our DAQ-systems should run without individual installation-keys we first have to ask for. We want to use norton ghosts for common setups to be flexible for worldwide support and setups.
The option with 30days-trial would work but need to be updated to work at least once per travel-periode.

Regards
Hans
0 Kudos
Message 3 of 23
(16,277 Views)
One method is to use the NI Industrial Automation Servers CD. This includes several Modbus drivers as OPC servers that will work with Wago over TCP. If you like, you can get these servers as part of the LabVIEW Datalogging and Supervisory Control Module.

Preston Johnson
Preston Johnson
Solutions Manager, Industrial IoT: Condition Monitoring and Predictive Analytics
cbt
512 431 2371
preston.johnson@cbtechinc
0 Kudos
Message 4 of 23
(16,278 Views)
Yes, that works.
The problem there was that i first had no settings for alarms - and without it wasn't running but now it works.
Now i would like to write a complete Register to avoit setting every output. For single Outputs i use the native member 000001 ... but i couldn't find a member for a word register to reduce communication-overhead. Any help?
Thanks
0 Kudos
Message 5 of 23
(16,279 Views)
Hello janosch and anyone else reading this late reply to an older thread.
 
I have been succesfully using LabVIEW to conrol Beckhoff I/O using MODBUS TCP. I would be willing to discuss this with anyone who's interested in it.
 
A system I am currently working on has some trouble with communications when first launched. This problem started happening after I added a second network card for access to a LAN for data storage. When in this problem mode, I can regain proper communications by sending a "Reset Watchdog Timer" instruction sequence to the Beckhoff rack. I am not sure why this problem occurs, or why the RWDG fixes it.
 
Please respond if you can offer any advice on the communications problem - Thanks!
 
0 Kudos
Message 6 of 23
(16,095 Views)

Hi, I am not familiar with modbus and there is a project to communicate with a Beckhoff bx9000 PLC via TCP

are there any VI examples that setup the tcp server communication and be able to send and receive data ?

any information will be appreciated.

 

Thanks

0 Kudos
Message 7 of 23
(14,962 Views)

Hi JAMR,

There are plenty of examples that setup up the tcp server communications. If you open up the NI Example Finder and double click on the Networking Folder (under the Browse tab). You can then select the TCP & UDP folder and find several examples that use TCP. Also, there is a great knowledge-base article that provides information about network communication with TCP/IP messaging protocol. Essentially, what you are going to want to do is establish basic connectivity between the computer and the device and then assign the device an IP address. Before you do anything with the driver for the device, you might try to ping the device first. Once you can get this working, then you can set up the TCP/IP communication. I hope this helps!

Carla

National Instruments
Applications Engineer
0 Kudos
Message 8 of 23
(14,937 Views)

If you are going to use modbus tcp, then download the NI modbus library and save yourself some work.

http://sine.ni.com/devzone/cda/epd/p/id/4756

How much data do you need to read/write?? How fast do you need to update the data??

0 Kudos
Message 9 of 23
(14,925 Views)


@JAMR wrote:

Hi, I am not familiar with modbus and there is a project to communicate with a Beckhoff bx9000 PLC via TCP

are there any VI examples that setup the tcp server communication and be able to send and receive data ?

any information will be appreciated.


I'm not sure what you mean exactly. But I did some time ago a pure LabVIEW library talking to the Beckhoff BC/BK9000 modules using their ADS protocols instead of Modbus. It works for the digital input modules I needed but would need a little work for analog modules or digital output modules although the basic routines are all there.

Rolf Kalbermatter

Rolf Kalbermatter
My Blog
0 Kudos
Message 10 of 23
(14,907 Views)