Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
2 ratings:
 4.5 out of 5     Rate this Document

How do I add an Allen Bradley SLC PLC to NI OPC Servers?

Primary Software: LabVIEW Modules>>DSC Module
Primary Software Version: 8.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I have an Allen Bradley SLC PLC. How can I connect it with NI OPC Servers?

Solution:
Add an Allen Bradley SLC PLC to NI OPC Servers by doing the following:
  1. Open NI OPC Servers by going to Start»All Programs»National Instruments»NI OPC Servers»NI OPC Servers.
  2. Create a new .OPF file by selecting File»New.
  3. Create a new channel by left-clicking Click to add a channel. in the Channel Device Group Area.



    Figure 1:  Adding a New Channel to NI OPC Servers


  4. Designate a name for your channel and click Next.
  5. Select the appropriate device driver for your PLC and click Next.  For example, if you are using the AB SLC 5 series PLC, you need to select the DF1 Driver.



    Figure 2:  Selecting the Device Driver for Your PLC

  6. Configure the serial setting page. If your device requires certain settings, change them here, but you will probably use the default values. Click Next.
  7. Continue through the rest of the New Channel Wizard using default settings, unless your hardware specifies otherwise.  You can change these settings at a later time.
  8. After finishing the wizard, you'll be able to add your specific device.  In the Channel Device Group Area, left-click Click to add device.



    Figure 3:  Adding a Device to NI OPC Servers

  9. Name the device, and click Next.
  10. Under Device model: select one of the available PLCs, and click Next. If you do not see the correct PLC in this drop down go back to step four and double check the driver for your device.



    Figure 4:  Selecting the Correct Device Model

  11. Assign the Device ID (cannot be 0), and click Next.
  12. Continue through the New Device Wizard until you get to the Slot Configuration page, where you can add the modules for your PLC.



    Figure 5:  Adding Modules to Your PLC

  13. Finish the New Device Wizard.
  14. Enter your OPC tags in the tag area by either left-clicking Click to add a static tag or by right-clicking and selecting New Tag....  Tag addressing is specific to your PLC, so refer to its documentation for the correct syntax.
In order to check the OPC tags for your device, select Tools»OPC Quick Client... or click the OPC Quick Client Launch button in the toolbar. From here, you should be able to see the tag values updating, along with the timestamps.



Figure 6:  Viewing the OPC Tags in the OPC Quick Client

Refer to the document Developer Zone Tutorial: Connect Any LabVIEW to any PLC to learn how to view your tags as shared variables in your LabVIEW project.

Note: This tutorial is specifically for the Allen Bradley SLC5 /PLC 5 series devices, but you can use the same process to connect any PLC,  just be sure to select the correct Device Driver (Step 4).

Related Links:
Developer Zone Tutorial: Connect LabVIEW to Any PLC
KnowledgeBase 0LDD15EC: Allen-Bradley PLC Addressing
Developer Zone Video Overview: Connect LabVIEW to Any PLC using OPC
KnowledgeBase 50UFPCJ4:  Simulating a Device with NI OPC Servers

Attachments:





Report Date: 03/04/2009
Last Updated: 09/04/2009
Document ID: 4V3GMEZD

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit