
Compare the data with reference values to provide a result or trigger an operations. Now that we have our data coming to Raspberry Pi’s Node-Red server, there are basically three kinds of operations we perform with data: Next, click on the Deploy Button (on the top right corner of the window) to see the incoming data from PLC in the Debug Area: To do this, drag the Debug Node from the Output Nodes and drop it into your work space, then connect (wire) the Input Node to the Output Debug Node: Now that we have completed our configuration, we can connect our Input Node to the Output Debug Node to see the incoming data from PLC. In our example we are using a MicroLogix 1400, so we'll need to provide the PLC Addresses for each piece of data we want to fetch.įor testing purposes we'll use N7 integer values which we can change manually in the PLC using RSLogix, and then check within Node-Red to see if we are getting the same values or not. With a legacy A-B PLC, it will be an “Address,” while with newer A-B PACs it will be a “Tag.” To do this, you'll need to know where in your PLC's memory this data is. Next we need to configure the PLC variables that we want to fetch data from. Note: In my experience, A-B PLCs generally use Port 44818 Image by Nilesh Soni Next, navigate to the Connections section enter your AB PLC’s IP Address and Port Number, and set Cycle Time and Time Out per your requirements. Once you've connected to your Raspberry Pi, start your Node-Red server and open the PCCC Input Node. To avoid this, I prefer to connect to my Raspberry Pi remotely over the same local network using my laptop computer and a VNC client application like VNC Viewer. While you can access your Raspberry Pi directly by connecting a USB keyboard, mouse, and HMDI display (TV, Monitor, etc.) to it, I've found that doing so consumes a lot of processing power in the Raspberry Pi which substantially slows down the system. I also have my Raspberry Pi and laptop computer connected to the same WiFi router via wireless connection. In this example I have a A-B PLC ( MicroLogix 1400) connected to my WiFi Router via a standard LAN cable. #Mitsubishi gx works 2 for linux software
In my last article I discussed why you might want connect your PLC to a IoT device like a Raspberry Pi, as well as the software we use to accomplish this connection with A-B PLCs (Node-Red with the free node-contrib-pccc driver.) In today's article I'll walk you through configuring node-contrib-pccc to read data from your A-B PLC into a Raspberry Pi.