Understanding PLC Function Instructions for Control Programming

Understanding PLC Function Instructions for Control Programming

For those just starting with PLCs, mastering the programming language and understanding instructions is one of the fundamental conditions. Regardless of how different your programming habits are from others, you must learn this element of instructions, as programming cannot do without its components. Below, let’s take a look at the extent of the application of these instructions.
1. Standard Contact Instructions
LD is the instruction for normally open contact, indicating a normally open contact connected to the input bus, which is the starting point for normally open contact logical operations.
LDN is the instruction for normally closed contact, indicating a normally closed contact connected to the input bus, which is the starting point for normally closed contact logical operations.
A is the instruction used for series connection of normally open contacts.
AX is the instruction used for series connection of normally closed contacts.
O is the instruction used for parallel connection of normally open contacts.
ON is the instruction used for parallel connection of normally closed contacts.
In the contact instructions LD, LDN, A, AN, O, ON, the data type of the variables is Boolean (BOOL). The instructions LD and LDN are used to connect contacts to the bus, while the instructions A, AN, O, and ON can be reused multiple times. However, when needing to connect more than two contacts in series to a parallel circuit block, the OLD instruction mentioned later should be used.

Example:

Understanding PLC Function Instructions for Control Programming

SIMATIC basic instruction summary for S7-200:

Understanding PLC Function Instructions for Control Programming

Understanding PLC Function Instructions for Control Programming

2. Parallel Connection Instruction for Series Circuit Blocks OLD
A circuit with two or more contacts connected in series is called a series circuit block. When parallel connecting a series circuit block, the branch starts with LD or LDN instructions, and ends with the OLD instruction. The OLD instruction, along with the ALD instruction mentioned later, are both targetless element instructions, and both have a step size of one program step. OLD is sometimes referred to as a block instruction.
3. Series Connection Instruction for Parallel Circuits ALD
A circuit with two or more contacts in parallel is called a parallel circuit block. When the branch circuit of the parallel circuit block is connected in series with the previous circuit, the ALD instruction is used. The starting point of the branch uses LD or LDN instructions, and after the parallel circuit ends, the ALD instruction is used to connect in series with the previous circuit. The ALD instruction is also referred to as a block instruction, and ALD is also a targetless element, functioning as a program step instruction.
4. Output Instruction =
1. The = output instruction directly connects the coils of relays, timers, counters, etc., to the right side of the ladder diagram bus, and no contacts are allowed on the right side of the coils. In programming, contacts can be reused, and their types and quantities are not limited.
5. Set and Reset Instructions S, R
S is the set instruction, which keeps the action; R is the reset instruction, which keeps the operation reset. The registers at N points starting from the specified position are set or reset, where N=1-255. If the specified reset is for a timer bit or counter bit, it will clear the current value of the timer or counter.
6. Edge Contact EU, ED
Positive edge contact detects a positive edge (the input signal of the contact goes from 0 to 1), while negative edge contact detects a negative edge (the input signal of the contact goes from 1 to 0). The contacts are activated for one scanning cycle. The positive/negative edge symbols are EU and ED, which have no operands; the “P” and “N” in the contact symbols represent positive and negative edges, respectively.
7. No Operation Instruction NOP
The NOP instruction is a no-action, targetless element step instruction. The no-operation instruction makes that step a no-operation. The NOP instruction can replace previously written instructions, allowing circuit modifications. Adding the NOP instruction in the program can reduce changes in step numbers when modifying or appending the program.
8. Program End Instruction END
END is a targetless step instruction. PLC repeatedly processes input, performs program calculations, and processes output. Writing the END instruction at the end of the program indicates the end of the program, proceeding directly to output processing. During program debugging, END instructions can be inserted segmentally, allowing for sequential expansion of checks on actions of each program segment. Using the END instruction divides the program into several segments; after confirming the correctness of the actions in the preceding circuit block, the END instructions can be sequentially removed. It should be noted that when executing the END instruction, the monitoring clock is also refreshed.

Source: Network,Copyright belongs to the original author. If there are copyright issues with the works, please contact us for deletion in a timely manner, thank you!

    Free Access to Robot Learning Materials ↓

    Understanding PLC Function Instructions for Control Programming

    Understanding PLC Function Instructions for Control Programming

    Understanding PLC Function Instructions for Control Programming

Understanding PLC Function Instructions for Control Programming

ZHINANCHE

Guidance Car Intelligent Manufacturing Trainingis positioned to establish an intelligent manufacturing ecosystem service system centered on robot automation engineers, using engineer education as an entry point to deliver quality engineers to the intelligent manufacturing industry. Bases and branch offices have been established nationwide, including Nanjing, Taizhou, Shanghai, equipped withinternationally advanced intelligent manufacturing equipment, including collaborative robots, SCARA robots, Delta robots, joint robots, six-axis robots, brands like UR, ABB, KUKA, FANUC, YASKAWA, and Estun. Additionally, there are multiple intelligent manufacturing production lines, covering from Industrial 1.0 to Industrial 4.0 production lines and digital twins.Under the background of Industry 4.0 and Made in China 2025, we support traditional manufacturing enterprises in China to complete the transformation of machines replacing humans!

Understanding PLC Function Instructions for Control Programming

Click “Read Original” to register and inquire about robot courses

Leave a Comment