أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
Every PLC has a scan time and a scan cycle. This is how the PLC and the software inside the PLC works. The scan cycle is the cycle of which the PLC gathers the inputs, runs your PLC program and then updates the outputs. This will take some amount of time often measured in milliseconds or ms. The amount of time it takes for the PLC to make one scan cycle is called the scan time of the PLC.
First, let us divide the software inside the PLC into two parts. A little piece of software called the firmware and another piece of software called the program. The firmware is the operating system in the PLC. The firmware is responsible for running your program commands, managing communications and some other tasks. Some of the functions of the firmware is to make the microprocessor and the RAM communicate, and to make the PLC compatible with the PLC programming software. Many other tasks are handled by the firmware, and you will almost never have to worry about it. The firmware is installed by the manufacturer of the PLC.
The other piece of software is actually the software that we develop for the PLC. It is the program of logic that we put inside the PLC. The program of logic that reads the inputs and sets the outputs. Before learning more about the program of logic we need to know is where in the PLC the program is placed.
Normally the program is saved in the RAM of the PLC, but as we know from the previous chapter the RAM can be a risky place to save your program. It can be risky because the RAM will be cleared when the power is off. Most PLC’s have a backup battery, that prevents the RAM from being deleted, but there is a better place to save your program more permanently – the EEPROM. The data in the EEPROM will still be there even after the power has been removed. So, the EEPROM is in most cases the optimal place for the program.
The scan time is how the PLC program works
First thing the PLC will do is to check the status of all the inputs. To be more precise, the PLC will take an image of all the inputs and save it in the RAM. Where taking an image means that the PLC will save a binary value representing the inputs. Let me explain that in detail with an example:
Let’s say we have a PLC with 8 digital inputs. When the PLC checks the input status of all the inputs when they are all low, the binary number will be 00000000. Each 0 is a representation of a digital input. If the input is low the value will be 0, and if the input is high the value will be 1. So if we connected the last input (input 8) to a power source the PLC would save the number 00000001, when checking the input status.
After the PLC has checked the status of all its inputs, the PLC will then execute the program. The logic program that we program the PLC with will now run, and as it runs the program will collect some numbers and save them temporary. You might already have guessed what these numbers are. These numbers are the output status as the logic of the program have decided. When the program has ended the PLC will update the output status. The same thing now happens as with the inputs only in reverse. The number representing the output status will now be saved as the output status in the PLC, and the status of all the outputs will be updated.
What really happens is that the temporary number decided by the PLC program representing the output status will be a binary number just like the inputs. So let’s take an example of 8 digital outputs. The number saved by the program will be 00000000 if all outputs are to be updated to low or off. If the PLC program sets the first output to high the number saved will be 10000000. So with 0 as off and 1 as on.
So, how does the PLC update the outputs? The answer to that is a special place in the memory. At a special place in the memory the microprocessor will have a number that will always represent the status of the outputs. If we save the number 10000000 in this place the first output of the PLC will be on. When the PLC program ends the temporary number will just be saved in this special location of the memory and the outputs will be updated.
These three steps are all called a scan cycle. One scan cycle is when the PLC has checked the input status, executed the program and updated the output status.
The PLC is a fast thinker and this cycle happens within milliseconds. But it will be relevant to know about the scan cycle and especially the scan time, which is the time one scan cycle takes. When we are working with timers and other advanced functions in the PLC the scan time can be crucial. The same happens with large projects with thousands of lines of code or ladder the scan time might become an issue.
The PLC scan time are completely brand and setting specific. In many cases you can set different times for the I/O cycle time and the task cycle time. The task cycle time is equal to the second step in this article – Execute PLC program.
All these brand specific settings and further information about the different PLC scan times will be in future articles. If you are starting out, learning PLC programming, you should just care about the scan time. Reading the I/O, then executing your program and at last updating the I/O is a good fundamental understanding of how a PLC works. When you are starting out learning PLC programming, knowing about the concept of the scan cycle is a huge advantage. In the beginning, this concept will help you understand the basic concepts of PLC programming.
If you have experience with PLC programming you may know of some scan cycle settings.
The scan time is the AVERAGE time it takes for the PLC to complete all the instructions in the program and return to the beginning of the program. Many programs use jumps or reusable code that might not be executed every scan cycle. So every scan might not be the same length every time. Examples of where the scan time would be longer would be where the PLC had to do an extra operation to get rid of a defective part. Also, I have written programs where the same code was executed several times throughout the scan for various reasons. One example is to count shaft encoder pulses when more than one pulse might happen during a complete program scan.
scan time means the time required to read the inputs,execute the program and generate the output this is called scan time the scan time is usually in milli seconds to nano seconds
It is a time taken by P.L.C processor to read data input and execute it .
The amount of time taken by the processor of PLC to scan all the rungs and all inputs is called SCAN Time
Scan time is time taken by PLC to read the inputs
Scan time is the time taken by PLC to read inputs,execute program and as per/logic update outputs accordingly. PLC scan time depends on no. of inputs,outputs and program size (total memory used, heap size). so it may be different for different program(PLC).
The scan cycle is the cycle of which the PLC gathers the inputs, runs your PLC program and then updates the outputs. It's the minimum time required to complete one scan cycle in PLC once it is executed
Process of reading the input status,running the logic and update the output
The scan time is the average time PLC take to read all inputs and run all program instruction due to program flow and input states then update output states
It is the time the PLC CPU takes to make one complete cycle " to read the current inputs and operate the program and gives outputs " , and you can test it in siemens Simatic simulation you will find single scan cycle,
also SCAN time depends on how long your program is