Normally open (NO) contacts or inputs in the PLC ladder logic program do not mean the same as a wired normally open switch. NO contacts on the ladder logic provide the logic condition for the rung to turn on the output. We will be looking at three things about the normally open (NO) contact on our ladder logic program. The normally closed NC ladder logic contact will also be discussed at the end. Let’s get started.
The Machine Simulator (MS) is part of the EasyPLC software suite. It has many built-in machines that are used to show different programming techniques. The robotic cell example is one of these machines. This will demonstrate a sequencer example. In this case, an engine is lifted and placed onto a rack. The logic will step through various steps to perform the task. We will be using a Click PLUS PLC and the Click programming software to program this EasyPLC machine simulator engine loader of the robotic cell. This will be done using Modbus TCP (Ethernet) for communications. The program will allow you to start, stop and jog the sequencer. Using the five steps for program development, we will show how this sequencer is programmed. Let’s get started.
A flip-flop circuit in a PLC usually has one input and two outputs. When the input is activated, the two outputs latch on/off opposite to each other alternately. Basically, it is used to toggle (latch) an output on and off with just one input. In the PLC it is a single input that will toggle an output on and off each time the input signal is activated.
Flip Flop Circuit using Relays
Here is an example of a hard-wired flip-flop circuit using relays.
PLC Flip Flop Circuit Example
The PLC program will be a little different than the relays because of the way in which the PLC scans. Scanning takes place from left to right, top to bottom. The output conditions from the logic are available to the next rung as the logic is solved. Outputs and inputs are read usually only once at the end of the scan. Remember to think of the outputs in the PLC as make before break. This is the opposite of the relay logic presented above which is break before make.
Let’s look at the logic. This is programmed using the Do-More Programming Software which comes with a simulator. This full programming package is free of charge and can be downloaded here.
The input is on leading-edge instruction. (One Scan) If output 2 is on then it will set output 1. If output 2 is not on then it will reset output 1. The third line of code will determine the state of output 2 based upon output 1.
You may be asking yourself why do we not just use the conditions from output 1 to control output 1. This is because if we substituted output 1 for the conditions on the input then output 1 would never turn on/off. The output conditions are available for the next line of the PLC code. This would allow the output to be set and reset within the scan without being updated. Using output 2 is the only way in which this logic would work.
Running the PLC Logic for the Flip Flop Circuit
Here is an automated picture to show the input toggling on / off and the outputs flip-flopping.
Note: An emergency condition can be added to the set or reset rungs to automatically control the output either way.
If you have any questions or need further information please contact me.
If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLCs are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII, and Floating Point.
To get this free article, subscribe to my free email newsletter.
Use the information to inform other people how numbering systems work. Sign up now.
The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.