Changes for page 01 Program execution
Last modified by Leo Wei on 2024/12/24 22:42
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Attachments (0 modified, 1 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. Stone1 +XWiki.Jim - Content
-
... ... @@ -131,7 +131,7 @@ 131 131 The initialization based on the status of the CPU module is as follows. 132 132 133 133 * **√**: execute 134 -* 134 +* **×**: not execute 135 135 136 136 (% class="table-bordered" %) 137 137 |=(% rowspan="2" %)**Processing item**|=(% colspan="3" %)**Status of the CPU module** ... ... @@ -247,7 +247,7 @@ 247 247 *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. 248 248 249 249 (% style="text-align:center" %) 250 -[[image: 1652247397997-492.png||class="img-thumbnail"]]250 +[[image:image-20220926104203-1.jpeg||class="img-thumbnail"]] 251 251 252 252 When it is the turn of the execution sequence of event execution type program C and Y50 is ON, the program is executed. 253 253 ... ... @@ -596,38 +596,38 @@ 596 596 597 597 (% class="table-bordered" %) 598 598 |=(% colspan="4" %)**Timer interrupt mask register** 599 -|=**Special register number**|=(% style="width: 3 11px;" %)**Type of interrupt**|=(% style="width: 391px;" %)**Instruction**|=(% style="width: 110px;" %)**Default**600 -|SD350|(% style="width:3 11px" %)1st to 16th timer interrupt|(% style="width:391px" %)(((599 +|=(% style="width: 262px;" %)**Special register number**|=(% style="width: 309px;" %)**Type of interrupt**|=(% style="width: 394px;" %)**Instruction**|=(% style="width: 110px;" %)**Default** 600 +|(% style="width:262px" %)SD350|(% style="width:309px" %)1st to 16th timer interrupt|(% style="width:394px" %)((( 601 601 Each bit can control the mask of an interrupt. 602 602 603 603 ON: shield interrupts; OFF: interrupt allowed 604 604 )))|(% style="width:110px" %)0 605 -|SD351|(% style="width:3 11px" %)17th to 32th timer interrupt|(% style="width:391px" %)(((605 +|(% style="width:262px" %)SD351|(% style="width:309px" %)17th to 32th timer interrupt|(% style="width:394px" %)((( 606 606 Each bit can control the mask of an interrupt. 607 607 608 608 ON: shield interrupts; OFF: interrupt allowed 609 609 )))|(% style="width:110px" %)0 610 -|SD352|(% style="width:3 11px" %)33th to 48th timer interrupt|(% style="width:391px" %)(((610 +|(% style="width:262px" %)SD352|(% style="width:309px" %)33th to 48th timer interrupt|(% style="width:394px" %)((( 611 611 Each bit can control the mask of an interrupt. 612 612 613 613 ON: shield interrupts; OFF: interrupt allowed 614 614 )))|(% style="width:110px" %)0 615 -|SD353|(% style="width:3 11px" %)49th to 64th timer interrupt|(% style="width:391px" %)(((615 +|(% style="width:262px" %)SD353|(% style="width:309px" %)49th to 64th timer interrupt|(% style="width:394px" %)((( 616 616 Each bit can control the mask of an interrupt. 617 617 618 618 ON: shield interrupts; OFF: interrupt allowed 619 619 )))|(% style="width:110px" %)0 620 -|SD354|(% style="width:3 11px" %)65th to 80th timer interrupt|(% style="width:391px" %)(((620 +|(% style="width:262px" %)SD354|(% style="width:309px" %)65th to 80th timer interrupt|(% style="width:394px" %)((( 621 621 Each bit can control the mask of an interrupt. 622 622 623 623 ON: shield interrupts; OFF: interrupt allowed 624 624 )))|(% style="width:110px" %)0 625 -|SD355|(% style="width:3 11px" %)81st to 96th timer interrupt|(% style="width:391px" %)(((625 +|(% style="width:262px" %)SD355|(% style="width:309px" %)81st to 96th timer interrupt|(% style="width:394px" %)((( 626 626 Each bit can control the mask of an interrupt. 627 627 628 628 ON: shield interrupts; OFF: interrupt allowed 629 629 )))|(% style="width:110px" %)0 630 -|SD356|(% style="width:3 11px" %)97th to 100th timer interrupt|(% style="width:391px" %)(((630 +|(% style="width:262px" %)SD356|(% style="width:309px" %)97th to 100th timer interrupt|(% style="width:394px" %)((( 631 631 Each bit can control the mask of an interrupt. 632 632 633 633 ON: shield interrupts; OFF: interrupt allowed ... ... @@ -676,7 +676,7 @@ 676 676 677 677 == Subroutine == 678 678 679 -During the execution of the scan program, the executed program can be called by the CALL instruction. 679 +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. 680 680 681 681 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. 682 682 ... ... @@ -683,7 +683,7 @@ 683 683 (% style="text-align:center" %) 684 684 [[image:1652250926997-587.png||class="img-thumbnail"]] 685 685 686 - 1.Instructions for calling subroutines686 +**Instructions for calling subroutines** 687 687 688 688 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. 689 689 ... ... @@ -692,87 +692,87 @@ 692 692 (% style="text-align:center" %) 693 693 [[image:1-28.png||class="img-thumbnail"]] 694 694 695 -**~ 1.✎Note:** 695 +(% class="box infomessage" %) 696 +((( 697 +**✎Note:** 696 696 697 697 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. 698 698 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. 699 699 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. 700 700 1. Unlike the LX3V series mainframe, the subroutine in the LX5V series mainframe ends with the END instruction instead of SRET. 703 +))) 701 701 702 702 == Positioning instructions == 703 703 704 - ~1. Event 707 +(% class="wikigeneratedid" %) 708 +**Event** 705 705 706 - 1.ON event 710 +(% class="wikigeneratedid" %) 711 +ON event 707 707 708 -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. 713 +* 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. 709 709 710 710 (% class="table-bordered" %) 711 -|**Output shaft**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7 712 -|**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319 716 +|=(% scope="row" %)**Output shaft**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7 717 +|=**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319 713 713 714 -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. 719 +* 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. 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. 715 715 716 - Whentheflag bit is 1 (stop sending pulses), if the trigger eventON contact turns OFF in a certain scan period, it will decelerate and stop.722 + TIME event 717 717 718 - 2.TIME event724 +* 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. 719 719 720 -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. 721 - 722 722 (% class="table-bordered" %) 723 -|**Output shaft**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7 724 -|**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319 727 +|=(% scope="row" %)**Output shaft**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7 728 +|=**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319 725 725 726 -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. 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. 731 +* 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. 727 727 728 - When the flag bit is 1 (stop sending pulses), if the instruction is not scanned in the currentscan cycle,it will decelerate and stop. In theTIME event, if the flag bit is set to 1 (stop sending pulses), there will be no pulse sending.733 +**Subroutine** 729 729 730 - 2. Subroutine 731 - 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 -|**Output shaft**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7 736 -|**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319 738 +|=(% scope="row" %)**Output shaft**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7 739 +|=**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 - 3.Interrupt745 +**Interrupt** 743 743 744 - 1.External interrupt747 +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. 749 +* 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 -|**Output shaft**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7 750 -|**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319 752 +|=(% scope="row" %)**Output shaft**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7 753 +|=**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. 755 +* When the flag bit is 0 (continue to send pulse), continue to send high-speed pulses until it stops. 756 +* When the flag bit is 1 (stop sending pulse), the high-speed pulse decelerates and stops. 753 753 754 - Whenthe flag bit is 1 (stop sending pulse),thehigh-speed pulse decelerates and stops.758 +Timer interrupt 755 755 756 - 2.Timer interrupt760 +* 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. 757 757 758 -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. 759 - 760 760 (% class="table-bordered" %) 761 -|**Output axis**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7 762 -|**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319 763 +|=(% scope="row" %)**Output axis**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7 764 +|=**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319 763 763 764 -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. 766 +* 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. 767 +* 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. 765 765 766 - When the flag bit is1 (stopsendingpulses), if the instruction is not scanned in the current scan cycle,it will decelerate andstop. Inthe TIME event,if the flag bit is set to 1 (stop sending pulses),there will be no pulse sending.769 +High-speed comparison interrupt 767 767 768 - 3.High-speed comparison interrupt771 +* 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. 769 769 770 -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. 771 - 772 772 (% class="table-bordered" %) 773 -|**Output axis**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7 774 -|**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319 774 +|=(% scope="row" %)**Output axis**|Y0|Y1|Y2|Y3|Y4|Y5|Y6|Y7 775 +|=**Not scanned flag bit**|SM899|SM959|SM1019|SM1079|SM1139|SM1199|SM1259|SM1319 775 775 776 -When the flag bit is 0 (continue to send pulse), continue to send high-speed pulses until it stops. 777 - 778 -When the flag bit is 1 (stop sending pulse), the high-speed pulse decelerates and stops. 777 +* When the flag bit is 0 (continue to send pulse), continue to send high-speed pulses until it stops. 778 +* When the flag bit is 1 (stop sending pulse), the high-speed pulse decelerates and stops.
- image-20220926104203-1.jpeg
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Stone - Size
-
... ... @@ -1,0 +1,1 @@ 1 +105.7 KB - Content