Functional instructions are also called special instructions. The functional instructions provided by the CPM1A series PLC are mainly used to realize program control, data processing and arithmetic operations. This type of instruction generally does not have a corresponding instruction key on the simple programmer, but only specifies a function code for each instruction, represented by two digits. When entering this type of instruction, first press the "FUN" key, and then press the corresponding code. The following will introduce some commonly used functional instructions.
1. No operation instruction NOP (0 0)
This instruction does not perform any logical operation, so it is called a no-operation, nor does it use relays or operands. This instruction is used to leave an address in the program so that instructions can be inserted when debugging the program, and can also be used to fine-tune the scan time.
2. End command END (01)
This instruction is used alone, without operands, and is the last instruction of the program, indicating that the program ends here. When the PLC executes the user program, when it executes the END instruction, it stops executing the program and enters the output refresh stage. If the END instruction is omitted in the program, the programmer will display an error signal when executing: "NO END INSET": Only when the END instruction is added can the PLC run normally. This instruction can also be used to debug the program in sections.
3. Interlock instruction IL (02) and interlock clear instruction ILC (0 3)
These two instructions do not carry operands. The IL instruction is an interlocking condition, forming a branch circuit, i.e. a new bus for use with the LD instruction, indicating the beginning of the interlocking program segment; the ILC instruction indicates the end of the interlocking program segment.
The interlock instruction IL and the interlock clear instruction ILC are used to form a new bus at the branch of the ladder diagram, so that a part of the ladder diagram is controlled by certain conditions. The IL and ILC instructions should be used in pairs, otherwise an error will occur. The function of the IL/ILC instruction is: if the condition for controlling IL is met (i.e. ON), the interlock instruction is executed. If the condition for controlling IL is not met (i.e. OFF), the interlock program segment between IL and ILC is not executed, that is, all relays between IL/ILC are OFF, at which time all timers will be reset, but all counters, shift registers and holding relays will maintain the current values.
4. Jump start instruction JMP (0 4) and jump end instruction JME (0 5)
These two instructions do not have operands. The JMP instruction indicates the beginning of program transfer, and the JME instruction indicates the end of program transfer.
The JMP/JME instruction group is used to control program branching. When the JMP condition is OFF, the program will execute the first instruction after JME; when the JMP condition is ON, the entire ladder diagram will be executed in sequence, as if the JMP/JME instruction does not exist.
When using JMP/JME instructions, please note that if the JMP condition is OFF, the relay status between JMP/JME is: the output relay maintains the current status; the timer/counter and shift register all maintain the current value. In addition, the JMP/JME instructions should be used in pairs, otherwise the PLC display will be wrong.
5. Bit-by-bit shift instruction SFT (10)
Also known as the shift register instruction, this instruction has two operands, in channels, the first operand is the first channel number D1, the second operand is the last channel number D2. The relays used are: 000CH~019CH, 200CH~252CH, HR00~HR19. Its function is equivalent to a serial input shift register.
The shift register has a data input terminal (IN), a shift clock terminal (CP) and a reset terminal (R). It must be programmed in the order of input (IN), clock (CP), reset (R) and SFT instructions. When the shift clock turns from OFF to ON, the contents of the (D1~D2) channels are shifted one bit in order from low to high. The highest bit overflows and is lost, and the lowest bit is filled with input data. When the reset terminal input is ON, all channel data involved in the shift are reset, that is, all are OFF.
If more than 16 bits of data need to be shifted, several channel stages can be chained together.
When using the shift instruction, please note that the starting channel and the ending channel must be in the same relay and the starting channel number ≤ the ending channel number.
6. Latch instruction KEEP (11)
The operands used in this instruction are: 01000~01915, 20000~25515, HR0000~HR1915. Its function is equivalent to a latch. When the set terminal (S terminal) condition is ON, the KEEP relay remains in the ON state. Even if the S terminal condition changes to OFF, the KEEP relay still remains ON until the reset terminal (R terminal) condition is ON, then it changes to OFF. The KEEP instruction is mainly used to hold the coil, that is, the self-locking circuit of the relay can be realized by the KEEP instruction. If the SET terminal and the RES terminal are ON at the same time, the KEEP relay will turn OFF first. The latch relay instruction must be written in the order of the set line (S terminal), the reset line (R terminal) and the KEEP relay.
7. Leading edge differential pulse instruction DIFU (13) and trailing edge differential pulse instruction DIFD (14)
This instruction uses the following operands: 01000~01915, 20000~25515, HR0000~HR1915. The function of DIFU is to release the specified relay after one scan cycle is connected at the leading (rising) edge of the input pulse, while the function of DIFD is to release the specified relay after one scan cycle is connected at the trailing (falling) edge of the input pulse.
Previous article:Convert PLC ladder diagram into STL program
Next article:Usage of USS protocol library instructions
Recommended ReadingLatest update time:2024-11-16 13:07
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Show off the Sony headphones I got from EEWORLD
- Single tube amplifier
- TMS320F28335 SVPWM source program
- 【RPi PICO】CircuitPython Firmware
- Microwave Circuit Appreciation
- Microcontroller learning notes, teach you how to learn in three steps!
- msp430f5529 uart pwm adc
- [DIY Bing Dun Dun] + Limited Edition Homemade Dun Dun is here
- EEWORLD University Hall----Live Replay: Unlocking New Possibilities of TI Sitara AM2x MCU in Motor Drive
- 02.USART routines and tests