0% found this document useful (0 votes)
60 views

Basic Instruction

The document describes various instruction types for PLC programming including: - Basic instructions for logic operations, timers, outputs, and program flow. - Applied instructions for loop control, arithmetic, data movement, I/O, and communication. - Floating point instructions for comparisons, conversions, and mathematical operations on floating point numbers. The instructions are grouped into categories like logic, timers, arithmetic, communication, and provide basic and advanced functionality for automation control and programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views

Basic Instruction

The document describes various instruction types for PLC programming including: - Basic instructions for logic operations, timers, outputs, and program flow. - Applied instructions for loop control, arithmetic, data movement, I/O, and communication. - Floating point instructions for comparisons, conversions, and mathematical operations on floating point numbers. The instructions are grouped into categories like logic, timers, arithmetic, communication, and provide basic and advanced functionality for automation control and programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Basic Instruction:

General Output Timers, counters Main control Rising-edge/Falling-edge detection Rising-edge/falling-


edge output End Other Step ladder

Application Instruction:
Loop control Transmission comparison Four fundamental operations of arithmetic Rotation and displacement
Data operation High speed processing Convenience instruction External I/O display Serial I/O
Communication instruction Floating operation Additional instruction Positioning control Perpetual calendar
Gray code Matrix operation Contact type logic operation Contact type comparison instruction Specific bit
control Floating point contact type comparison

Basic Instruction:
General:
LD Load A contact
LDI Load B contact
AND Series connection- A contact
ANI Series connection- B contact
OR Parallel connection- A contact
ORI Parallel connection- B contact
ANB Series connection (Multiple circuits)
ORB Parallel connection (Multiple circuits)
MPS Store the current result of the internal PLC operations
MRD Reads the current result of the internal PLC operations
MPP Pops (recalls and removes) the currently stored result

Output:
OUT Output coil
SET Latch (ON)
RST Clear the contacts or the registers

Timers, counters:
96 TMR 16-bit timer
97 CNT 16-bit counter
97 DCNT 32-bit counter
258 ATMR 16-bit contact type timer

Main control:
MC Master control Start
MCR Master control Reset

Rising-edge/Falling-edge detection:
90 LDP Rising-edge detection operation
91 LDF Falling-edge detection operation
92 ANDP Rising-edge series connection
93 ANDF Falling-edge series connection
94 ORP Rising-edge parallel connection
95 ORF Falling-edge parallel connection

Rising-edge/Falling-edge output:
89 PLS Rising-edge output
99 PLF Falling-edge output

End:
END Program end

Other:
NOP No operation
98 INV Inverting operation
P Pointer
I Interrupt program marker
NP Negative contact to positive contact

PN Positive contact to negative contact

Step ladder:
STL Step transition ladder start command
RET Step transition ladder return command
Applied Instruction:
Loop control:
00 CJ Conditional jump
01 CALL Call subroutine
02 SRET Subroutine return
03 IRET Interrupt return
04 EI Enable interrupts
05 DI Disable interrupts
06 FEND First end
07 WDT Watchdog timer refresh
08 FOR Start of FOR-NEXT loop
09 NEXT End of FOR-NEXT loop

Transmission comparison:
10 CMP Compare
11 ZCP Zone compare
12 MOV Data move
13 SMOV Shift move
14 CML Compliment
15 BMOV Block move
16 FMOV Fill move
17 XCH Data exchange
18 BCD Convert BIN data into BCD
19 BIN Convert BCD data into BIN

Four fundamental operations of arithmetic:


20 ADD Perform the addition of BIN data
21 SUB Perform the subtraction of BIN data
22 MUL Perform the multiplication of BIN data
23 DIV Perform the division of BIN data
24 INC Perform the addition of 1
25 DEC Perform the subtraction of 1
26 WAND / DAND Perform the logical product (AND) operation

27 WOR / DOR Perform the logical sum (OR) operation


28 WXOR / DXOR Perform the exclusive logical add (XOR) operation

29 NEG Negation
114 MUL16 / MUL32 16-bit / 32-bit multiplication

115 DIV16 / DIV32 16-bit / 32-bit division

Rotation and displacement:


30 ROR Rotate to the right
31 ROL Rotate to the left
32 RCR Rotate to the right with the carry flag attached
33 RCL Rotate to the left with the carry flag attached
34 SFTR Shift the data of device specified to the right
35 SFTL Shift the data of device specified to the left
36 WSFR Shift the register to the right
37 WSFL Shift the register to the left
38 SFWR Shift register write
39 SFRD Shift register read

Data operation:
40 ZRST Resets a range of device specified
41 DECO 8 → 256 bits decoder
42 ENCO 256 → 8 bits encoder
43 SUM Sum of ON bits
44 BON Check specified bit status
45 MEAN Mean value
46 ANS Alarm device output
47 ANR Alarm device reset
48 SQR Square root of BIN
49 FLT Convert BIN integer to binary floating point

High speed processing:


50 REF I/O refresh
51 REFF Refresh and adjust the response time of input filter
52 MTR Input matrix
53 DHSCS High speed counter comparison SET
54 DHSCR High speed counter comparison RESET
55 DHSZ Zone comparison (High-speed counter)
56 SPD Speed detection
57 PLSY Pulse output
58 PWM Pulse width modulation output
59 PLSR Pulse wave output with acceleration/deceleration speed

Convenience instruction:
60 IST Manual/Auto control
61 SER Search a data stack
62 ABSD Absolute drum sequencer
63 INCD Increment drum sequencer
64 TTMR Teaching timer
65 STMR Special timer
66 ALT On/Off alternate command
67 RAMP Ramp signal
68 DTM Data transform and move
69 SORT Data sort

External I/O display:


70 TKY 10-key keypad input
71 HKY 16-key keypad input
72 DSW Digital Switch input
73 SEGD Decode the 7-step display panel
74 SEGL 7-step display scan output
75 ARWS Arrow keypad input
76 ASC ASCII code conversion
77 PR Output ASCII code

Serial I/O:
78 FROM Read special module CR data
79 TO Special module CR data write in
80 RS Serial data communication
81 PRUN Octal number system transmission
82 ASCI Convert HEX to ASCII
83 HEX Convert ASCII to HEX
84 CCD Check code
85 VRRD Potentiometer read
86 VRSC Potentiometer scale
87 ABS Absolute value
88 PID PID calculation

Communication instruction:
100 MODRD MODBUS data Read
101 MODWR MODBUS data write in
102 FWD VFD-A series drive forward instruction
103 REV VFD-A series drive reverse instruction
104 STOP VFD-A series drive stop instruction
105 RDST VFD-A series drive status read
106 RSTEF VFD-A series drive abnormal reset
107 LRC LRC error check
108 CRC CRC error check
113 ETHRW Ethernet communication
150 MODRW MODBUS data read/write in
206 ASDRW ASDA servo drive R/W
295 DMVRW DMV communication command

Floating operation:
110 DECMP Binary floating point comparison
111 DEZCP Binary floating point zone comparison
112 DMOVR Floating point data Move
116 DRAD Degree → Radian
117 DDEG Radian → Degree
118 DEBCD Convert binary floating point to decimal floating point
119 DEBIN Convert decimal floating point to binary floating point
120 DEADD Binary floating point addition
121 DESUB Binary floating point subtraction
122 DEMUL Binary floating point multiplication
123 DEDIV Binary floating point division
124 DEXP Perform exponent operation of binary floating point
125 DLN Perform natural logarithm operation of binary floating point
126 DLOG Perform logarithm operation of binary floating point
127 DESQR Square root of binary floating point
128 DPOW Perform power operation of binary floating point
129 INT Convert binary floating point to BIN integer
130 DSIN Sine operation of binary floating point
131 DCOS Cosine operation of binary floating point
132 DTAN Tangent operation of binary floating point
133 DASIN Arcsine operation of binary floating point
134 DACOS Arccosine operation of binary floating point
135 DATAN Arctangent operation of binary floating point
136 DSINH Hyperbolic sine operation of binary floating point
137 DCOSH Hyperbolic cosine operation of binary floating point
138 DTANH Hyperbolic tangent operation of binary floating point
172 DADDR Floating point number addition
173 DSUBR Floating point number subtraction
174 DMULR Floating point number multiplication
175 DDIVR Floating point number division

Additional instruction:
143 DELAY Command delay
144 GPWM General pulse width modulation output
145 FTC Fuzzy temperature control
146 CVM Valve control
147 SWAP Swap high/low byte
148 MEMR Data backup MEMORY read
149 MEMW Data backup MEMORY write in
151 PWD Input pulse width detection
152 RTMU Start to measure the execution tine of I interrupt
153 RTMD End to measure the execution tine of I interrupt
154 RAND Random value
168 MVM Mask and combine designated bits
176 MMOV Magnifying transfer with sign extension
177 GPS GPS data receiving
178 DSPA Solar cell positioning
179 WSUM Sum of multiple devices
196 HST High speed timer
202 SCAL Proportional calculation
203 SCLP Parameter proportional calculation
205 CMPT Compare table
207 CSFO Catch speed and proportional output

Positioning control:
155 DABSR ABS current value read
156 ZRN Zero point return
157 PLSV Variable speed pulse output
158 DRVI Drive to increment
159 DRVA Drive to absolute
191 DPPMR 2-axis relative position arc interpolation
192 DPPMA 2-axis absolute position arc interpolation
193 DCIMR 2-axis relative point-to-point movement
194 DCIMA 2-axis absolute point-to-point movement
195 DPTPO Single axis planned table pulse output
197 DCLLM Close loop position control
198 DVSPO Variable speed pulse output
199 DICF Immediately change frequency

Perpetual calendar:
160 TCMP Time compare
161 TZCP Time zone compare
162 TADD Time addition
163 TSUB Time subtraction
166 TRD Time data read
167 TWR Time data write in
169 HOUR Hour meter

Gray code:
170 GRY Convert BIN to Gray code
171 GBIN Convert Gray code to BIN

Matrix operation:
180 MAND Matrix AND
181 MOR Matrix OR
182 MXOR Matrix XOR
183 MXNR Matrix NOR
184 MINV Matrix inverse
185 MCMP Matrix compare
186 MBRD Matrix bit read
187 MBWR Matrix bit write
188 MBS Matrix bit shift
189 MBR Matrix bit rotate
190 MBC Matrix bit state count

Contact type logic operation:


215 LD& Comparison contact is ON when S1 & S2 is true
216 LD| Comparison contact is ON when S1 | S2 is true
217 LD^ Comparison contact is ON when S1 ^ S2 is true
218 AND& Comparison contact is ON when S1 & S2 is true
219 AND| Comparison contact is ON when S1 | S2 is true
220 AND^ Comparison contact is ON when S1 ^ S2 is true
221 OR& Comparison contact is ON when S1 & S2 is true
222 OR| Comparison contact is ON when S1 | S2 is true
223 OR^ Comparison contact is ON when S1 ^ S2 is true

Contact type comparison instruction:


224 LD= Comparison contact is ON when S1 = S2 is true
225 LD> Comparison contact is ON when S1 > S2 is true
226 LD< Comparison contact is ON when S1 < S2 is true
228 LD<> Comparison contact is ON when S1 ≠ S2 is true
229 LD<= Comparison contact is ON when S1 ≦ S2 is true
230 LD>= Comparison contact is ON when S1 ≧ S2 is true
232 AND= Comparison contact is ON when S1 = S2 is true
233 AND> Comparison contact is ON when S1 > S2 is true
234 AND< Comparison contact is ON when S1 < S2 is true
236 AND<> Comparison contact is ON when S1 ≠ S2 is true
237 AND<= Comparison contact is ON when S1 ≦ S2 is true
238 AND>= Comparison contact is ON when S1 ≧ S2 is true
240 OR= Comparison contact is ON when S1 = S2 is true
241 OR> Comparison contact is ON when S1 > S2 is true
242 OR< Comparison contact is ON when S1 < S2 is true
244 OR<> Comparison contact is ON when S1 ≠ S2 is true
245 OR<= Comparison contact is ON when S1 ≦ S2 is true
246 OR>= Comparison contact is ON when S1 ≧ S2 is true
296 LDZ> Comparison contact is ON when | S1 - S2 | > | S3 | is true
297 LDZ>= Comparison contact is ON when | S1 - S2 | ≧ | S3 | is true
298 LDZ< Comparison contact is ON when | S1 - S2 | < | S3 | is true
299 LDZ<= Comparison contact is ON when | S1 - S2 | ≦ | S3 | is true
300 LDZ= Comparison contact is ON when | S1 - S2 | = | S3 | is true
301 LDZ<> Comparison contact is ON when | S1 - S2 | ≠ | S3 | is true
302 ANDZ> Comparison contact is ON when | S1 - S2 | > | S3 | is true
303 ANDZ>= Comparison contact is ON when | S1 - S2 | ≧ | S3 | is true
304 ANDZ< Comparison contact is ON when | S1 - S2 | < | S3 | is true
305 ANDZ<= Comparison contact is ON when | S1 - S2 | ≦ | S3 | is true
306 ANDZ= Comparison contact is ON when | S1 - S2 | = | S3 | is true
307 ANDZ<> Comparison contact is ON when | S1 - S2 | ≠ | S3 | is true
308 ORZ> Comparison contact is ON when | S1 - S2 | > | S3 | is true
309 ORZ>= Comparison contact is ON when | S1 - S2 | ≧ | S3 | is true
310 ORZ< Comparison contact is ON when | S1 - S2 | < | S3 | is true
311 ORZ<= Comparison contact is ON when | S1 - S2 | ≦ | S3 | is true
312 ORZ= Comparison contact is ON when | S1 - S2 | = | S3 | is true
313 ORZ<> Comparison contact is ON when | S1 - S2 | ≠ | S3 | is true

Specific bit control:


266 BOUT Output specified bit of a word
267 BSET Set ON specified bit of a word
268 BRST Reset specified bit of a word
269 BLD Load NO contact by specified bit
270 BLDI Load NC contact by specified bit
271 BAND Connect NO contact in series by specified bit
272 BANI Connect NC contact in series by specified bit
273 BOR Connect NO contact in parallel by specified bit
274 BORI Connect NC contact in parallel by specified bit

Floating point contact type comparison:


275 FLD= Floating point contact type comparison
276 FLD> Floating point contact type comparison
277 FLD< Floating point contact type comparison
278 FLD<> Floating point contact type comparison
279 FLD<= Floating point contact type comparison
280 FLD>= Floating point contact type comparison
281 FAND= Floating point serial type comparison
282 FAND> Floating point serial type comparison
283 FAND< Floating point serial type comparison
284 FAND<> Floating point serial type comparison
285 FAND<= Floating point serial type comparison
286 FAND>= Floating point serial type comparison
287 FOR= Floating point parallel type comparison
288 FOR> Floating point parallel type comparison
289 FOR< Floating point parallel type comparison
290 FOR<> Floating point parallel type comparison
291 FOR<= Floating point parallel type comparison
292 FOR>= Floating point parallel type comparison

You might also like