LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

LabWindows/CVI 2013 and Allen-Bradley CompactLogix 5370 PLC

I did a search for this and found a few discussions dating back a few years. I was wondering if there is anything new on this as far as options.

 

I am looking to use LabWindows/CVI to communicate with an Allen-Bradley CompactLogix 5370 PLC, which will control three servos. Does anyone have experience with this and/or suggestions? It seems like the NI OPC Servers are suggested for this. Does anyone have any sample code using this or some other OPC server? Thank you, I appreciate any help or direction.

0 Kudos
Message 1 of 4
(3,129 Views)

Hi bstar1,

 

NI OPC Servers are compatible with your PLC, so that is an option for you. You can check PLC compatibility in the document I've linked below:

 

Supported Device & Driver Plug-in List for NI OPC Servers


You can also use the OPC Server program the PLC manufacturer provides, if they provide one. To access the data on the OPC Server, our recommended approach is to use datasockets in CVI. Datasockets will allow you to communicate with the OPC server so you can write your own OPC client. Since CVI is an environment built around a C compiler, you could also look into 3rd party OPC DA C API's.

Austin
Staff Software Engineer
NI
Message 2 of 4
(3,098 Views)

Thank you for your response. I downloaded the NI OPC Servers for evaluation. When I look for info on how to use this, I see a lot of examples and tutorials for LabView, but very little for LabWindows/CVI. Would you happen to know of any documents, tutorials, or examples where LabWindows/CVI is used to write an application that uses the NI OPC Servers? I appreciate your help.

0 Kudos
Message 3 of 4
(3,076 Views)

Hi Bstar1,

 

To work with OPC Servers in LabWINDOWS/CVI, you'll need to make datasocket connections. There is a shipping example for LabWINDOWS/CVI which demonstrates how to set up an OPC Client to communicate with a server. You can find it by following the instructions below:

 

1. In the LabWINDOWS/CVI environment, click Help -> Find Examples... in the menu bar.

2. This will open the example finder for CVI. It automatically opens to the task structure. Navigate the task structure to Networking -> Datasocket -> OLE for Process Communication (OPC).

3. In this folder are a few examples that demonstrate how to use datasocket connections to communicate with your OPC server. The OpcClient.cws demo is pretty easy to understand, and should give you a good starting point.

Austin
Staff Software Engineer
NI
Message 4 of 4
(3,073 Views)