PLC code is mainly used in automation process in industrial applications that run on a PLC. PLC's are robust microcontrollers that are the brain of the machine. Before PLC's where used they used relays and electric circuits to automate manufacturing lines.
This relay logic had some drawbacks. It was hard to troubleshoot and it was hard to make changes. Computers became more reliable and therefore in the 80's the PLC was introduced.
The code to run on a PLC had to meet a few criteria. The people who designed the logic for the machines at the time where electrical engineers. There where now easy computer languages at the time so they came up with a new language that resembled the relay logic. This was ladder logic.
This was also needed for the maintenance staff so it was easier to switch from relay control logic to a PLC controlled process.
After a time they created some new languages with some advantages and disadvantages. These languages are standardised over the years in the IEC 61131 standard. In this project we will use the language Function Block Diagram (FBD) to make a basic traffic light.
If you are interested more in ladder logic and in PLC's in general I recommend the videos on the Youtube channel RealPars.
A simple traffic lightWe will use the OpenPLC editor to program a traffic light in Function block Diagram (FBD).
The OpenPLC project made an open source PLC. The code is written in the OPenPLC editor and It can be run on multiple microcontrollers and is a great way to learn PLC programming.
In this video you can follow the process to write a basic program in the OpenPLC editor and upload and run it on an Arduino Uno.
Comments