Why is a PLC programmed?
The PLC is programmed to execute certain actions, the program will contain a set of instructions and this instruction would direct the PLC to execute the actions. A programming language would help to add instructions in a PLC so that the PLC can do the required functions. Mostly the PLCs are programmed by a ladder diagram and a ladder diagram is a symbolic representation of a relay diagram. The program files are the part of the processor memory that stores the ladder diagram. The data file section in the processor would store the input and the output status, processor status.
- What are the different operating modes in PLC?
- Difference between Modular PLC & Compact PLC:
- What is Sinking and Sourcing?
- Comparison instructions of PLC
- Guidelines for PLC wiring
- How to wire a PLC to a control panel ?
How to do the programming in a PLC?
In order to create or change a program in a PLC certain items are needed and they are
- Programming device
- Programming software
- Connector cable
The PLC can be programmed by a PC, programming console, or it can be done by a hand programmer. The PLC program consists of machine code and this is a binary code which is the program instruction. The program software has the capability of offline and online program editing, online program monitoring, program documentation, it would check the PLC malfunctions, and also it would trouble shoot the controlled system. In a PLC we can use multiple languages and because of this, the program developer can select the program which is the best suited to do the task.
What is the PLC scan time?
The PLC would scan the input devices and it would update a memory part that indicates the status. While the PLC executes the program the PLC would create a memory table that shows if the output devices should be ON or OFF. The PLC would change the condition of the output devices with the help of the output table.
What are the programming devices in a PLC?
The programming devices are required for a PLC to enter the program into the memory of the processor. The program will be developed in the programming device and after that, it will be sent to the PLC memory.
The counters are required to count the number of operations, it can detect the pieces of numbers and events. Its operation is similar to the timers, the only difference is that the counters would count the number of operations or pulses while the timer would count the number of seconds. Mostly there are three types of counters, count-up counter in this type of counter will count from zero to set value which should reach to out a signal which serves a different process. In the count-down type, it would count from the set value to zero. In the count up/down type the counter would count up to the set value after it would out the signal after that it would count to reach zero and then out the signal.
The comparator would compare the present value to the set value then it would do the action according to the comparator type. Comparators are not performed alone it would use counters or output sensors which sends a present value.
The marker in the PLC is a storage unit it can store values from 8 bits to 16 bits
Sensors are used in a PLC to convert the physical condition into electrical signals so that PLC can use this. The input of the PLC will be connected to a sensor.
The actuators can convert the electrical signal from the PLC to physical conditions, the output of the PLC is connected with actuators.
It would provide output condition instruction which can provide time delay specifically. It can also control the outputs in other rungs by using the normally open and normally closed contacts.
What are the types of programming language used in a PLC?
- Ladder diagram
- Sequential functional chart
- Structured test
- Instruction list
- Functional block diagram
This type of programming language can be explained as a graphical programming language which is evolved from the electrical relay circuit. The program statement is a line that is called a rung with inputs to the left and the output to the right. The ladder diagram has one vertical line, the left line is the bus bar, and the lines on the right side are instruction lines. The ladder rung is true if it has logic continuity, this continuity would only exist if the power flows through the rung from left to right. The logical event execution would enable the output to give this continuity. The logic functions of the PLC are represented in a ladder logic diagram.
Sequential functional chart
This is really similar to flowchart programming, it consists of steps and transitions. Each step is represented by a box and this would contain one or more instructions. All the step in this is a command or action which could be either active or inactive. The flow control would pass from one step to the next through a conditional transition which could be true or false. So if the actions are done according to the instructions then the box will be exited. This type is only used for sequential data flows and it is composed of actions and transactions. This type of programming has only one initial step, the transition must follow a step and the step must follow a transition. The step would only become active if the prior transition is satisfied. The step could be inactive when the succeeding transition is satisfied and the step delay time has elapsed. A transition can be described as a condition which transfers control from one step to another. The transitions which follow the active, steps are solved and evaluated. This type of PLC language can handle the programming of advanced systems.
Structured test programming
This is a high-level language programming and it is similar to PASCAL. This language is widely used for industrial control applications. This language is very easy to use and to learn, it can do the compact formulation of the complex programming task. The instruction flow is controlled by powerful constructs and they are very useful for complex mathematic solutions. This type of PLC program consists of statements and the statement would have expressions and keywords. This type of program would allow conditions like if/case and loops. This type of programming would allow the formulation of numerous applications beyond pure function technology such as algorithmic problems and data handling.
This is a low-level textual language and its structure is similar to the assembler. In this type of PLC program, every line has operand and command and this is a very lightweight program.
Functional block programming
The major concept of functional block programming is the data flow, in this type of PLC language the values would flow from the inputs to the output, through functional blocks. This program is created by using a function box and this box will be connected together in order to do the exchange of data. The connecting lines would have a data type that must be compatible on both ends. This programming language would transform the textual programming into connecting building blocks.