Changes for page 01 Program execution

Last modified by Jiahao Lai on 2025/07/18 17:39

From version 35.1
edited by Leo Wei
on 2024/12/24 22:42
Change comment: There is no comment for this version
To version 15.1
edited by Stone Wu
on 2022/09/23 16:24
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.admin
1 +XWiki.Stone
Content
... ... @@ -1,24 +1,27 @@
1 1  = **Summary** =
2 2  
3 -This manual provides a comprehensive introduction to the basic functions and actual use of WECON PLC Editor. It is completely aimed at zero-based readers and is an essential reference book for entry-level readers who want to quickly and fully grasp WECON PLC and WECON PLC Editor. 
4 -This book starts with the basic product of WECON PLC and the basic concept and operation of WECON PLC Editor. It then uses a large number of cases and graphic analysis to comprehensively and deeply explain the use of WECON PLC Editor Software and the PLC program.
5 -WECON Technology Co., Ltd. All rights reserved.
3 +This manual has a comprehensive introduction to the basic functions of WECON PLC Editor and the actual use. This book is completely aimed at zero-based readers, is an essential reference book for entry-level readers to quickly and fully grasp WECON PLC and WECON PLC Editor.
6 6  
5 +This book starts from the basic product of WECON PLC and the basic concept and operation of WECON PLC Editor. It combines with a large number of cases and graphic analysis to comprehensively and deeply explain the use of WECON PLC Editor Software, as well as PLC program.
6 +
7 +WECON technology Co., Ltd. All rights reserved.
8 +
7 7  = Precautions =
8 8  
9 -Before the installation, operation, maintenance and repair of the micro programmable control, please read this manual and other related manuals to ensure correct use. Please use it after you have mastered the operation method, and safety information.
11 +Before the installation, operation, maintenance and repair of the micro programmable control, please read this manual and other related manuals to ensure correct use. Please use it after you have mastered the operation method, safety information and all
10 10  
11 11  == Design ==
12 12  
15 +In the event of an abnormality in the external power supply or failure of the programmable controller, to ensure the safe operation of the entire system, be sure to install a safety circuit outside the programmable controller.
13 13  
14 14  1. Be sure to install an emergency brake circuit, a protection circuit, an interlock circuit for reverse operation, such as an emergency brake circuit, a protection circuit, a forward and reverse circuit, and an interlock circuit for the upper and lower positioning limits to prevent machine damage, in the external circuit of the programmable controller.
15 -1. When the programmable controller CPU detects abnormal conditions such as WDT errors through self-diagnosis, all outputs are shut off. In addition, when the programmable controller CPU cannot detect abnormalities in the input/output control part, etc., it cannot control the output. At this time, please design the external circuit and mechanism so that the machine can operate safely.
16 -1. Due to the failure of the relay and transistor of the output unit, it is impossible to control the state of the output to ON or OFF. To ensure the safe operation of the machine, please design external circuits and mechanisms for output signals related to major accidents.
18 +1. When the programmable controller CPU detects abnormal conditions such as WDT errors through self-diagnosis, all outputs are shut off. In addition, when the programmable controller CPU cannot detect abnormalities in the input/output control part, etc., it cannot control the output. At this time, in order to make the machine operate safely, please design the external circuit and mechanism.
19 +1. Due to the failure of the relay and transistor of the output unit, it is impossible to control the state of the output to ON or OFF. In order to ensure the safe operation of the machine, please design external circuits and mechanisms for output signals related to major accidents.
17 17  
18 18  == Installation ==
19 19  
20 20  * Please use it in the general specification environment described in the manual.
21 -** Do not use in the following places: places with dust, oily smoke, conductive dust, corrosive gas, or flammable gas; places exposed to high temperature, condensation, wind, and rain; places with vibration or impact. Electric shock, fire, and misoperation can also cause product damage.
24 +** Do not use in the following places: places with dust, oily smoke, conductive dust, corrosive gas, flammable gas; places  exposed to high temperature, condensation, wind and rain; places with vibration or impact. Electric shock, fire, and misoperation can also cause product damage.
22 22  * When processing screw holes and wiring, do not let iron filings or wire ends fall into the ventilation window of the programmable controller. It may cause fire, malfunction, or misoperation.
23 23  * Please insert the connecting cable and display module accurately into the specified sockets. Poor contact may cause misoperation.
24 24  
... ... @@ -26,8 +26,8 @@
26 26  (((
27 27  **✎Note:**
28 28  
29 -* To prevent the temperature from rising, do not install at the bottom, top or vertical direction. Be sure to install it horizontally on the wall as shown on the right.
30 -* Please leave a space of more than 50mm between the host and other equipment or structures. Try to avoid high-voltage lines, high-voltage equipment, and power equipment.
32 +* To prevent the temperature from rising, do not install at the bottom, top or vertical direction.Be sure to install it horizontally on the wall as shown on the right.
33 +* Please leave a space of more than 50mm between the host and other equipment or structures.Try to avoid high-voltage lines, high-voltage equipment, and power equipment.
31 31  )))
32 32  
33 33  == Wiring ==
... ... @@ -71,7 +71,7 @@
71 71  
72 72  * Please connect the AC power supply to the dedicated terminal according to the content in the manual.
73 73  * If the AC power supply is connected to the DC input/output terminal or the DC power supply terminal, the programmable controller will be burnt out.
74 -* Please do not supply power to the 24+ terminal of the basic unit from the external power supply and to the empty terminal. Do not wire from the outside, otherwise the product will be damaged.
77 +* Please do not supply power to the 24+ terminal of the basic unit from the external power supply, and to the empty terminal    . Do not wire from the outside, otherwise the product will be damaged.
75 75  * Please ground the ground terminal of the basic unit according to the third method. But please do not share the ground with the strong current system.
76 76  
77 77  **Attached**
... ... @@ -108,12 +108,12 @@
108 108  
109 109  Regular inspection: Whether the programmable controller is equipped with consumables with a shorter life.
110 110  
111 -For the relay output type, if the output relay works abnormally at a high frequency or drives a large-capacity load, you must pay attention to its impact on the service life.
114 +For relay output type, if the output relay works abnormally at a high frequency or drives a large-capacity load, you must pay attention to its impact on the service life.
112 112  
113 113  Check with other equipment, please pay attention to the following points:
114 114  
115 115  * Whether there is an abnormal increase in the temperature inside the machine due to other heating elements or direct sunlight.
116 -* Whether dust or conductive dust has penetrated the machine.
119 +* Whether dust or conductive dust has penetrated into the machine.
117 117  * Whether there are loose wiring and terminals or other abnormalities
118 118  
119 119  = Scan structure =
... ... @@ -128,11 +128,11 @@
128 128  The initialization based on the status of the CPU module is as follows.
129 129  
130 130  * **√**: execute
131 -* **×**: not execute
134 +* **×**: not execute
132 132  
133 133  (% class="table-bordered" %)
134 -|=(% rowspan="2" %)Processing item|=(% colspan="3" %)Status of the CPU module
135 -|=When the power is ON|=STOP|=When STOP RUN
137 +|=(% rowspan="2" %)**Processing item**|=(% colspan="3" %)**Status of the CPU module**
138 +|=**When the power is ON**|=**STOP**|=**When STOP RUN**
136 136  |Initialization of input and output modules|√|×|×
137 137  |CPU parameter check|√|×|×
138 138  |Check of system parameters|√|×|×
... ... @@ -244,7 +244,7 @@
244 244  *1: Scan program paging: multiple scan programs are established, and each scan program is called a paging. After scan program A is executed, before scan program B is executed, it will be judged whether an event program needs to be executed.
245 245  
246 246  (% style="text-align:center" %)
247 -[[image:image-20220926104203-1.jpeg||class="img-thumbnail"]]
250 +[[image:1652247397997-492.png||class="img-thumbnail"]]
248 248  
249 249  When it is the turn of the execution sequence of event execution type program C and Y50 is ON, the program is executed.
250 250  
... ... @@ -431,7 +431,7 @@
431 431  [[image:1-20.png||class="img-thumbnail"]]
432 432  
433 433  (% class="table-bordered" %)
434 -|=(% colspan="2" %)**Project**|=**Content**|=**Setting range**|=**Default**
437 +|(% colspan="2" %)**Project**|**Content**|**Setting range**|**Default**
435 435  |(% colspan="2" %)Execution type|Select the type of interrupt|Not set/External input interrupt/Timer event/high-speed counter interrupt|Not set
436 436  |(% rowspan="2" %)Timer interrupt|Time|Set the interval time for interrupt triggering|1 to 2147483647 (100us unit)|
437 437  |priority|When multiple interrupts arrive at the same time, the order of priority execution, the smallest value is executed first|0 to 2|0
... ... @@ -469,7 +469,7 @@
469 469  [[image:1-23.png||class="img-thumbnail"]]
470 470  
471 471  (% class="table-bordered" %)
472 -|=(% colspan="2" %)**Project**|=**Content**|=**Setting range**|=**Default**
475 +|(% colspan="2" %)**Project**|**Content**|**Setting range**|**Default**
473 473  |(% colspan="2" %)Execution type|Select the type of interrupt|Not set, External input interrupt, Timer event, high-speed counter interrupt|Not set
474 474  |(% rowspan="5" %)High count interrupt|Mode|(((
475 475  Select the type of high-speed counter interrupt:
... ... @@ -500,7 +500,7 @@
500 500   Description of triggering rules
501 501  
502 502  (% class="table-bordered" %)
503 -|=(% style="width: 135px;" %)**Mode**|=(% style="width: 187px;" %)**Configuration**|=(% style="width: 128px;" %)**The current value**|=(% style="width: 324px;" %)**Action**
506 +|(% style="width:135px" %)**Mode**|(% style="width:187px" %)**Configuration**|(% style="width:128px" %)**The current value**|(% style="width:324px" %)**Action**
504 504  |(% rowspan="2" style="width:135px" %)High-speed compare interrupt (INT0)|(% rowspan="2" style="width:187px" %)Comparison value: 10000|(% style="width:128px" %)9999 → 10000|(% style="width:324px" %)Execute all programs in interrupt INT0
505 505  |(% style="width:128px" %)10001 → 10000|(% style="width:324px" %)Execute all programs in interrupt INT0
506 506  |(% rowspan="2" style="width:135px" %)High-speed comparison set (INT1)|(% rowspan="2" style="width:187px" %)(((
... ... @@ -573,107 +573,111 @@
573 573  
574 574  (% class="table-bordered" %)
575 575  |=(% colspan="4" %)**External input interrupt mask register**
576 -|=(% style="width: 266px;" %)**Special register number**|=(% style="width: 308px;" %)**Type of interrupt**|=(% style="width: 390px;" %)**Instruction**|=**Defaults**
577 -|(% style="width:266px" %)SM352|(% style="width:308px" %)X0 rising edge interrupt|(% style="width:390px" %)ON: shield interrupts; OFF: interrupt allowed|OFF
578 -|(% style="width:266px" %)SM353|(% style="width:308px" %)X0 falling edge interrupt|(% style="width:390px" %)ON: shield interrupts; OFF: interrupt allowed|OFF
579 -|(% style="width:266px" %)SM354|(% style="width:308px" %)X1 rising edge interrupt|(% style="width:390px" %)ON: shield interrupts; OFF: interrupt allowed|OFF
580 -|(% style="width:266px" %)SM355|(% style="width:308px" %)X1 falling edge interrupt|(% style="width:390px" %)ON: shield interrupts; OFF: interrupt allowed|OFF
581 -|(% style="width:266px" %)SM356|(% style="width:308px" %)X2 rising edge interrupt|(% style="width:390px" %)ON: shield interrupts; OFF: interrupt allowed|OFF
582 -|(% style="width:266px" %)SM357|(% style="width:308px" %)X2 falling edge interrupt|(% style="width:390px" %)ON: shield interrupts; OFF: interrupt allowed|OFF
583 -|(% style="width:266px" %)SM358|(% style="width:308px" %)X3 rising edge interrupt|(% style="width:390px" %)ON: shield interrupts; OFF: interrupt allowed|OFF
584 -|(% style="width:266px" %)SM359|(% style="width:308px" %)X3 falling edge interrupt|(% style="width:390px" %)ON: Shield interrupts; OFF: interrupt allowed|OFF
585 -|(% style="width:266px" %)SM360|(% style="width:308px" %)X4 rising edge interrupt|(% style="width:390px" %)ON: shield interrupts; OFF: interrupt allowed|OFF
586 -|(% style="width:266px" %)SM361|(% style="width:308px" %)X4 falling edge interrupt|(% style="width:390px" %)ON: shield interrupts; OFF: interrupt allowed|OFF
587 -|(% style="width:266px" %)SM362|(% style="width:308px" %)X5 rising edge interrupt|(% style="width:390px" %)ON: shield interrupts; OFF: interrupt allowed|OFF
588 -|(% style="width:266px" %)SM363|(% style="width:308px" %)X5 falling edge interrupt|(% style="width:390px" %)ON: Shield interrupts; OFF: interrupt allowed|OFF
589 -|(% style="width:266px" %)SM364|(% style="width:308px" %)X6 rising edge interrupt|(% style="width:390px" %)ON: shield interrupts; OFF: interrupt allowed|OFF
590 -|(% style="width:266px" %)SM365|(% style="width:308px" %)X6 falling edge interrupt|(% style="width:390px" %)ON: shield interrupts; OFF: interrupt allowed|OFF
591 -|(% style="width:266px" %)SM366|(% style="width:308px" %)X7 rising edge interrupt|(% style="width:390px" %)ON: shield interrupts; OFF: interrupt allowed|OFF
592 -|(% style="width:266px" %)SM367|(% style="width:308px" %)X7 falling edge interrupt|(% style="width:390px" %)ON: shield interrupts; OFF: interrupt allowed|OFF
579 +|=**Special register number**|=**Type of interrupt**|=**Instruction**|=**Defaults**
580 +|SM352|X0 rising edge interrupt|ON: Mask interrupt OFF: Enable interrupt|OFF
581 +|SM353|X0 falling edge interrupt|(((
582 +ON: Ma
593 593  
584 +sk interrupt OFF: Enable interrupt
585 +)))|OFF
586 +|SM354|X1 rising edge interrupt|ON: Mask interrupt OFF: Enable interrupt|OFF
587 +|SM355|X1 falling edge interrupt|ON: Mask interrupt OFF: Enable interrupt|OFF
588 +|SM356|X2 rising edge interrupt|ON: Mask interrupt OFF: Enable interrupt|OFF
589 +|SM357|X2 falling edge interrupt|ON: Mask interrupt OFF: Enable interrupt|OFF
590 +|SM358|X3 rising edge interrupt|ON: Mask interrupt OFF: Enable interrupt|OFF
591 +|SM359|X3 falling edge interrupt|ON: Mask interrupt OFF: Enable interrupt|OFF
592 +|SM360|X4 rising edge interrupt|ON: Mask interrupt OFF: Enable interrupt|OFF
593 +|SM361|X4 falling edge interrupt|ON: Mask interrupt OFF: Enable interrupt|OFF
594 +|SM362|X5 rising edge interrupt|ON: Mask interrupt OFF: Enable interrupt|OFF
595 +|SM363|X5 falling edge interrupt|ON: Mask interrupt OFF: Enable interrupt|OFF
596 +|SM364|X6 rising edge interrupt|ON: Mask interrupt OFF: Enable interrupt|OFF
597 +|SM365|X6 falling edge interrupt|ON: Mask interrupt OFF: Enable interrupt|OFF
598 +|SM366|X7 rising edge interrupt|ON: Mask interrupt OFF: Enable interrupt|OFF
599 +|SM367|X7 falling edge interrupt|ON: Mask interrupt OFF: Enable interrupt|OFF
600 +
594 594  (% class="table-bordered" %)
595 595  |=(% colspan="4" %)**Timer interrupt mask register**
596 -|=(% style="width: 262px;" %)**Special register number**|=(% style="width: 309px;" %)**Type of interrupt**|=(% style="width: 394px;" %)**Instruction**|=(% style="width: 110px;" %)**Default**
597 -|(% style="width:262px" %)SD350|(% style="width:309px" %)1st to 16th timer interrupt|(% style="width:394px" %)(((
603 +|=**Special register number**|=**Type of interrupt**|=**Instruction**|=**Default**
604 +|SD350|1st to 16th timer interrupt|(((
598 598  Each bit can control the mask of an interrupt.
599 599  
600 -ON: shield interrupts; OFF: interrupt allowed
601 -)))|(% style="width:110px" %)0
602 -|(% style="width:262px" %)SD351|(% style="width:309px" %)17th to 32th timer interrupt|(% style="width:394px" %)(((
607 +ON: Mask interrupt OFF: Enable interrupt
608 +)))|0
609 +|SD351|17th to 32th timer interrupt|(((
603 603  Each bit can control the mask of an interrupt.
604 604  
605 -ON: shield interrupts; OFF: interrupt allowed
606 -)))|(% style="width:110px" %)0
607 -|(% style="width:262px" %)SD352|(% style="width:309px" %)33th to 48th timer interrupt|(% style="width:394px" %)(((
612 +ON: Mask interrupt OFF: Enable interrupt
613 +)))|0
614 +|SD352|33th to 48th timer interrupt|(((
608 608  Each bit can control the mask of an interrupt.
609 609  
610 -ON: shield interrupts; OFF: interrupt allowed
611 -)))|(% style="width:110px" %)0
612 -|(% style="width:262px" %)SD353|(% style="width:309px" %)49th to 64th timer interrupt|(% style="width:394px" %)(((
617 +ON: Mask interrupt OFF: Enable interrupt
618 +)))|0
619 +|SD353|49th to 64th timer interrupt|(((
613 613  Each bit can control the mask of an interrupt.
614 614  
615 -ON: shield interrupts; OFF: interrupt allowed
616 -)))|(% style="width:110px" %)0
617 -|(% style="width:262px" %)SD354|(% style="width:309px" %)65th to 80th timer interrupt|(% style="width:394px" %)(((
622 +ON: Mask interrupt OFF: Enable interrupt
623 +)))|0
624 +|SD354|65th to 80th timer interrupt|(((
618 618  Each bit can control the mask of an interrupt.
619 619  
620 -ON: shield interrupts; OFF: interrupt allowed
621 -)))|(% style="width:110px" %)0
622 -|(% style="width:262px" %)SD355|(% style="width:309px" %)81st to 96th timer interrupt|(% style="width:394px" %)(((
627 +ON: Mask interrupt OFF: Enable interrupt
628 +)))|0
629 +|SD355|81st to 96th timer interrupt|(((
623 623  Each bit can control the mask of an interrupt.
624 624  
625 -ON: shield interrupts; OFF: interrupt allowed
626 -)))|(% style="width:110px" %)0
627 -|(% style="width:262px" %)SD356|(% style="width:309px" %)97th to 100th timer interrupt|(% style="width:394px" %)(((
632 +ON: Mask interrupt OFF: Enable interrupt
633 +)))|0
634 +|SD356|97th to 100th timer interrupt|(((
628 628  Each bit can control the mask of an interrupt.
629 629  
630 -ON: shield interrupts; OFF: interrupt allowed
631 -)))|(% style="width:110px" %)0
637 +ON: Mask interrupt OFF: Enable interrupt
638 +)))|0
632 632  
633 633  1. high-speed counter interrupt mask register
634 634  
635 635  (% class="table-bordered" %)
636 -|=(% colspan="4" %)**High-speed counter interrupt mask register**
637 -|=(% style="width: 230px;" %)**Special register number**|=(% style="width: 348px;" %)**Type of interrupt**|=(% style="width: 387px;" %)**Instruction**|=(% style="width: 110px;" %)**Default**
638 -|(% style="width:230px" %)SD382|(% style="width:348px" %)1st to 16th high-speed counter interrupt|(% style="width:387px" %)(((
643 +|(% colspan="4" %)**High-speed counter interrupt mask register**
644 +|**Special register number**|**Type of interrupt**|**Instruction**|**Default**
645 +|SD382|1st to 16th high-speed counter interrupt|(((
639 639  Each bit can control the mask of an interrupt.
640 640  
641 -ON: shield interrupts; OFF: interrupt allowed
642 -)))|(% style="width:110px" %)0
643 -|(% style="width:230px" %)SD383|(% style="width:348px" %)17th to 32nd high-speed counter interrupt|(% style="width:387px" %)(((
648 +ON: Mask interrupt OFF: Enable interrupt
649 +)))|0
650 +|SD383|17th to 32nd high-speed counter interrupt|(((
644 644  Each bit can control the mask of an interrupt.
645 645  
646 -ON: shield interrupts; OFF: interrupt allowed
647 -)))|(% style="width:110px" %)0
648 -|(% style="width:230px" %)SD384|(% style="width:348px" %)33th to 48th high-speed counter interrupt|(% style="width:387px" %)(((
653 +ON: Mask interrupt OFF: Enable interrupt
654 +)))|0
655 +|SD384|33th to 48th high-speed counter interrupt|(((
649 649  Each bit can control the mask of an interrupt.
650 650  
651 -ON: shield interrupts; OFF: interrupt allowed
652 -)))|(% style="width:110px" %)0
653 -|(% style="width:230px" %)SD385|(% style="width:348px" %)49th to 64th high-speed counter interrupt|(% style="width:387px" %)(((
658 +ON: Mask interrupt OFF: Enable interrupt
659 +)))|0
660 +|SD385|49th to 64th high-speed counter interrupt|(((
654 654  Each bit can control the mask of an interrupt.
655 655  
656 -ON: shield interrupts; OFF: interrupt allowed
657 -)))|(% style="width:110px" %)0
658 -|(% style="width:230px" %)SD386|(% style="width:348px" %)65th to 80th high-speed counter interrupt|(% style="width:387px" %)(((
663 +ON: Mask interrupt OFF: Enable interrupt
664 +)))|0
665 +|SD386|65th to 80th high-speed counter interrupt|(((
659 659  Each bit can control the mask of an interrupt.
660 660  
661 -ON: shield interrupts; OFF: interrupt allowed
662 -)))|(% style="width:110px" %)0
663 -|(% style="width:230px" %)SD387|(% style="width:348px" %)81st to 96th high-speed counter interrupt|(% style="width:387px" %)(((
668 +ON: Mask interrupt OFF: Enable interrupt
669 +)))|0
670 +|SD387|81st to 96th high-speed counter interrupt|(((
664 664  Each bit can control the mask of an interrupt.
665 665  
666 -ON: shield interrupts; OFF: interrupt allowed
667 -)))|(% style="width:110px" %)0
668 -|(% style="width:230px" %)SD388|(% style="width:348px" %)97th to 100th high-speed counter interrupt|(% style="width:387px" %)(((
673 +ON: Mask interrupt OFF: Enable interrupt
674 +)))|0
675 +|SD388|97th to 100th high-speed counter interrupt|(((
669 669  Each bit can control the mask of an interrupt.
670 670  
671 -ON: shield interrupts; OFF: interrupt allowed
672 -)))|(% style="width:110px" %)0
678 +ON: Mask interrupt OFF: Enable interrupt
679 +)))|0
673 673  
674 674  == Subroutine ==
675 675  
676 -During the execution of the scan program, the executed program can be called by the CALL instruction. You can create up to 100 new subprograms.
683 +During the execution of the scan program, the executed program can be called by the CALL instruction.
677 677  
678 678  A subroutine is to split a certain module in the main program for the main program to call, which is conducive to the modularization of the program. Such as other high-level language functions, but this function has no parameters and no return value.
679 679  
... ... @@ -680,7 +680,7 @@
680 680  (% style="text-align:center" %)
681 681  [[image:1652250926997-587.png||class="img-thumbnail"]]
682 682  
683 -**Instructions for calling subroutines**
690 +1. Instructions for calling subroutines
684 684  
685 685  After a new subroutine is created, the content of the program is not executed. It is executed only when the CALL(P) instruction is used to call the subroutine in the scan, event, and interrupt programs, and the call is executed once. Three new subroutines SUB0, SUB1, SUB2 are created as shown in the figure below. In the main program MAIN, the subprogram can be called by using the CALL(P) subprogram program name.
686 686  
... ... @@ -689,87 +689,87 @@
689 689  (% style="text-align:center" %)
690 690  [[image:1-28.png||class="img-thumbnail"]]
691 691  
692 -(% class="box infomessage" %)
693 -(((
694 -**✎Note:**
699 +**~ 1.✎Note:**
695 695  
696 696  1. When using the timer (OUT T), note that the output will not be reset when the subroutine is not called, and a specific subroutine register must be used.
697 697  1. It is not allowed to call recursively between subprograms, that is, call SUB1 in SUB0, and then call SUB0 in SUB1. This is not allowed.
698 698  1. The subroutine can be nested up to 32 levels. If the level exceeds 32 levels, a serious error will be reported and the Circuit program operation will be forcibly stopped.
699 699  1. Unlike the LX3V series mainframe, the subroutine in the LX5V series mainframe ends with the END instruction instead of SRET.
700 -)))
701 701  
702 702  == Positioning instructions ==
703 703  
704 -(% class="wikigeneratedid" %)
705 -**Event**
708 + ~1. Event
706 706  
707 -(% class="wikigeneratedid" %)
708 -ON event
710 + 1.ON event
709 709  
710 -* If the high-speed pulse instruction is turned on during the ON event, the high-speed pulse instruction will be sent as normal. If the ON contact of the trigger event in the scan period is turned OFF during the pulse sending, select whether to continue sending the pulse or stop the pulse according to the unscanned processing flag bit.
712 +If the high-speed pulse instruction is turned on during the ON event, the high-speed pulse instruction will be sent as normal. If the ON contact of the trigger event in the scan period is turned OFF during the pulse sending, select whether to continue sending the pulse or stop the pulse according to the unscanned processing flag bit.
711 711  
712 712  (% class="table-bordered" %)
713 -|=(% scope="row" %)**Output shaft**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7
714 -|=**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319
715 +|**Output shaft**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7
716 +|**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319
715 715  
716 -* When the flag bit is 0 (continue to send pulse), if the instruction is not scanned in the current scan cycle, continue to send pulses until it stops. At this time, it should be noted that if the trigger event OFF contact turns ON after the pulse is sent, the pulse will be sent again.
717 -* When the flag bit is 1 (stop sending pulses), if the trigger event ON contact turns OFF in a certain scan period, it will decelerate and stop.
718 +When the flag bit is 0 (continue to send pulse), if the instruction is not scanned in the current scan cycle, continue to send pulses until it stops. At this time, it should be noted that if the trigger event OFF contact turns ON after the pulse is sent, the pulse will be sent again.
718 718  
719 - TIME event
720 +When the flag bit is 1 (stop sending pulses), if the trigger event ON contact turns OFF in a certain scan period, it will decelerate and stop.
720 720  
721 -* If the high-speed pulse instruction is turned on in the TIME event, the high-speed pulse instruction will be sent as normal. If the instruction is not scanned in a certain scan period during the pulse transmission, select whether to continue sending the pulse or stop the pulse according to the unscanned processing flag bit.
722 + 2. TIME event
722 722  
724 +If the high-speed pulse instruction is turned on in the TIME event, the high-speed pulse instruction will be sent as normal. If the instruction is not scanned in a certain scan period during the pulse transmission, select whether to continue sending the pulse or stop the pulse according to the unscanned processing flag bit.
725 +
723 723  (% class="table-bordered" %)
724 -|=(% scope="row" %)**Output shaft**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7
725 -|=**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319
727 +|**Output shaft**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7
728 +|**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319
726 726  
727 -* When the flag bit is 0 (continue to send pulse), if the instruction is not scanned in the current scan cycle, the pulse will continue to be sent until it stops. In the TIME event, it is impossible to ensure that the instruction is scanned in every scan cycle, so you should avoid using high-speed pulse instructions in the TIME time, otherwise the pulse will be sent again after the pulse is sent.
728 -* When the flag bit is 1 (stop sending pulses), if the instruction is not scanned in the current scan cycle, it will decelerate and stop. In the TIME event, if the flag bit is set to 1 (stop sending pulses), there will be no pulse sending.
730 +When the flag bit is 0 (continue to send pulse), if the instruction is not scanned in the current scan cycle, the pulse will continue to be sent until it stops. In the TIME event, it is impossible to ensure that the instruction is scanned in every scan cycle, so you should avoid using high-speed pulse instructions in the TIME time, otherwise the pulse will be sent again after the pulse is sent.
729 729  
730 -**Subroutine**
732 +When the flag bit is 1 (stop sending pulses), if the instruction is not scanned in the current scan cycle, it will decelerate and stop. In the TIME event, if the flag bit is set to 1 (stop sending pulses), there will be no pulse sending.
731 731  
734 + 2. Subroutine
735 +
732 732  If the high-speed pulse instruction is turned on in the subroutine, the high-speed pulse instruction will be sent as normal. If the scanning period is closed during pulse sending, select whether to continue sending or stop the pulse according to the unscanned processing flag.
733 733  
734 734  (% class="table-bordered" %)
735 -|=(% scope="row" %)**Output shaft**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7
736 -|=**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319
739 +|**Output shaft**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7
740 +|**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319
737 737  
738 738  When the flag bit is 0 (continue to send pulse), if the instruction is not scanned in the current scan cycle, the pulse will continue to be sent until it stops. At this time, it should be noted that if the subroutine is called again after the pulse is sent, the pulse will be sent again.
739 739  
740 740  When the flag bit is 1 (stop sending pulses), if the subroutine is closed during high-speed pulse sending, the speed will decelerate and stop. If the subroutine is closed before sending the pulse, then no pulse is sent.
741 741  
742 -**Interrupt**
746 + 3. Interrupt
743 743  
744 -External interrupt
748 +1. External interrupt
745 745  
746 -* If the high-speed pulse instruction is enabled in the external interrupt, the high-speed pulse instruction selects whether the pulse continues to be sent or the pulse stops according to the unscanned processing flag bit.
750 +If the high-speed pulse instruction is enabled in the external interrupt, the high-speed pulse instruction selects whether the pulse continues to be sent or the pulse stops according to the unscanned processing flag bit.
747 747  
748 748  (% class="table-bordered" %)
749 -|=(% scope="row" %)**Output shaft**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7
750 -|=**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319
753 +|**Output shaft**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7
754 +|**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319
751 751  
752 -* When the flag bit is 0 (continue to send pulse), continue to send high-speed pulses until it stops.
753 -* When the flag bit is 1 (stop sending pulse), the high-speed pulse decelerates and stops.
756 +When the flag bit is 0 (continue to send pulse), continue to send high-speed pulses until it stops.
754 754  
755 -Timer interrupt
758 +When the flag bit is 1 (stop sending pulse), the high-speed pulse decelerates and stops.
756 756  
757 -* If the high-speed pulse instruction is turned on in the timer interruption, the high-speed pulse instruction is sent as normal. If the instruction is not scanned in a certain scan period in the pulse transmission, the pulse continues to be sent or the pulse stops is selected according to the unscanned processing flag.
760 + 2. Timer interrupt
758 758  
762 +If the high-speed pulse instruction is turned on in the timer interruption, the high-speed pulse instruction is sent as normal. If the instruction is not scanned in a certain scan period in the pulse transmission, the pulse continues to be sent or the pulse stops is selected according to the unscanned processing flag.
763 +
759 759  (% class="table-bordered" %)
760 -|=(% scope="row" %)**Output axis**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7
761 -|=**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319
765 +|**Output axis**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7
766 +|**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319
762 762  
763 -* When the flag bit is 0 (continue to send pulse), if the instruction is not scanned in the current scan cycle, continue to send pulses until it stops. In the timer interrupt, it is impossible to ensure that the instruction is scanned in every scan cycle, so it is necessary to avoid using high-speed pulse instructions in the T timer interrupt. Otherwise, after the pulse transmission is completed, the pulse will be sent again.
764 -* When the flag bit is 1 (stop sending pulses), if the instruction is not scanned in the current scan cycle, it will decelerate and stop. In the TIME event, if the flag bit is set to 1 (stop sending pulses), there will be no pulse sending.
768 +When the flag bit is 0 (continue to send pulse), if the instruction is not scanned in the current scan cycle, continue to send pulses until it stops. In the timer interrupt, it is impossible to ensure that the instruction is scanned in every scan cycle, so it is necessary to avoid using high-speed pulse instructions in the T timer interrupt. Otherwise, after the pulse transmission is completed, the pulse will be sent again.
765 765  
766 -High-speed comparison interrupt
770 +When the flag bit is 1 (stop sending pulses), if the instruction is not scanned in the current scan cycle, it will decelerate and stop. In the TIME event, if the flag bit is set to 1 (stop sending pulses), there will be no pulse sending.
767 767  
768 -* If the high-speed pulse instruction is enabled in the high-speed comparison interrupt, the high-speed pulse instruction selects whether the pulse continues to be sent or the pulse stops according to the unscanned processing flag.
772 + 3.High-speed comparison interrupt
769 769  
774 +If the high-speed pulse instruction is enabled in the high-speed comparison interrupt, the high-speed pulse instruction selects whether the pulse continues to be sent or the pulse stops according to the unscanned processing flag.
775 +
770 770  (% class="table-bordered" %)
771 -|=(% scope="row" %)**Output axis**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7
772 -|=**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319
777 +|**Output axis**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7
778 +|**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319
773 773  
774 -* When the flag bit is 0 (continue to send pulse), continue to send high-speed pulses until it stops.
775 -* When the flag bit is 1 (stop sending pulse), the high-speed pulse decelerates and stops.
780 +When the flag bit is 0 (continue to send pulse), continue to send high-speed pulses until it stops.
781 +
782 +When the flag bit is 1 (stop sending pulse), the high-speed pulse decelerates and stops.
image-20220926104203-1.jpeg
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Stone
Size
... ... @@ -1,1 +1,0 @@
1 -105.7 KB
Content