Changes for page 04 Program flow
Last modified by Devin Chen on 2024/01/28 11:38
From version 9.1
edited by Devin Chen
on 2024/01/28 11:38
on 2024/01/28 11:38
Change comment:
There is no comment for this version
Summary
-
Page properties (4 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -04 Program flow 1 +04 Program flow instructions - Parent
-
... ... @@ -1,1 +1,1 @@ 1 -PLC Editor2.WebHome 1 +PLC Editor2.1 User manual.2\.1 LX5V user manual.WebHome - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. DevinChen1 +XWiki.admin - Content
-
... ... @@ -38,8 +38,6 @@ 38 38 1. Each scan is executed. 39 39 1. One scan is executed. 40 40 41 -(% class="box infomessage" %) 42 -((( 43 43 **✎Note: ** 44 44 45 45 After turning ON the coil of the timer, if the timer whose coil is ON is jumped by the CJ(P) instruction, the measurement will not be performed normally. ... ... @@ -47,7 +47,6 @@ 47 47 When the OUT instruction is jumped by the CJ(P) instruction, the scan time will be shorter. 48 48 49 49 When the CJ(P) instruction is used to jump backward, the scan time will be longer. 50 -))) 51 51 52 52 For the CJ(P) instruction, you can jump to a step smaller than the step number being executed. However, in order to avoid the time limit of the watchdog timer, a method of jumping out of the loop during this period should be considered. 53 53 ... ... @@ -160,33 +160,41 @@ 160 160 In the above program, if each input changes during the jump, the action of each coil is shown in the following table. 161 161 162 162 (% class="table-bordered" %) 163 -|(% style="width:235px" %)**Content**|(% style="width:292px" %)**Contact state before jump**|(% style="width:549px" %)**Coil action in jump** 164 -|(% rowspan="2" style="width:235px" %)((( 165 -Y,M,S (Y1, M1, S1) 166 -)))|(% style="width:292px" %)X1, X2, X3 OFF|(% style="width:549px" %)Y1, M1, S1 OFF 167 -|(% style="width:292px" %)X1, X2, X3 ON|(% style="width:549px" %)Y1, M1, S1 ON 168 -|(% rowspan="2" style="width:235px" %)((( 169 -1ms, 10ms, 100ms timer (T0) 170 -)))|(% style="width:292px" %)X4 OFF|(% style="width:549px" %)Timer not working 171 -|(% style="width:292px" %)X4 ON|(% style="width:549px" %)Timer interrupt (continue after X0 OFF) 172 -|(% rowspan="2" style="width:235px" %)((( 173 -Program timer (T192) 174 -)))|(% style="width:292px" %)X5 OFF, X6 OFF|(% style="width:549px" %)Timer not working, but the timer is reset when X13 is ON 175 -|(% style="width:292px" %)X5 OFF, X6 ON|(% style="width:549px" %)Timing continues (contact action after X0 OFF) 176 -|(% rowspan="2" style="width:235px" %)((( 177 -Counter (C0) 178 -)))|(% style="width:292px" %)X7 OFF, X10 OFF|(% style="width:549px" %){{id name="OLE_LINK160"/}}Counting interrupt, but it is reset when X13 is ON 179 -|(% style="width:292px" %)X7 OFF, X10 ON|(% style="width:549px" %)Count interruption (continue after X0 OFF) 180 -|(% rowspan="2" style="width:235px" %)((( 160 +|**Content**|**Contact state before jump**|**Coil action in jump** 161 +|(% rowspan="2" %)((( 162 +Y,M,S 163 + 164 +(Y1, M1, S1) 165 +)))|X1, X2, X3 OFF|Y1, M1, S1 OFF 166 +|X1, X2, X3 ON|Y1, M1, S1 ON 167 +|(% rowspan="2" %)((( 168 +1ms, 10ms, 100ms timer 169 + 170 +(T0) 171 +)))|X4 OFF|Timer not working 172 +|X4 ON|Timer interrupt (continue after X0 OFF) 173 +|(% rowspan="2" %)((( 174 +Program timer 175 + 176 +(T192) 177 +)))|X5 OFF, X6 OFF|Timer not working, but the timer is reset when X13 is ON 178 +|X5 OFF, X6 ON|Timing continues (contact action after X0 OFF) 179 +|(% rowspan="2" %)((( 180 +Counter 181 + 182 +(C0) 183 +)))|X7 OFF, X10 OFF|{{id name="OLE_LINK160"/}}Counting interrupt, but it is reset when X13 is ON 184 +|X7 OFF, X10 ON|Count interruption (continue after X0 OFF) 185 +|(% rowspan="2" %)((( 181 181 Application instructions 182 182 183 183 (MOV) 184 -)))| (% style="width:292px" %)X11 OFF|(% rowspan="2"style="width:549px"%)(((189 +)))|X11 OFF|(% rowspan="2" %)((( 185 185 Single-cycle application instructions are not executed in the jump 186 186 187 187 Multi-cycle application instructions are partially executable (such as high-speed pulse instructions) 188 188 ))) 189 -| (% style="width:292px" %)X11 ON194 +|X11 ON 190 190 191 191 **(3) The relationship between CJ instruction and MC to MCR jump** 192 192 ... ... @@ -216,13 +216,15 @@ 216 216 (% class="table-bordered" %) 217 217 |(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|((( 218 218 **Offset modification** 219 -)))|( % style="width:211px" %)(((224 +)))|((( 220 220 **Pulse extension** 221 -)))|(% style="width:214px" %)**other** 222 -|**[D]**|(% style="width:211px" %)**XXP**|(% style="width:214px" %)((( 223 -**Subroutine name** 226 +)))|**other** 227 +|**[D]**|**XXP**|((( 228 +**Subroutine** 229 + 230 +**name** 224 224 ))) 225 -|CALL|Parameter 1| | (% style="width:211px" %)●|(% style="width:214px" %)●232 +|CALL|Parameter 1| |●|● 226 226 227 227 Parameter 1 can only use the subroutine name. 228 228 ... ... @@ -241,8 +241,6 @@ 241 241 (% style="text-align:center" %) 242 242 [[image:4_html_29c8e378dfb34066.png||class="img-thumbnail"]] 243 243 244 -(% class="box infomessage" %) 245 -((( 246 246 **✎Note: ** 247 247 248 248 • Multiple CALL(P) instructions can call the same subprogram, but subprograms with the same program name are not allowed. ... ... @@ -252,7 +252,6 @@ 252 252 • If the 1ms accumulative timer is used in a subroutine (the same in an interrupt program), when it reaches the set value, the output contact will act when the first coil instruction is executed (when the subroutine is executed), so be careful. 253 253 254 254 • The devices that are turned on in the subprogram (the same in the interrupt program) will be retained after the program ends. Therefore, these devices should be reset in the main program after the end of the program. 255 -))) 256 256 257 257 **Error code** 258 258 ... ... @@ -264,7 +264,7 @@ 264 264 265 265 **(1) New subroutine** 266 266 267 -Project management→Subroutine→Right click to create 271 +Project management→Subroutine→ Scan→Right click to create 268 268 269 269 (% style="text-align:center" %) 270 270 [[image:4_html_3d0d21476f0bb476.png||class="img-thumbnail"]] ... ... @@ -329,7 +329,7 @@ 329 329 • When the EI and DI instructions are not enabled, they all maintain the original enabled or forbidden interrupt program execution status. The currently disabled interrupt priority can be viewed in SD151. 330 330 331 331 (% class="table-bordered" %) 332 -|SD151| (% style="width:297px" %)Currently disabled interrupt priority|(% style="width:571px" %)(((336 +|SD151|Currently disabled interrupt priority|((( 333 333 According to the interrupt prohibition instruction (DI instruction), the interrupt prohibition instruction (DI instruction) below the specified priority, and the interrupt enable instruction (EI instruction), the priority of the interrupt prohibition will be stored. 334 334 335 335 0: All priority interrupts are disabled (default); ... ... @@ -339,7 +339,7 @@ 339 339 2: Priority 2 interrupt is prohibited; 340 340 341 341 3: All priority interrupts are allowed 342 -)))| (% style="width:148px" %)R(read only)346 +)))|R(read only) 343 343 344 344 A: Sequence control program 345 345