What are the main steps in PLC operation?
PLC operation consists of four steps
- Input scan, Scans the states of the inputs
- Program scan, Executes the program logic
- Output scan, Energize/de-energize the outputs
What types of input are defined in a control system?
Different type of inputs can be used in a controller system including:
Typically a PLC requires that the device should be ON for 10 ms or more before the PLC thinks it is ON.
Many PLCs also have special filtered input. They are special because the filter time is adjustable.
High speed input
It is also sometimes referred to as “pulse-catch”. This function will tack take the short pulse (5 ms for example) and stretch it to make it the required minimum for the PLC to see it.
The “interrupt” allows us to interrupt the program scan, regardless of where it is in the program execution, and go execute a mini-program (i.e. routine) we setup. As soon as it is done executing the routine it will return to where it was in the program execution just before the interrupt was generated.
This function is used when the exact current status of an input (or output) is critical to your program.
What is Double core syndrome?
The double core syndrome occurs when we use the same output coil more than once in ladder programming. Remember than PLC scans from left to right, top to bottom. When some coil used in many rungs, regardless to first ones be true or false, the last rung determines whether output coil is ON or OFF.
There is an application which need lower interval time. How can I achieve that?
Remember that the required interval time of the program is determined by the maximum allowed delay time in the process. It is recommended to limit the scan time in order to increase the speed of control system. IO scan time can be reduced by implementing direct IO in the control system. IOs connecting via serial ports like PROFIBUS are time consuming and will increase the IO scan time.
By estimating the IO scan time you can determine if the PLC is going to be fast enough for your particular application. If the PLC is not fast enough, then consider using interrupts within your program as they will not be too deeply affected by the san. They will, however, be effected by the IO update time. Some PLCs allow you to adjust that time, but many don’t.
What is difference between compiler and interpreter?
The difference between “compiler” and “interpreter” is that the compiler first translates the whole program before it is executed, while the interpreter translates and executes the program instructions one by one. This means that the compiled programs are executed considerably faster than interpreted ones.
Why some programmes is called as source code and others called as object code?
Programs that are written in high level languages are often known as “source code”, while the compiled result is called “object code”.
What is variable attribute?
All variables are declared with the unique name and a corresponding data type. This is normally done before the program code is written. A variable must also have an attribute, either “retain”, “constant” or a blank field. Retain means that the variable will retain its value when the system restarts. A constant variable will not be changed by the system. Variables with a blank attribute will always be calculated at the system start.
What is different between local and global variables?
The IEC standard defines three types of variables.
variables can only be accessed in the same function block or program in which they are declared.
variables are accessible from any program or function block in the open project. A global variable must be declared as an external variable in the program organisation unit (POU) accessing it.
variables can be used by other controllers.
What types of programming is covered in IEC 61131?
Part 3 of IEC 61131 deals with programming languages and defines two graphical and two textual PLC programming language standards:
- Ladder diagram (LD), graphical
- Function block diagram (FBD), graphical
- Structured text (ST), textual
- Instruction list (IL), textual
- Sequential function chart (SFC), has elements to organize programs for sequential and parallel control processing.
FBD programs have very weak support for conditional statements when one or more actions are to be repeated for the specified number of times, or only as long as a certain condition is fulfilled. This kind of construct is much easier to accomplish in the ST language with one of the statements FOR, WHILE, REPEAT or IF.
Do not mix up function blocks with the programming language FBD, which uses a number of predefined function blocks. A function block may be defined using any one of the five programming languages. Functions blocks may also be called from all the five programming languages. An application program based on several function blocks therefore requires less memory than programs containing duplicated of code.
An important consideration in SFC program is that only the code in active steps is executed. Each action can have one or more action qualifier. That determine when and how the action is executed. Most editors support the following three action qualifiers.
- The N action qualifier (None-stored), causes the action code to be executed continuously as long as the step is active.
- The P1 (Pulse rising edge), action code to be executed once when the step becomes active.
- The P0 (Pulse falling edge), action code to be executed once when the step becomes inactive.
What is the firmware in a PLC?
Software that is part of the system supplied by the manufacturer and is not accessible for modification by the end-user. Firmware software is also referred to as embedded software or system software.
What is the redundancy definition in a control system?
Use of multiple elements or systems to perform the same function; redundancy can be implemented by identical elements (identical redundancy) or by divers elements (divers redundancy). Redundancy is used primarily to improve reliability or availability.