PLC Communication and Monitoring

I recently worked on a software project that remotely monitored automated industrial machinery. To monitor these devices, it was necessary to learn how to communicate with the machine’s Programmable Logic Controllers, or PLCs. PLCs are both similar to yet so very different from a normal computer that there was a noticeable learning curve. Since most of my projects here at Ayoka typically do not involve bits, Binary Coded Decimals (BCD), hexadecimal, or the methods of converting between these various formats and base, my memory of these concepts has become somewhat faint. Once I refreshed my knowledge of these topics, it became easier to communicate with the PLC.

Fortunately, there were only a few PLC commands that I used often. Requesting the values of blocks from the PLC Memory was easily the most common PLC command I used. The results from this request required a healthy amount of conversion and interpretation so that a normal human being might understand what the electrical usage of Machine 22A is. The second most common PLC command was writing values to memory addresses on the PLC. There were several situations that the PLC would await a “Proceed” signal from the monitor software before it would continue with certain operations.

Developing the web frontend to the monitor software was in many ways easier. It was not all that dissimilar from a typical blog site: query the database for certain values and display the results on the requested page. The quirk in this case was writing the necessary AJAX code to poke the server for new values every second. Thankfully, this was not a major issue and our AJAX practices prevented any performance issues. Overall it was an interesting project that opened my eyes to the world of PLC software development.

tn38hqi9bv