Wiki source code of 06 Instructions

Version 3.1 by Jim on 2022/07/19 15:47

Show last authors
1 = **6.1.1 Basic program instruction list** =
2
3 (% class="table-bordered" %)
4 |**Instruction type**|**Instruction**|**Description**|(((
5 **LX3V(1S)**
6 )))|**LX3V (2N)**|**LX3VP**|**LX3VE**
7 |(% rowspan="25" %)[[Basic instructions>>path:/wiki/plc/view/2-User%20manual/6.Instruction/01.Basic%20instruction/]]|LD|Operation contact type NO (normally open)|¡|¡|¡|¡
8 |LDI|Operation contact type NC (normally closed)|¡|¡|¡|¡
9 |OUT|Final logical operation type coil drive|¡|¡|¡|¡
10 |AND|Serial connection of NO(normally open)|¡|¡|¡|¡
11 |ANI|Serial logical, operation contact type NC(normally closed) contacts|¡|¡|¡|¡
12 |OR|Parallel, connection of NO (normally open) contacts|¡|¡|¡|¡
13 |ORI|Parallel, connection of NC (normally closed) contacts|¡|¡|¡|¡
14 |LDP|Initial logical, operation -Rising edge pulse|¡|¡|¡|¡
15 |LDF|Initial logical, operation falling/trailing edge pulse|¡|¡|¡|¡
16 |ANDP|Serial connection of Rising edge pulse|¡|¡|¡|¡
17 |ANDF|Serial connection of falling/ trailing edge pulse|¡|¡|¡|¡
18 |ORP|Parallel, connection of NO Rising edge pulse|¡|¡|¡|¡
19 |ORF|Parallel connection of Falling/trailing edge pulse|¡|¡|¡|¡
20 |ORB|Serial connection of multiple parallel circuits|¡|¡|¡|¡
21 |ANB|Serial connection of multiple parallel circuits|¡|¡|¡|¡
22 |MPS|Stores the current result of the internal PLC operations|¡|¡|¡|¡
23 |MRD|Reads the current result of the internal PLC operations|¡|¡|¡|¡
24 |MPP|Pops (recalls and removes) the currently stored result|¡|¡|¡|¡
25 |MC|Denotes the start of a master control block|¡|¡|¡|¡
26 |MCR|Denotes the end of a master control block|¡|¡|¡|¡
27 |INV|Invert the current result of the internal PLC operations|¡|¡|¡|¡
28 |PLS|Rising edge pulse|¡|¡|¡|¡
29 |PLF|Falling / trailing edge pulse|¡|¡|¡|¡
30 |SET|Sets a bit device permanently ON|¡|¡|¡|¡
31 |RST|Resets a bit device permanently OFF|¡|¡|¡|¡
32
33 = **6.1.2 Step ladder instructions list** =
34
35 (% class="table-bordered" %)
36 |**Instruction type**|**Instruction**|**Description**|(((
37 **LX3V**
38
39 **(1S)**
40 )))|**LX3V (2N)**|**LX3VP**|**LX3VE**
41 |(% rowspan="2" %)[[Step ladder instructions>>path:/wiki/plc/view/2-User%20manual/6.Instruction/17.Step%20control%20instructions/]]|STL|STL programming start instruction|¡|¡|¡|¡
42 |RET|STL programming end instruction|¡|¡|¡|¡
43
44 = **6.1.3 Program Flow instruction list** =
45
46 (% class="table-bordered" %)
47 |(% style="width:241px" %)**Instruction type**|(% style="width:129px" %)**Instruction**|(% style="width:306px" %)**Description**|(((
48 **LX3V**
49
50 **(1S)**
51 )))|**LX3V (2N)**|**LX3VP**|**LX3VE**
52 |(% rowspan="7" style="width:241px" %)[[Program flow instructions>>path:/wiki/plc/view/2-User%20manual/6.Instruction/02.Program%20flow/]]|(% style="width:129px" %)CJ|(% style="width:306px" %)Conditional jump|¡|¡|¡|¡
53 |(% style="width:129px" %)CALL|(% style="width:306px" %)Call Subroutine|¡|¡|¡|¡
54 |(% style="width:129px" %)EI|(% style="width:306px" %)Enable Interrupt|¡|¡|¡|¡
55 |(% style="width:129px" %)DI|(% style="width:306px" %)Disable Interrupt|¡|¡|¡|¡
56 |(% style="width:129px" %)WDT|(% style="width:306px" %)Watchdog Timer|¡|¡|¡|¡
57 |(% style="width:129px" %)FOR|(% style="width:306px" %)Start of a For/Next Loop|¡|¡|¡|¡
58 |(% style="width:129px" %)NEXT|(% style="width:306px" %)End a For/Next Loop|¡|¡|¡|¡
59
60 = **6.1.4 Move and Compare instruction list** =
61
62 (% class="table-bordered" %)
63 |(% style="width:314px" %)**Instruction type**|(% style="width:146px" %)**Instruction**|**Description**|(((
64 **LX3V**
65
66 **(1S)**
67 )))|**LX3V (2N)**|**LX3VP**|**LX3VE**
68 |(% rowspan="10" style="width:314px" %)[[Move and Compare instructions>>path:/wiki/plc/view/2-User%20manual/6.Instruction/03.Move%20and%20campare/]]|(% style="width:146px" %)CMP|Compare |¡|¡|¡|¡
69 |(% style="width:146px" %)ZCP|Zone compare|¡|¡|¡|¡
70 |(% style="width:146px" %)MOV|Move |¡|¡|¡|¡
71 |(% style="width:146px" %)SMOV|Shift move|-|¡|¡|¡
72 |(% style="width:146px" %)CML|Compliment |-|¡|¡|¡
73 |(% style="width:146px" %)BMOV|Block move|¡|¡|¡|¡
74 |(% style="width:146px" %)FMOV|Fill move|-|¡|¡|¡
75 |(% style="width:146px" %)XCH|Exchange |-|¡|¡|¡
76 |(% style="width:146px" %)BCD|Binary coded decimal|¡|¡|¡|¡
77 |(% style="width:146px" %)BIN|Binary |¡|¡|¡|¡
78
79 = **6.1.5 Arithmetic and Logical Operations instruction list** =
80
81 (% class="table-bordered" %)
82 |(% style="width:358px" %)**Instruction type**|(% style="width:162px" %)**Instruction**|(% style="width:206px" %)**Description**|(((
83 **LX3V**
84
85 **(1S)**
86 )))|**LX3V (2N)**|**LX3VP**|**LX3VE**
87 |(% rowspan="10" style="width:358px" %)[[Arithmetic and Logical Operations instructions>>path:/wiki/plc/view/2-User%20manual/6.Instruction/06.Arithmetic%20and%20logical%20operations/]]|(% style="width:162px" %)ADD|(% style="width:206px" %)Addition |¡|¡|¡|¡
88 |(% style="width:162px" %)SUB|(% style="width:206px" %)Subtraction |¡|¡|¡|¡
89 |(% style="width:162px" %)MUL|(% style="width:206px" %)Multiplication |¡|¡|¡|¡
90 |(% style="width:162px" %)DIV|(% style="width:206px" %)Division |¡|¡|¡|¡
91 |(% style="width:162px" %)INC|(% style="width:206px" %)Increment|¡|¡|¡|¡
92 |(% style="width:162px" %)DEC|(% style="width:206px" %)Decrement|¡|¡|¡|¡
93 |(% style="width:162px" %)WAND|(% style="width:206px" %)Word AND|¡|¡|¡|¡
94 |(% style="width:162px" %)WOR|(% style="width:206px" %)Word OR|¡|¡|¡|¡
95 |(% style="width:162px" %)WXOR|(% style="width:206px" %)Word exclusive OR|¡|¡|¡|¡
96 |(% style="width:162px" %)NEG|(% style="width:206px" %)Negation |-|¡|¡|¡
97
98 = **6.1.6 Rotation and Shift instruction list** =
99
100 (% class="table-bordered" %)
101 |**Instruction type**|(% style="width:134px" %)**Instruction**|(% style="width:280px" %)**Description**|(((
102 **LX3V**
103
104 **(1S)**
105 )))|**LX3V (2N)**|**LX3VP**|**LX3VE**
106 |(% rowspan="10" %)[[Rotation and Shift instructions>>path:/wiki/plc/view/2-User%20manual/6.Instruction/08.Rotation%20and%20shift/]]|(% style="width:134px" %)ROR|(% style="width:280px" %)Rotation right|¡|¡|¡|¡
107 |(% style="width:134px" %)ROL|(% style="width:280px" %)Rotation left|¡|¡|¡|¡
108 |(% style="width:134px" %)RCR|(% style="width:280px" %)16-bit rotation right with carry|-|¡|¡|¡
109 |(% style="width:134px" %)RCL|(% style="width:280px" %)16-bit rotation left with carry|-|¡|¡|¡
110 |(% style="width:134px" %)SFTR|(% style="width:280px" %)(bit) shift right|¡|¡|¡|¡
111 |(% style="width:134px" %)SFTL|(% style="width:280px" %)(bit) shift left|¡|¡|¡|¡
112 |(% style="width:134px" %)WSFR|(% style="width:280px" %)word shift right|-|¡|¡|¡
113 |(% style="width:134px" %)WSFL|(% style="width:280px" %)word shift left|-|¡|¡|¡
114 |(% style="width:134px" %)SFWR|(% style="width:280px" %)shift register write|¡|¡|¡|¡
115 |(% style="width:134px" %)SFRD|(% style="width:280px" %)shift register read|¡|¡|¡|¡
116
117 = **6.1.7 Data operation instruction list** =
118
119 (% class="table-bordered" %)
120 |(% style="width:292px" %)**Instruction type**|(% style="width:135px" %)**Instruction**|(% style="width:266px" %)**Description**|(((
121 **LX3V**
122
123 **(1S)**
124 )))|**LX3V (2N)**|**LX3VP**|**LX3VE**
125 |(% rowspan="11" style="width:292px" %)[[Data operation instructions>>path:https://docs.we-con.com.cn/bin/view/PLC%20Editor/1%20User%20Manual/6.Instruction/04.Data%20operation/]]|(% style="width:135px" %)ZRST|(% style="width:266px" %)Zone reset|¡|¡|¡|¡
126 |(% style="width:135px" %)DECO|(% style="width:266px" %)Decode |¡|¡|¡|¡
127 |(% style="width:135px" %)ENCO|(% style="width:266px" %)Encode |¡|¡|¡|¡
128 |(% style="width:135px" %)SUM|(% style="width:266px" %)The sum of active bits|-|¡|¡|¡
129 |(% style="width:135px" %)BON|(% style="width:266px" %)Check specified bit status|-|¡|¡|¡
130 |(% style="width:135px" %)MEAN|(% style="width:266px" %)Mean |-|¡|¡|¡
131 |(% style="width:135px" %)ANS|(% style="width:266px" %)(timed) annunciator set|-|¡|¡|¡
132 |(% style="width:135px" %)ANR|(% style="width:266px" %)Annunciator reset|-|¡|¡|¡
133 |(% style="width:135px" %)SQR|(% style="width:266px" %)Square root|-|¡|¡|¡
134 |(% style="width:135px" %)FLT|(% style="width:266px" %)Float |-|¡|¡|¡
135 |(% style="width:135px" %)SWAP|(% style="width:266px" %)High and low bit conversion|-|¡|¡|¡
136
137 = **6.1.8 High-speed Processing Instruction** =
138
139 (% class="table-bordered" %)
140 |(% style="width:290px" %)**Instruction type**|(% style="width:137px" %)**Instruction**|**Description**|(((
141 **LX3V**
142
143 **(1S)**
144 )))|**LX3V (2N)**|**LX3VP**|**LX3VE**
145 |(% rowspan="10" style="width:290px" %)[[High-speed Processing Instruction>>path:/wiki/plc/view/2-User%20manual/6.Instruction/07.High%20speed%20process/]]|(% style="width:137px" %)REF|Refresh|¡|¡|¡|¡
146 |(% style="width:137px" %)REFF|Refresh and filter adjust|-|¡|¡|¡
147 |(% style="width:137px" %)MTR|Input matrix|¡|¡|¡|¡
148 |(% style="width:137px" %)DHSCR|High speed counter set|¡|¡|¡|¡
149 |(% style="width:137px" %)DHSCS|High speed counter reset|¡|¡|¡|¡
150 |(% style="width:137px" %)DHSZ|High speed counter zone compare|-|¡|¡|¡
151 |(% style="width:137px" %)SPD|Speed detect|¡|¡|¡|¡
152 |(% style="width:137px" %)PLSY|16-bit pulse Y output|¡|¡|¡|¡
153 |(% style="width:137px" %)PWM|Pulse width modulation|¡|¡|¡|¡
154 |(% style="width:137px" %)PLSR|Ramp pulse output|¡|¡|¡|¡
155
156 = **6.1.9 ECAM instruction list** =
157
158 (% class="table-bordered" %)
159 |**Instruction type**|**Instruction**|**Description**|(((
160 **LX3V**
161
162 **(1S)**
163 )))|**LX3V (2N)**|**LX3VP**|**LX3VE**
164 |(% rowspan="3" %)[[ECAM instruction>>path:/wiki/plc/view/2-User%20manual/6.Instruction/10.ECAM/]]|DECAM|ECAM configuration|-|-|-|¡
165 |DEGEAR|Electronic gear configuration|-|-|-|¡
166 |ECAMTBX|Create E-CAM datasheet|-|-|-|¡
167
168 = **6.1.10 External I/O Devices instruction list** =
169
170 (% class="table-bordered" %)
171 |**Instruction type**|**Instruction**|**Description**|(((
172 **LX3V**
173
174 **(1S)**
175 )))|**LX3V (2N)**|**LX3VP**|**LX3VE**
176 |(% rowspan="12" %)[[External I/O device instruction>>path:/wiki/plc/view/2-User%20manual/6.Instruction/09.External%20IO%20Devices/]]|TKY|Ten key input|-|¡|¡|¡
177 |HKY|Hexadecimal input|-|¡|¡|¡
178 |DSW|Digital switch (thumbwheel input)|¡|¡|¡|¡
179 |SEGD|Seven segment decoder|-|¡|¡|¡
180 |SEGL|Seven segment with latch|¡|¡|¡|¡
181 |ARWS|Arrow switch|-|¡|¡|¡
182 |ASC|ASCII code|-|¡|¡|¡
183 |PR|“print” to a display|-|¡|¡|¡
184 |FROM|Read from a special function block|¡|¡|¡|¡
185 |TO|Write to a special function block|¡|¡|¡|¡
186 |GRY|Converts binary integer to GRAY code|-|¡|¡|¡
187 |GBIN|Converts GRAY CODE to binary|-|¡|¡|¡
188
189 = **6.1.11 External Devices instruction list** =
190
191 (% class="table-bordered" %)
192 |**Instruction type**|**Instruction**|**Description**|(((
193 **LX3V**
194
195 **(1S)**
196 )))|**LX3V (2N)**|**LX3VP**|**LX3VE**
197 |(% rowspan="9" %)[[External devices instruction>>path:/wiki/plc/view/2-User%20manual/6.Instruction/13.External%20Device%20SER%20instruction/]]|RS|RS communications|¡|¡|¡|¡
198 |RS2|RS2 communications|¡|¡|¡|¡
199 |CPAVL|Serial port settings|¡|¡|¡|¡
200 |CPAVL|Ethernet port settings|¡|¡|¡|¡
201 |PRUN|Octal bit transmission|¡|¡|¡|¡
202 |ASCI|hexadecimal to ASCII|¡|¡|¡|¡
203 |HEX|ASCII to hexadecimal|¡|¡|¡|¡
204 |CCD|check code|¡|¡|¡|¡
205 |PID|PID control loop|¡|¡|¡|¡
206
207 = **6.1.12 Floating Point instruction list** =
208
209 (% class="table-bordered" %)
210 |**Instruction type**|**Instruction**|**Description**|(((
211 **LX3V**
212
213 **(1S)**
214 )))|**LX3V (2N)**|**LX3VP**|**LX3VE**
215 |(% rowspan="22" %)[[Floating point instruction>>path:/wiki/plc/view/2-User%20manual/6.Instruction/14.Floating%20calculation/]]|DECMP|Binary floating point data compare|-|¡|¡|¡
216 |DEZCP|Binary floating point zone compare|-|¡|¡|¡
217 |DEBCD|Binary to BCD floating point data conversion|-|¡|¡|¡
218 |DEBIN|BCD to Binary floating point data conversion|-|¡|¡|¡
219 |DEADD|Binary floating point addition|-|¡|¡|¡
220 |DESUB|Binary floating point subtraction|-|¡|¡|¡
221 |DEMUL|Binary floating point multiplication|-|¡|¡|¡
222 |DEDIV|Binary floating point division|-|¡|¡|¡
223 |DESQR|Binary floating point square root|-|¡|¡|¡
224 |INT|16-bit binary floating point to integer|-|¡|¡|¡
225 |DSIN|Sin operation|-|¡|¡|¡
226 |DCOS|Cosine operation|-|¡|¡|¡
227 |DTAN|Tangent operation|-|¡|¡|¡
228 |DASIN|Calculate radian value, according to the corresponding value of SIN|-|-|¡|¡
229 |DSINH|Binary floating point operation of Hyperbolic Sine function SINH|-|-|¡|¡
230 |DACOS|Calculate radian value, according to the corresponding value of COS|-|-|¡|¡
231 |DCOSH|Binary floating point operation of Hyperbolic Cosine function COSH|-|-|¡|¡
232 |DATAN|Calculate radian value, according to the corresponding value of TAN|-|-|¡|¡
233 |DTANH|Binary floating point operation of Hyperbolic Tangent function TANH|-|-|¡|¡
234 |DEXP|Perform exponent operation of binary floating-point number to base e (2.71828)|-|-|¡|¡
235 |DLOG10|Perform common logarithm operation of binary floating-point number to base 10|-|-|¡|¡
236 |DLOGE|Perform natural logarithm operation of binary floating-point number to base e (2.71828)|-|-|¡|¡
237
238 = **6.1.13 Positioning Instruction list** =
239
240 (% class="table-bordered" %)
241 |**Instruction type**|**Instruction**|**Description**|(((
242 **LX3V**
243
244 **(1S)**
245 )))|**LX3V (2N)**|**LX3VP**|**LX3VE**
246 |(% rowspan="5" %)[[Positioning instruction>>path:/wiki/plc/view/2-User%20manual/6.Instruction/12.Positioning%20control/]]|DABS|Absolute current value read|¡|¡|¡|¡
247 |ZRN|Setting of zero return speed|¡|¡|¡|¡
248 |PLSV|Variable speed pulse output|¡|¡|¡|¡
249 |DRVI|Relative position control|¡|¡|¡|¡
250 |DRVA|Absolute position control|¡|¡|¡|¡
251
252 **4.14 Real Time Clock Control**
253
254 (% class="table-bordered" %)
255 |**Instruction type**|**Instruction**|**Description**|(((
256 **LX3V**
257
258 **(1S)**
259 )))|**LX3V (2N)**|**LX3VP**|**LX3VE**
260 |(% rowspan="7" %)[[Real time clock control>>path:/wiki/plc/view/2-User%20manual/6.Instruction/05.Real%20time%20clock/]]|TCMP|time compare|¡|¡|¡|¡
261 |TZCP|time zone compare|¡|¡|¡|¡
262 |TADD|time addition|¡|¡|¡|¡
263 |TSUB|time subtraction|¡|¡|¡|¡
264 |TRD|read RTC data|¡|¡|¡|¡
265 |TWR|set RTC data|¡|¡|¡|¡
266 |HOUR|16-bit chronograph|¡|¡|¡|¡
267
268 = **6.1.14 Handy Instructions list** =
269
270 (% class="table-bordered" %)
271 |**Instruction type**|**Instruction**|**Description**|(((
272 **LX3V(1S)**
273 )))|**LX3V (2N)**|**LX3VP**|**LX3VE**
274 |(% rowspan="10" %)[[Handy instruction>>path:/wiki/plc/view/2-User%20manual/6.Instruction/11.Handy%20instructions/]]|IST|initial state|¡|¡|¡|¡
275 |SER|Search |-|¡|¡|¡
276 |ABSD|Absolute drum|¡|¡|¡|¡
277 |INCD|Incremental drum|¡|¡|¡|¡
278 |TTMR|Teaching timer|-|¡|¡|¡
279 |STMR|Special timer - definable|-|¡|¡|¡
280 |ALT|Alternate state|¡|¡|¡|¡
281 |RAMP|Ramp - variable value|¡|¡|¡|¡
282 |ROTC|Rotary table control|-|¡|¡|¡
283 |SORT|Sort data|-|¡|¡|¡
284
285 = **6.1.15 Circular interpolation instruction list** =
286
287 (% class="table-bordered" %)
288 |**Instruction type**|**Instruction**|**Decryption**|**LX3V**|**LX3VP**|**LX3VE**|**LX3VM**
289 |(% rowspan="6" %)[[Circular interpolation instruction>>path:/wiki/plc/view/2-User%20manual/6.Instruction/15.Circular%20interpolation%20instruction/]]|G90G01|Absolute position line interpolation|-|-|-|¡
290 |G91G01|Relative position line interpolation|-|-|-|¡
291 |G90G02|Absolute position of the clockwise circular interpolation|-|-|-|¡
292 |G91G02|Relative position clockwise circular interpolation|-|-|-|¡
293 |G90G03|Absolute position anticlockwise circular interpolation|-|-|-|¡
294 |G91G03|Relative position anticlockwise circular interpolation|-|-|-|¡
295
296 = **6.1.16 Inline Comparisons Instruction list** =
297
298 (% class="table-bordered" %)
299 |(% style="width:260px" %)**Instruction type**|(% style="width:107px" %)**Instruction**|(% style="width:345px" %)**Description**|(((
300 **LX3V**
301
302 **(1S)**
303 )))|**LX3V (2N)**|**LX3VP**|**LX3VE**
304 |(% rowspan="19" style="width:260px" %)Inline comparisons instruction|(% style="width:107px" %)LD=|(% style="width:345px" %)Comparison of 16-bit data (==)|¡|¡|¡|¡
305 |(% style="width:107px" %)LD>|(% style="width:345px" %)Comparison of 16-bit data (>|¡|¡|¡|¡
306 |(% style="width:107px" %)LD<|(% style="width:345px" %)Comparison of 16-bit data (<|¡|¡|¡|¡
307 |(% style="width:107px" %)LD<>|(% style="width:345px" %)Comparison of 16-bit data (<>|¡|¡|¡|¡
308 |(% style="width:107px" %)LD<=|(% style="width:345px" %)Comparison of 16-bit data (<=)|¡|¡|¡|¡
309 |(% style="width:107px" %)LD>=|(% style="width:345px" %)Comparison of 16-bit data (>=)|¡|¡|¡|¡
310 |(% style="width:107px" %)AND=|(% style="width:345px" %)Comparison of 16-bit data (==)|¡|¡|¡|¡
311 |(% style="width:107px" %)AND>|(% style="width:345px" %)Comparison of 16-bit data (>|¡|¡|¡|¡
312 |(% style="width:107px" %)AND<|(% style="width:345px" %)Comparison of 16-bit data (<|¡|¡|¡|¡
313 |(% style="width:107px" %)AND<>|(% style="width:345px" %)Comparison of 16-bit data (<>|¡|¡|¡|¡
314 |(% style="width:107px" %)AND<=|(% style="width:345px" %)Comparison of 16-bit data (<=)|¡|¡|¡|¡
315 |(% style="width:107px" %)AND>=|(% style="width:345px" %)Comparison of 16-bit data (>=)|¡|¡|¡|¡
316 |(% style="width:107px" %)OR=|(% style="width:345px" %)Comparison of 16-bit data (==)|¡|¡|¡|¡
317 |(% style="width:107px" %)ORD=|(% style="width:345px" %)Comparison of 32-bit data (==)|¡|¡|¡|¡
318 |(% style="width:107px" %)OR>|(% style="width:345px" %)Comparison of 16-bit data (>|¡|¡|¡|¡
319 |(% style="width:107px" %)OR<|(% style="width:345px" %)Comparison of 16-bit data (<|¡|¡|¡|¡
320 |(% style="width:107px" %)OR<>|(% style="width:345px" %)Comparison of 16-bit data (<>|¡|¡|¡|¡
321 |(% style="width:107px" %)OR<=|(% style="width:345px" %)Comparison of 16-bit data (<=)|¡|¡|¡|¡
322 |(% style="width:107px" %)OR>=|(% style="width:345px" %)Comparison of 16-bit data (>=)|¡|¡|¡|¡