LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

OPC communication by RSLinx with LabWindows CVI

Hello,
 
I have a little problem:) I had start my journey with LabWindows, and I don't know how to use OPC. I would like to read data from PLC and write data to PLC. How to do this? I have RSLogix5000 for develop the program and RSLinxOEM to send data, read data. The PLC is Allen Bradley and I am connecting by ethernet cable. Please help:)
 
Thanks.
0 Kudos
Message 1 of 9
(5,854 Views)
prepond,

Where are you getting stuck exactly?

For starters, you use the OPC Server to create "tags".  These tags you connect to a network variable.  You then write your data to the variable.  This is definitely a general overview, however.

Are you needing assistance with creating the tags?
Connecting your variables to the tags?
Creating a network variable?

This is assuming you are going to be using Network Variables to communicate to the OPC Server.  You can also use the DataSocket API.

Let me know where you're needing the assistance and I'll be more than happy to help you!
Regards,

Jared Boothe
Staff Hardware Engineer
National Instruments
0 Kudos
Message 2 of 9
(5,825 Views)
prepond,

Also, check out these two articles regarding network variables and OPC Servers.

Network Variable Technical Overview
Using a LabWindows/CVI Program as an OPC Server Through the NI Network Variable Engine
Regards,

Jared Boothe
Staff Hardware Engineer
National Instruments
0 Kudos
Message 3 of 9
(5,824 Views)

I've just start learning LabWindows CVI, I have very goog book "LabWindows Programming for Begginers", but there is nothing about OPC communication. Before this I had C,C++, Assembler and many others during the study (academy). Just want to know how to start, not stuck enywhere. Some example, some code will be vey usefull.

Thanks.

0 Kudos
Message 4 of 9
(5,815 Views)

One more think... Can I run OPC Server for examples and then my program for sending data to PLC? But maby data transfer by RSLinxOEM will be much more easyer? Please help me:)

0 Kudos
Message 5 of 9
(5,810 Views)
Hi prepond,

From here on out, it is your choice as to whether you would like to use the NI Network Variable Engine or RsLinx. We do have a Developer Zone article titled Using RsLinx Server that will help you with that route, but once again, you can choose which way you are more comfortable with. Hope this helps out.
Jonathan F.
National Instruments
Applications Engineer
0 Kudos
Message 6 of 9
(5,784 Views)
Excellent tutorial! Really usefull, but not for me:) I would like the same tutorial for LabWindows CVI. Can someone help me with this? Some example how to read data from PLC, not only input or output but also another tags. I know how to configure RSLinx (I'm using ethernet) but don't know how to read data and for example put this data into text field in my program... Thank you for all replys, and asking for more:)
0 Kudos
Message 7 of 9
(5,775 Views)
Hi prepond,

The tutorial that I sent you corresponds with LabWindows/CVI as well even though it says LabVIEW. The example described in LabVIEW has an example in CVI as well. You can open up the NI Example Finder by opening up CVI going to Help>>FindExamples, hitting the "Search" tab, and the typing in "OPC" in the search field. The example that I used was OpcClient.cws. Open up the example and run it. Once you run the example you can hit the "Select Source" button, and from there select your OPC server.

As far as programming your application, you can take a look at this Knowledge Base and the other links found in that Knowledge Base and see if that gets you started with programming. Also, I would look into other examples in CVI if you have some other questions about programming. Hope this helps you out.
Jonathan F.
National Instruments
Applications Engineer
0 Kudos
Message 8 of 9
(5,761 Views)
Thanks for all. Now I must learn this everything and try to recive data from PLC. This is very good and usefull forum, thanks again.
0 Kudos
Message 9 of 9
(5,748 Views)