LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW to Allen Bradley SLC500, use OPC?

Hello all,

I'm working on my first labVIEW project. Very rewarding so far.

Part of the project is connect to an AB SLC500 and perform some reads and writes.

Searching through the NI site, it seems that the preferred method would be to use the NI OPC Server. Are there any other reasonable options?

Is the DSC package required as well, or can I just create Shared Variables and read and write to them?

 

TIA,

Paul

 

0 Kudos
Message 1 of 6
(4,899 Views)

Well, you need to understand what communication protocol the PLC responds to. OPC could be one of them. If that's the case and you decide to go with it, you don't have to use NI's OPC Server. If the AB provide a OPC server, you can use that as well.

 

One option of communication through OPC is to use the LabVIEW DSC module, which enables OPC communication through shared variables. This means that you need the DSC module if you are interested in using the shared variables approach. The other option is to simply use the Datasocket VIs. Because DataSockets are a standard part of LabVIEW, you do not need any special software modules to access your OPC tags with this method.

 

From a performance standpoint, there is no difference between these two methods when the DataSocket is configured correctly. At run time, accessing the tags will happen at the same rate and with the exact same behavior. To configure the DataSocket connection correctly, ensure that you open and close a connection to your tag only once when reading or writing from it iteratively.

 

Do a search for 'opc dsc' and 'opc datasocket' to get examples of both approaches.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 6
(4,892 Views)

Hi Paul,

Adnan is perfectly correct in what he has said.  I have communicated with an SLC 500 using LabVIEW before, and it was quite straight forward.  I used the Allen Bradley OPC server, RSLinx, in conjunction with the Datasocket VI's. Just be aware that with RSLinx, you need to buy at least the Classic version.  The free version does not support OPC, it is just used to communicate wth the AB software.  Once you create an OPC topic in Linx and point it at your PLC, you will be able to see the PLC registers using the DataSocket Browse VI.

I wish you well with your application,

Michael.

0 Kudos
Message 3 of 6
(4,874 Views)

If it is a new device, it might support modbus communications. Then you could download the NI modbus library. Or possibly use a protocol converter.

 

Are you using ethernet or serial ports??

 

There are also hardware devices that will bridge modbus to allen bradley data formats.

 

If you really want to learn labview, then download the protocol manual for the AB communication port and get busy.

 

Try anybus.com for hardware products to convert protocols.

0 Kudos
Message 4 of 6
(4,854 Views)

Thanks for all the comments.

 

Has anyone tried the

EtherNet/IP Driver for Communication to Allen Bradley ControlLogix PLCs

https://lumen.ni.com/nicif/us/nilabsethernetip/content.xhtml

 

Paul

0 Kudos
Message 5 of 6
(4,757 Views)

Michael,

 

 

can yu share some example vi that can communicate/control with Allen Bradley SLC500?

I don't know how to use DataSocket to communicate with the PLC.  Some example VI is really helpful.

 

I greatly appreciate.

 

Truong

0 Kudos
Message 6 of 6
(3,860 Views)