Programmable logic controllers (PLC) use a cyclic scan. The time that it takes to complete one scan is called Scan Time. Typical scan times range from 10 milliseconds to 10 microseconds. This translates from 0.01 to 0.0001 seconds per PLC scan. Understanding how the program scan will help us in programming and troubleshooting the PLC.
The simplest scan cycle of a PLC consists of 4 steps. Read inputs, execute program, diagnostics, and communication, and update outputs.
We will be looking at each of these steps in a little more detail as we discuss the PLC program cyclic scan. Let’s get started. Keep on Reading!
Shift registers will move (shift) bits in a word (register) to the left or right.
If we look at an example of boxes moving along a conveyor belt, the boxes would represent the bits in the register. The movement of the conveyor would be the shifting of the register that represents the movement of the boxes.
Shift registers are a form of sequential logic, which involves the present inputs and the prior history. All of the prior history is remembered.
We will be making a shift register in PLC Fiddle with the instructions provided. The output of the shift register will then be looked at for a reject area. Let’s get started. Continue Reading!
Just about every program usually has some data comparison instruction. This is the ability to compare information from one area of the controller to another and act on results. The output of this comparison conditions the logical continuity of a rung. PLC Fiddle is a free online browser simulator and has the following compare contact instructions.
= (if Equal contact)
<> (if Not Equal contact)
> (if Greater Than contact)
>= (if Greater Than or Equal contact)
< (if Less Than contact)
<= (if Less Than or Equal contact)
We will be looking at these instructions along with some programming challenges. As a system integrator, this ability can prove very useful to you in the field when commissioning your automation system. We will look at these compare instructions and show the parameters required to program them. Our compare challenges will help you gain a good understanding of how we can use compare in the PLC. Trying these challenges with PLC Fiddle is fun and will help you with PLC programming. Let’s get started. Continue Reading!
PLC programming will often involve math equations that need to be solved. Every manufacturer of programmable logic controllers will include math logic for you to use in your programs. Numbering systems play an important role. You can usually perform math using BCD (Binary Coded Decimal), Binary or Floating Point. Here is a link that will review the numbering systems in the PLC:
What everyone ought to know about PLC numbering systems
PLC Fiddles provides four basic BCD math and a move function for our circuits. Add, Subtract, Multiply Divide and Move. We will look at these math instructions and show you the parameters required to program them. Our math challenges will help you gain a good understanding of how we can use math in the PLC. Trying these challenges with PLC Fiddle is fun and will help you with PLC programming.
Let’s get started. Continue Reading!
Counters are used in a lot of PLC programs that I have seen. A timing chart is a secret behind understanding the counter that you need in your application. Making a timing chart before writing the program will ensure that all of the information will be accounted. The secret to using counters is a good review of using these timing charts.
PLC Fiddle has three different counter instructions for us to use in our programs. Count UP, Count Down and Reset. We will discuss the counter parameters and the three different instructions. Our counter challenges will help you gain a good understanding of how counters work in the PLC. Let’s get started. Continue Reading!