Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Connect to an Allen-Bradley PLC

No ratings




This guide introduces connecting an Allen-Bradley PLC to ThingWorx Kepware Server.




  • Create and run a simple ladder logic application on an Allen-Bradley PLC
  • Connect the PLC to ThingWorx Kepware Server


NOTE: The estimated time to complete this guide is 30 minutes. 



Step 1: Learning Path Overview


Assuming you are using this guide as part of the Rockwell Automation Learning Path, then you have now completed each of the following installations:


     1. Connected Components Workbench


    2. ThingWorx Kepware Server


    3. ThingWorx Foundation (for Windows)


In this continued step, you'll now connect an Allen-Bradley PLC to Connected Components Workbench and then to ThingWorx Kepware Server.


In a later guide, we'll propogate that information further from ThingWorx Kepware Server into ThingWorx Foundation.


NOTE: Both Rockwell Automation's Connected Components Workbench and ThingWorx Kepware Server are time-limited trials. If significant time has passed while persuing this Learning Path, you may need to reinitialize them. Consult the Troubleshooting step of this guide for more information.




Step 2: Setup PLC


This guide uses an inexpensive Allen-Bradley Micro820 PLC as a demonstration.


ThingWorx Kepware Server offers drivers for hundreds of devices, making this step the only one that contains device-specific instructions.


Read and understand installation instructions before making any electrical connections to the PLC.


1. Connect the postive lead of a 24V power supply along with a 6" test lead to Terminal 1 of the output terminal block.


2. Connect the negative lead of the power supply to Terminal 2.




3. Confirm the test lead is secure from making contact with anything conductive; it will be  connected to +24V. Power on the supply and confirm the LEDs briefly light.





4. Carefully touch the test lead to the Input 1 terminal and confirm the indicator LED for Input 1 turns on.




5. Power off the supply before continuing to the next step.




Step 3: Create PLC Project


In this step, you will create a simple PLC application. This application will connect to a ThingWorx Mashup in subsequent guides in the Learning Path.


 1. After opening Connected Components Workbench, click New... in the Project section.


2. Enter ThingWorxGuide in the Name field and click Create.


3. Browse to the PLC model you are using and click Select, then Add to Project.




4. Right-click Program, then left-click Add > New LD: Ladder Diagram




5. Double-click Prog1 to open the ladder window.




Ladder Logic


You will create a simple application that will turn on output 2 when there is a signal on input 2.


 1.. Right-click in the box to the left of the rung, hover over Insert Ladder Elements, then click on Direct Coil





2. Click the I/O - Micro820 tab towards the right and select an output coil - this guide uses _IO_EM_DO_02. Then click OK





3. Add an input contact by right-clicking in the box to the left of the rung, hover over Insert Ladder Elements, then click on Direct Contact.


4. Click the I/O - Micro820 tab and scroll down to select an input - this guide uses _IO_EM_DI_02. Then click OK.





 5. The program window should now look like this:






Next, you will propagate the program to the PLC.


1. Secure the test lead then apply power to the PLC.


2. Connect an ethernet cable directly between the PLC and your Windows computer.


3. Click Device > Connect to connect to the PLC; a pop-up will appear saying the project does not match the program in the controller.



NOTE: When either your PLC or computer are restarted, they may be assigned a new IP address, requiring you to reconfigure the connection. Click the tab labled with your PLC, then click the pencil icon next to connection path, click Browse, expand the Ethernet driver, highlight the active controller, and click OK. Click Close and then Connect.





4. Click Download current project to the controller



5. Confirm overwriting any program in the controller by clicking Download.


6. After your project is downloaded, run it on the controller by clicking Yes.




7. Touch the test lead to the I-02 terminal, and your program will turn on the #2 output.

  • You can confirm your project is working by both hearing the soft click from the PLC and seeing the output indicator turn on.




Step 4: Configure ThingWorx Kepware Server


Now that you have a simple project running on the PLC, you need to configure ThingWorx Kepware Server to monitor it.


1. Open ThingWorx Kepware Server, right-click on Connectivity, and click New Channel.


2. Select Allen-Bradley Micro800 Ethernet from the drop-down, then click Next.





3. Click Next to accept the defaults, and click Finish to create Channel2.


4. Click Click to add a device below Channel2, enter myPLC in the name field, and click Next.


5. Enter the IP address of your PLC, then click Next.

  • The IP address of your PLC is shown in Connected Components Workbench in Device > Configure.





NOTE: The IP address of the PLC may change when it is power cycled and must be updated in ThingWorx Kepware Server to match


6. Click Next to accept default values for each pop-up, and click Finish to create the myPLC device.





7. Click the Click to add a static tag message.


8. Enter Coil2 in the Name field, _IO_EM_DO_02 in the Address field, change the Data Type drop-down to Boolean, and click OK.

  •  The address must exactly match a variable name in the PLC.





9. Create a second tag by right-clicking on myPLC again and clicking New Tag.


10. Enter Coil3 in the Name field, _IO_EM_DO_03 in the Address field, select Boolean from the Data Type drop-down, and click OK.






Step 5: Troubleshooting


1. If the connection to the PLC stops working and there is a Thumbs Down icon next to your Properties, the ThingWorx Kepware Server trial edition drivers are not connected to your PLC.

  • The trial edition stops running after 2 hours and must be stopped and restarted.
  • Right-click on ThingWorx icon in system tray.




  • Click Stop Runtime service.
  • Wait a minute for the process to stop, then click Start Runtime service.


2.  If Connected Components Workbench does not connect to PLC, check the IP address of the PLC using RS Linx Classic software that was installed as part of Connected Components  Workbench.

    • RS Linx Classic is located Start > All Programs > Rockwell Software > RSLinx > RSLinx Classic
    • Click AB_ETHIP-1, Ethernet and IP addresses of connected PLCs will be discovered


NOTE: A changed PLC IP Address (typically seen through Connected Components Workbench) will require an IP Address change in ThingWorx Kepware Server settings.




Step 6: Next Steps


Congratulations! You've successfully completed the Connect to an Allen-Bradley PLC tutorial.

You've learned how to:


  • Create and upload a simple ladder logic application to a PLC
  • Connect a PLC to ThingWorx Kepware Server


The next guide in the Using an Allen-Bradley PLC with ThingWorx learning path is Create an Application Key.


Learn More





Monitor an SMT Assembly Line



Additional Resources


For additional information on ThingWorx Kepware Server:


WebsiteConnecting & Managing Industrial Assets
DocumentationKepware documentation
SupportKepware Support site
Version history
Last update:
‎Mar 07, 2023 01:56 PM
Updated by:
Labels (2)