How to read and troubleshoot analog 4-20mA loop devices .

Here is a part of simplifying of PLC wiring diagram at a water treatment plant (see picture above). There are three transmitters that connect to a PLC  analog current input module and with some reasons, they mysteriously failed to work at the same time at the same PLC module. Of course this event is rarely happened in real instrumentation field !. This example just to give idea what we are going to encounter in the field and how to solve these problems. Most 4-20  signal generators or process meters sold in the market provide…

Read Allen Bradley tags using Python 2.7 and pass the values to node-red.

Read and write  Allen Bradley tag values using  python which utilize Common Industrial Protocol (CIP) on Ethernet/IP. This method will work on Controllogix and Compactlogix PLCs. The script  will be executed in Node-red and the return value will be displayed on dashboard and can be read on wireless devices such as tablets or smartphones. Requirements: 1.Raspberry pi 3 (Jessie). 2.Node-Red (It was already installed in latest Jessie but  we might still need to get update to work with dashboard node). 3.Dashboard node. Here is the link to get this node: https://flows.nodered.org/node/node-red-dashboard 4.python 2.6 or…

Another “Swiss Army Knife” for PLC Networks : Raspberry Pi 3

We can turn Raspberry pi 3 as  AP(Access point) and can be utilized with wireless devices to scan PLCs or field devices network. Requirements: 1.Raspberry pi 3 2.Power Supply (for Raspberry) 3.Wireless device ( tablet, laptop, or cellphone) 4.Ethernet cable Keep in the mind that the following procedure is for Raspberry Pi 3 (Jessie raspbian)  which I am quite sure it might work for some  older versions with slightly modifications. I got the script from several sources online and I did modification to work on  PLC network that use static IP addresses. 1.Install hostapd,…

“Poorman” PLC I/O board

Process or manufacturing plants have PLCs which get signal inputs from mechanical buttons, switches, limit switches and send signal outputs to activate relays, solenoid valves etc.  In many cases, they use 24V DC power supply for PLC CPUs  and their I/O modules.  This voltage level is used for input modules and deliver 24VDC  from output module  to turn  solenoid valves, coils etc. For non-critical use  and ignoring  the latency  , we can build  simple 5V to 24V DC I/O adapter that can be used with our Microcontrollers to drive 24V DC rating relays and …

Convert legacy control panel into LCD alarm and warning system with Arduino.

In the old days, We used to have electronic controllers or PLCs to send the warnings or alarms on the panel by turning combination of  light indicators  on or off. To understand these signals we have to refer their operation manuals to interpret these messages. For example if they have three indicators on the panel which has Light A(LA), Light B(LB) and Light C(LC),  it will be 2^3 =8 combinations of warning/alarms. To make it easy to understand , they provide us a troubleshooting table to tell operators or technicians to trace the problem.