Hi,
In order to write this program you will need a driver for your PLC. If you have a driver for this PLC and this driver has OPC Server capabilities you can use datasocket VI's in LabVIEW to read and write from the OPC Server(driver) and consequently to the hardware, make reference to the following address :
http://zone.ni.com/devzone/conceptd.nsf/webmain/DF8C0A4BA2E2B22A86256A3700592BEA?opendocument
Normally the hardware manufacturers provide drivers for the PLC's and they normally have OPC Server capability, since manufacturers want to increases the hardware connectivity.
If you do not have a driver, you may want to consider the National Instruments product called "IA Server with OPC". This is a CD with a set of drivers in it, and all this driver
s have OPC Server capability. The SLC-500 PLC is between the hardware that is supported, however you should pay attention to the following facts:
Use this driver to communicate with the Allen-Bradley SLC5xx line of programmable controllers. This object can communicate with a member of the Allen-Bradley SLC-500 family in the following ways:
· Through a direct DH+ connection using a 1784-KT, 1784-KTx, 1784-PCMK, or 5136-SD card installed in the computer,
· Through the serial port via a KF2 module which converts serial DF1 to DH+,
· Through the serial port using an Allen-Bradley 1747-KE card (which plugs into the SLC chassis and converts DF1 to DH 485),
· Through the serial port using a stand-alone Allen-Bradley 1770-KF3 communication interface module which converts DF1 to DH 485,
· Through a direct DF1 serial connection to a SLC 5/03 or SLC 5/04 programming port, or
· Through a direct DH485 connection using a 1784-PCMK card plus either a 1747-AIC or 1761-NET-AIC mod
ule.
So, make sure you have the hardware required in this list if you want to use the "IA OPC Servers with OPC"
I hope it helps
Best Regards
Andre Oliveira