{"id":3231,"date":"2026-11-17T18:38:52","date_gmt":"2026-11-17T10:38:52","guid":{"rendered":"https:\/\/resource.fatek.com\/index.php\/2026\/11\/17\/mplc-m04-en-06\/"},"modified":"2026-11-17T18:38:52","modified_gmt":"2026-11-17T10:38:52","slug":"mplc-m04-en-06","status":"publish","type":"post","link":"https:\/\/resource.fatek.com\/index.php\/2026\/11\/17\/mplc-m04-en-06\/","title":{"rendered":"Chapter 6 Creating Program"},"content":{"rendered":"<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>\u26a0Danger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<ol>\n<li>When installing or removing the M-series CPU modules and various expansion modules or the equipment connected to it, all power must be turned off, otherwise it may cause electric shock or wrong action, resulting in death or serious personal injury and damage to the machine equipment.<\/li>\n<li>Before the installation and wiring construction is completed, do not tear off the dust-proof paper on the PLC cooling hole, so as to prevent the drilling iron filings or wiring scraps from falling into the PLC during construction, causing fire, failure or malfunction.<\/li>\n<li>After confirming that the installation and wiring are all completed, remember to tear off the above-mentioned dustproof paper to avoid poor heat dissipation of the PLC, resulting in fire, failure or malfunction.<\/li>\n<\/ol>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>This section describes the program creating procedure that will be required for editing the Ladder Diagram.<\/p>\n<h3>6-1 Main Program and Sub-Program Unit Management<\/h3>\n<p>The editing window is divided into Master Program Field and Sub-program Field. It presents orderly organized program architecture for users to carry out the editing and the checking more easily. Both units are operated in the same way. Described below is the operation procedure of each program unit:<\/p>\n<h4>6-1-1 Creating new program unit<\/h4>\n<p>During the planning, the programs can be categorized for editing in order to present orderly organized program architecture. With such kind of program unit adding function, a well-defined architecture will be presented when planning the program. <\/p>\n<p>You may click [Project] \u2192 [Ladder Diagram] \u2192 [Main Program] \u2192 [Right mouse button] \u2192 [Main Program Add] in project management toolbar, or you may select [Main Program Add] from the scroll-down menu in function toolbar icon. <\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\68.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-001.png\" \/><\/p>\n<p>Fig. 71: Add Main Program Unit<\/p>\n<h4>6-1-2 Deleting program unit<\/h4>\n<p>If the created program unit is no longer required, you may delete it with the program unit deleting function. In this case, you may move the cursor to the unit tag and then click the right mouse button \u2192 [Delete] and then such program unit will be deleted.<\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\69.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-002.png\" \/><\/p>\n<p>Fig. 72: Deleting program unit<\/p>\n<h4>6-1-3 Program unit relocating sequence<\/h4>\n<p>You may click [Project] \u2192 [Ladder Diagram] \u2192 [Main Program] \u2192 [Right mouse button] \u2192 [Relocate Main Program] in project management toolbar, or you may select [Relocate Main Program] from the scroll-down menu in the toolbar icon.<\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\70.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-003.png\" \/><\/p>\n<p>Fig. 73: Relocating Master Program Unit<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-004.png\" \/><\/p>\n<p>Fig. 74: Relocating Master Program Unit_2<\/p>\n<p>Press [OK], and you may change the array of the program unit in the project window. <\/p>\n<p>The [Relocate Main Program] of Sub-program can be adjusted in the same way as the Main Program. In this case, simply select the function from the Sub-program.<\/p>\n<h4>6-1-4 Changing program unit name<\/h4>\n<p>After creating the program unit name, you may change the program unit name. Click [Test Example]\u2192 [Ladder Diagram] \u2192 [Main Program] \u2192 [Main Section] in project management window and then press the right mouse button \u2192 [Rename]:<\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\72.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-005.png\" \/><\/p>\n<p>Fig. 75: Changing program unit name<\/p>\n<h4>6-1-5 Inputting program unit comment<\/h4>\n<p>If several program units are to be processed, it will be required to create a comment for the respective program unit for the convenience of checking and changing later on. <\/p>\n<p><strong>Inputting comment operation method in dedicated Comment Field<\/strong><\/p>\n<p>Click [Project] \u2192 [Comment] \u2192 \u201cProgram section\u201d \u2192 \u201cDouble-click left mouse button\u201d in function toolbar, or you may click toolbar icon and then the [Program Unit Comment] input field will appear.<\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\73.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-006.png\" \/><\/p>\n<p>Fig. 76: Program unit comment<\/p>\n<p>Input the comment text. Press [OK] and the comment will be displayed at the topmost side of such Ladder Diagram. <\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\74.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-007.png\" \/><\/p>\n<p>Fig. 77: Displaying comment at topmost side of Ladder Diagram<\/p>\n<p><strong>Operation method for inputting comment by selecting Single Program Unit<\/strong><\/p>\n<p>In the Ladder Diagram program field, click the right mouse button and the function menu will appear for selecting the desired [Network Comment] function:<\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\75.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-008.png\" \/><\/p>\n<p>Fig. 78: Adding unit network comment<\/p>\n<p>You may click [Project] \u2192 [Comment] \u2192 [Network Comment] in function toolbar and the program comment input field representing the respective unit will appear. <\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\76.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-009.png\" \/><\/p>\n<p>Fig. 79: Network Comment<\/p>\n<p>Press [OK] to complete the inputting of network comment.<\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\77.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-010.png\" \/><\/p>\n<p>Fig. 80: Inputting network comment <\/p>\n<p>Press [OK] and the comment will be displayed at upper side of the program. <\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\78.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-011.png\" \/><\/p>\n<p>Fig. 81: Displaying comment at upper side of the program<\/p>\n<h3>6-2 Ladder Diagram (LD)<\/h3>\n<p>The most essential part of such application program is the compilation of the Ladder Diagram related program. For this purpose, it also provides the well-organized window in order to display relevant messages. Described below is its operation method:<\/p>\n<h4>6-2-1 Display elements <\/h4>\n<p><strong>Window operation<\/strong><\/p>\n<p>It provides a number of window-based ladder program pictures for showing the programs being created for different sections at the same time for users to execute the compare, copy and edit functions.<\/p>\n<ol>\n<li>Creating multi-ladder window<\/li>\n<\/ol>\n<p>Each project comprises Master Program Section and Sub-program Section in which, each section will be allowed for adding the desired program tab, as per the figure below. By clicking \u201cSwitch page\u201d in the \u201cTab,\u201d it allows the user to switch between the program section of each page. <\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\79.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-012.png\" \/><\/p>\n<p>Fig. 82: Creating multi-ladder window<\/p>\n<ol>\n<li>Arraying of ladder window<\/li>\n<\/ol>\n<ul>\n<li>Arraying of cascade display: <\/li>\n<\/ul>\n<p>Click [Window] \u2192 [Cascade]<\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\80.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-013.png\" \/><\/p>\n<p>Fig. 83: Cascade window<\/p>\n<ul>\n<li>Arraying of tile horizontal display:<\/li>\n<\/ul>\n<p>Click [Window] \u2192 [Tile Horizontal]<\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\81.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-014.png\" \/><\/p>\n<p>Fig. 84: Tile Horizontal display<\/p>\n<h4>6-2-2 Component operation<\/h4>\n<p>Click [Designer] \u2192 [Ladder Diagram] in function toolbar, and the component items from A Contact to vertical line will be displayed. Indicated in the figure below is the arraying method of the respective contact component in the company panel, as below: <\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\82.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-015.png\" \/><\/p>\n<p>Fig. 85: Ladder Diagram component operation <\/p>\n<p>Select the contact component that will be imported. Drag such component to Ladder Diagram program section and it will be displayed. Described below is the operation procedure:<\/p>\n<p><strong>Input contact component<\/strong><\/p>\n<p>Click [Designer] \u2192 [Component Panel] \u2192 [A Contact] <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-016.png\" \/> in function toolbar.<br \/>You may also move the cursor to the Ladder Diagram program section and then click the right mouse button and the Pop-up Menu will appear as the figure below. After that, select [Contact] \u2192 [A Contact]:<\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\83.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-017.png\" \/><\/p>\n<p>Fig. 86: Inputting contact component<\/p>\n<p>Click the desired input position in the Ladder Diagram program section, and the [Element Edit] box will appear: <\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\84.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-018.png\" \/><\/p>\n<p>Fig. 87: Inputting component number<\/p>\n<p>After inputting \u201cX0\u201d, press \u201cENTER\u201d key and the picture will be displayed as below: <\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\85.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-019.png\" \/><\/p>\n<p>Fig. 88: Complete component inputting<\/p>\n<p>Next, move the cursor to the input position in the Ladder Diagram program field. After that, click the left mouse button once and then input \u201cAX0\u201d or \u201cX0A\u201d with keyboard and the figure above will appear. <\/p>\n<p>In the meantime, press \u201cShift\u201d + \u201cA\u201d keys to show the webpage where A Contact component will be displayed in program section only without inputting the component number, as per the figure below: <\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\86.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-020.png\" \/><\/p>\n<p>Fig. 89: Page without inputting component number<\/p>\n<p><strong>Changing the type or the number of contact component <\/strong><\/p>\n<p>To change the type of the contact component being entered, select the contact type to be changed; for example, select B Contact from the component panel, and then click the left button on the contact component to be modified in the ladder diagram program section, and the input number box of the B contact element will appear.<\/p>\n<p>To change the component number, move the cursor to the component to be changed in the program section and then enter the new number or press \u201cSPACE\u201d key to show the edit window. After that, input the new number as per the figure below. <\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\87.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-021.png\" \/><\/p>\n<p>Fig. 90: Component number changing method<\/p>\n<p>You may also key the number in the \u201cElement Edit\u201d box at B Contact, such as \u201cX1\u201d. After that, the \u201cX0\u201d of the original A Contact will be revised as \u201cX1\u201d of B Contact. <\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\88.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-022.png\" \/><\/p>\n<p>Fig. 91: Component number changing result<\/p>\n<p><strong>Deleting contact component<\/strong><\/p>\n<p>In component panel, you may select deletion icon <img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\Del.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-023.png\" \/> or move the cursor to the Ladder Diagram program section. Next press the right mouse button to display the Pop-up Menu where you will be allowed to select the [Delete] function. At this time, the cursor serves as the deleting function; or you may click [X1] of B Contact component and then press \u201cDelete\u201d key on the keyboard and \u201cX1\u201d will be deleted.<img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\89.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-024.png\" \/><\/p>\n<p>Fig. 92: Selecting the component to be deleted<\/p>\n<p>Press \u201cDelete\u201d key on the keyboard, it will be deleted directly. <img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\90.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-025.png\" \/><\/p>\n<p>Fig. 93: Deleting component by clicking Delete<\/p>\n<h4>6-2-3 Operating by instructions<\/h4>\n<p>The UperLogic also provides convenient function instruction set. You may select the required instruction by clicking [Check] \u2192 [ToolBox] \u2192 [Set\/Reset] \u2192 [Timer\/Counter] \u2192 [Function Instruction] in function toolbar and drag the module to the configuration position by clicking the left mouse button. In the meantime, you may also click the component panel icon <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-026.png\" \/>which can be used as the function instruction option. <img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\91.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-027.png\" \/><\/p>\n<p>Fig. 94: Dragging Function instruction<\/p>\n<p>After releasing the left mouse button, the function instruction will appear. After inputting the parameter setting, press [OK] to complete the configuration.<\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\92.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-028.png\" \/><\/p>\n<p>Fig. 95: Completing component dragging<\/p>\n<p><strong>Input Function<\/strong> <strong>instruction <\/strong><\/p>\n<p>If users want to use different function instructions, for example, when setting a fixed time timer, it is necessary to control the timing start, when the timing ends, and how much value the timing accumulates, etc., the operation steps can refer to the following instructions:<\/p>\n<p>To set up a fixed-time Timer between X1 contact and Y0 output, you may input the Function instruction to carry out the setting:<\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\93.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-029.png\" \/><\/p>\n<p>Fig. 96: Setting by inputting Function instruction<\/p>\n<p>You may click [Designer] \u2192 [Ladder Diagram] \u2192 select timer function icon from component panel in function toolbar. At this time, the cursor is serving as the Timer. In the Ladder Diagram program section, click the space between X1 and Y0 and the \u201cTimer\u201d Function instruction setting dialog box will appear. <\/p>\n<p>In the Ladder Diagram program section, you may also click the space between X1 and Y0 and then press \u201cShift\u201d + \u201cT\u201d quick keys and the \u201cTimer\u201d Function instruction setting dialog box will appear:<\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\94.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-030.png\" \/><\/p>\n<p>Fig. 97: \u201cTimer\u201d Function instruction setting dialog box<\/p>\n<p>Key \u201cT10\u201d in \u201cT\u201d column and key \u201c1000\u201d in \u201cPV\u201d section to complete the fixed-time setting for the Timer:<\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\95.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-031.png\" \/><\/p>\n<p>Fig. 98: Completing the fixed-time setting for Timer<\/p>\n<p><strong>Deleting functional component<\/strong><\/p>\n<p>You can select the delete icon in the component panel, or click the right button in the ladder diagram program section to display the Pop-up menu to select the [Delete] function, and the cursor represents the delete function; or directly click the function component, and then press the keyboard \u201cDelete\u201d key, you can also delete it directly <\/p>\n<h4>6-2-4 Network operation<\/h4>\n<p>In the Ladder Diagram program section, the network is an essential element that is designed with a variety of operation methods. Described below is the network operation method in the program section.<\/p>\n<p><strong>Copying single network<\/strong><\/p>\n<p>Point the cursor at the network to be copied. For example, network \u201cN009\u201d per the figure below:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-032.png\" \/><\/p>\n<p>Fig. 99: Replicating single network<\/p>\n<p>Press the right mouse button to show the Pop-up Menu and then select [Copy] or press \u201cCtrl\u201d + \u201cC\u201d quick key and then execute the copy instruction. Next, press the right mouse button to show the menu for selecting [Paste]; or press \u201cCtrl\u201d + \u201cV\u201d quick key to execute the paste command. In this way, it allows the user to complete the single network copying:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-033.png\" \/><\/p>\n<p>Fig. 100: Complete the copying of single network<\/p>\n<p><strong>Copying multiple networks<\/strong><\/p>\n<p>To copy the connected networks coded in N001 to N003, the user may use the mouse to scroll the selected N001 to N003 or press \u201cShift\u201d key and then click Network N001 to N003, as per the figure below:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-034.png\" \/><\/p>\n<p>Fig. 101: Copying multiple networks<\/p>\n<p>Execute the copying and pasting actions to complete the copying of networks that are connected with each other. To copy the non-connected networks such as N001, N003 and N005, highlights Network N001 with mouse, press \u201cCtrl\u201d simultaneously and then highlights N003 and N005 to achieve the following result: <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-035.png\" \/><\/p>\n<p>Fig. 102: Completing the copying of multiple networks<\/p>\n<p>Execute the copying and pasting steps to complete the non-connected network copying. <\/p>\n<p><strong>Copying the network between different projects<\/strong><\/p>\n<p>First, open the UperLogic application program and then open Project-1 file. Likewise, open the UperLogic application program again and then open Project-2 file. In this way, you will be allowed to open two units of UperLogic application program windows. In Project-1, highlight Network N001 and press the right mouse button to show the Pop-up Menu and then select [Copy] or press \u201cCtrl\u201d + \u201cC\u201d quick keys to copy the desired network. Next, move the cursor to the pasting position in Project-2 and then press the right mouse button to show Pop-up Menu. Next, select [Paste] or press \u201cCtrl\u201d + \u201cV\u201d quick key to paste the network. In this way, it allows the user to complete the copying of network between different projects. <\/p>\n<p><strong>Deleting network<\/strong><\/p>\n<p>Highlight the Network Number to be deleted and then click [Designer] \u2192 [Delete] in function toolbar, or press \u201cDelete\u201d quick key and it will be deleted directly. <\/p>\n<p><strong>Editing network lines and rows<\/strong><\/p>\n<p>In the Ladder Diagram, the program section is composed of multiple Network Numbers. Through the lines and rows of the Network Number, an orderly configured program is presented that will be easier for maintenance. Further, other functions are also designed for the network lines and rows to achieve more convenient and quicker program compilation. Described below is the operation method of these functions:<\/p>\n<p><strong>Expand network to 22 lines<\/strong><\/p>\n<p>If multiple contacts are created that will be insufficient for the original 11 lines in the network, it can be expanded to 22 lines. By doing so, move the cursor to the network where 11 lines will be expanded to 22 lines and then click [Designer] \u2192 [Network] \u2192 [Expand to 22 lines] in function toolbar; or you may press the right mouse button to show Pop-up Menu and then click [Edit Network line\/row] \u2192 [Expand to 22 lines]. <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-036.png\" \/><\/p>\n<p>Fig. 103: Before expanding to 22 lines<img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-037.png\" \/><\/p>\n<p>Fig. 104: After expanding to 22 lines<\/p>\n<p><strong>Compressing network to 11 lines<\/strong><\/p>\n<p>Move the cursor to the network where 22 lines will be compressed to 11 lines and then click [Designer] \u2192 [Network] \u2192 [Compress to 11 lines] in function toolbar; or you may press the right mouse button to show Pop-up Menu and then click [Edit Network line\/row] \u2192 [Compress to 11 lines].<\/p>\n<p><strong>Vertical expanding<\/strong><\/p>\n<p>To expand the vertical distance between the upper and lower lines of X1 and X3, execute per the figure below: <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-038.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-039.png\" \/><\/p>\n<p>Fig. 105: Expanding vertical distance<\/p>\n<p>Click X3 with cursor: <\/p>\n<p>Click [Designer] \u2192 [Expand Network] \u2192 [Vertical Expand]; or press the right mouse button to show Pop-up Menu and then click [Edit Network line\/row] \u2192 [Vertical Expand] to complete the vertical expanding.<\/p>\n<p><strong>Vertical compressing<\/strong><\/p>\n<p>To compress the vertical distance between the upper and lower lines of X1 and X3, execute per the figure below:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-040.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-041.png\" \/><\/p>\n<p>Fig. 106: Compressing vertical distance<\/p>\n<p>Then the cursor clicks the blank row to be compressed between X1 and X3:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-042.png\" \/><\/p>\n<p>Fig. 107: Clicking the empty rows to be compressed<\/p>\n<p>Click [Designer] \u2192 [Expand Network] \u2192 [Vertical Compress]; or press the right mouse button to show Pop-up Menu and then click [Edit Network line\/row] \u2192 [Vertical Compress] to complete the vertical compressing.<\/p>\n<p><strong>Horizontal expanding<\/strong><\/p>\n<p>To expand the distance between X0 and X3:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-043.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-044.png\" \/><\/p>\n<p>Fig. 108: Expanding horizontal distance<\/p>\n<p>Click [Edit] \u2192 [Expand Network] \u2192 [Horizontal Expand] in function toolbar; or press the right mouse button to show Pop-up Menu and then click [Edit Network line\/row] \u2192 [Horizontal Expand] to complete the horizontal expanding.<\/p>\n<p><strong>Horizontal compressing<\/strong><\/p>\n<p>To compress the distance between X0 and X3:  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-045.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-046.png\" \/><\/p>\n<p>Fig. 109: Compressing horizontal distance<\/p>\n<p>Click [Edit] \u2192 [Expand Network] \u2192 [Horizontal Compress] in function toolbar; or press the right mouse button to show Pop-up Menu and then click [Edit Network line\/row] \u2192 [Horizontal Compress] to complete the horizontal compressing.<\/p>\n<p><strong>Inserting empty network<\/strong><\/p>\n<p>To insert an empty network in the upper side of Network N012, execute the following procedure:<\/p>\n<p>In the Ladder Diagram program section, move the cursor to any component contact of N012 and then press the right mouse button to show Pop-up Menu. Next, click [Insert Empty Network] \u2192 [Upper Insert]; or you may press the right mouse button of Network N012 to show Pop-up Menu and then click [Insert Empty Network] \u2192 [Upper Insert]; or click [Designer \u2192 [Insert Network] \u2192 [Upper Insert]; or press \u201cShift\u201d + \u201cInsert\u201d quick keys and then Network N012 will become an empty network. In the meantime, the content of original Network N012 will change to Network N013.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-047.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-048.png\" \/><\/p>\n<p>Fig. 110: Inserting empty network<\/p>\n<p><strong>Searching network<\/strong><\/p>\n<p>To search Network N001 of the intended program unit, click [Designer] \u2192 [Go To]; or press \u201cCtrl\u201d + \u201cG\u201d quick keys to show the following window:<\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\108.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-049.png\" \/><\/p>\n<p>Fig. 111: Searching network<\/p>\n<p>Taking the searching of Network N005 in [Main_unit1] for example: <\/p>\n<p>In [Program Unit List], highlights [Main_Unit-1] and then enter \u201c5\u201d in [Network Number] column to represent N005. Next, press [OK] button and the cursor will move to the Network Number position to be searched. <\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\109.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-050.png\" \/><\/p>\n<p>Fig. 112: Moving to the Network Number position to be searched<\/p>\n<h4>6-2-5 Editing comment<\/h4>\n<p>To input the network comment for Network N012, move the cursor to N12 or any component and then press the right mouse button to show Pop-up Menu. Next, click [Network Comment] and the network comment input section will appear: <\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\110.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-051.png\" \/><\/p>\n<p>Fig. 113: Network comment input section<\/p>\n<p>Input \u201cN012 Network Comment.\u201d Press [OK] button and you will see that the keyed comment is displayed in the previous line of the existing Network N012:<\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\111.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-052.png\" \/><\/p>\n<p>Fig. 114: Displaying comment in previous line of Network Number<\/p>\n<p>In the meantime, you may double click [Project] \u2192 [Comment] \u2192 [Network Comment]; or in project window, double clicking \u2192 [Comment Description] \u2192 [Network Comment] to show all of the Network Numbers. Find out N012 by scrolling down the menu and then double clicking on the empty comment section and the network comment input empty section will appear: <\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\112.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-053.png\" \/><\/p>\n<p>Fig. 115: Adding network comment<\/p>\n<p>Input \u201cN012 Network Comment\u201d and then press [OK] button to complete the network comment inputting.<\/p>\n<h3>6-3 Structured Text (ST)<\/h3>\n<p>In addition to the most basic editing of ladder diagram programs, UperLogic also provides a structured document programming language (Structured Text), whose syntax is similar to Pascal. Through this syntax, it is convenient to perform complex logic and calculations that are more difficult to edit than ladder diagrams. Commonly used programs and circuits can also be edited through Function Block (FB) is created for repeated use. For more detailed information, please refer to the ST manual. The operating method is introduced as follows:<\/p>\n<h4>6-3-1 Display Composition<\/h4>\n<p><strong>Window Operation<\/strong><\/p>\n<p>Provides a multi-window ladder program page, which can display programs in different sections at the same time for comparison, copying and editing.<img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-054.jpg\" \/><\/p>\n<p>Fig. 116: List of programs in use<\/p>\n<h4>6-3-2 Commands Operation<\/h4>\n<p>[Commands] on the left side of the ST window will provide users with corresponding commands, which are divided into three categories: Script, Toolbox and FCM:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-055.png\" \/><\/p>\n<p>Fig. 117: ST commands operation<\/p>\n<p>Double-click the command you want to use or enter it directly on the screen to use it. The following is the operation instruction:<\/p>\n<p><strong>Script\uff1a<\/strong><\/p>\n<p>Users can write programs through the instructions here. For example, after double-clicking the IF, the screen will display the corresponding specifications, and use ( ) to prompt the user to fill in the information here. If the user already understands, you can also directly enter the corresponding command.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-056.png\" \/><\/p>\n<p>Fig. 118: Syntax hints comments<\/p>\n<p><strong>ToolBox\uff1a<\/strong><\/p>\n<p>Users can edit the project through the written program, and the function here will be similar to the Ladder command. The method of use is the same as that of ToolBox. For example, after double-clicking Timer, the corresponding specification will be displayed on the screen, and ( ) will be used to prompt the user to fill in the information here. If the user already understands it, he can also directly enter the corresponding command.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-057.jpg\" \/><\/p>\n<p>Fig. 119: Function hint comments<\/p>\n<p><strong>FB\uff1a<\/strong><\/p>\n<p>Users can use the function blocks written in the function block program to edit the project.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-058.png\" \/><\/p>\n<p>Fig. 120: Using Function Block<\/p>\n<p>For the interface operation of the function block, please refer to Chapter 6-7.<\/p>\n<h3>6-4 Step Ladder Instruction Description<\/h3>\n<h4>6-4-1 Instruction-based operation<\/h4>\n<p>The main purpose is to achieve higher program readability, easier maintainability and updating, as well as more reliable software quality. Aiming at the sequential control of mechanical action process, the software is designed for combining the widely accepted Ladder Diagram language under the support of step-based execution command. To operate, click [Designer] \u2192 [Ladder Diagram] \u2192 [Function Lookup] or press \u201cF\u201d quick key; or in Ladder Diagram program field, press the right mouse button to show Pop-up Menu and then click [Function Lookup] \u2192 [Function Lookup]. In the Ladder Diagram program section, click the position where step instruction will be conveyed and all types of function instructions will appear. Under type item, select [SFC instruction] and the right-side Function Name will show the following four step instructions, i.e., \u201cSTP,\u201d \u201cFROM,\u201d \u201cTO\u201d and \u201cSTPEND,\u201d as per the figure below:<\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\113.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-059.png\" \/><\/p>\n<p>Fig. 121: SFC instructions<\/p>\n<p>For its operation instructions, please refer to Chapter 8 of the M-PLC instruction application manual:<\/p>\n<h3>6-5 Syntax Check<\/h3>\n<p>After inputting the ladder program, the system will be allowed for executing the syntax check to help you find out program errors. To execute, click [PLC] \u2192 [Syntax check] in function toolbar to show the error statistic list resulting from the syntax check:<\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\114.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-060.png\" \/><\/p>\n<p>Fig. 122: Syntax check<\/p>\n<p>The system will list all errors under the program section. In the error section, double clicking any item in error section and the program section will show the error component block, as per the figure below: <\/p>\n<p><img decoding=\"async\" alt=\"D:\\patrick\\\u66f4\u63db\u624b\u518a\u5716\u7247\\\u5716_en\\115.PNG\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-061.png\" \/><\/p>\n<p>Fig. 123: Error displaying resulting from syntax check<\/p>\n<h3>6-6 Interrupt Program<\/h3>\n<p>UperLogic classifies related interrupt programs and motion control subroutines here, which is convenient for users to use and design. For example, to add an interrupt program, you only need to add and select the interrupt type, instead of defining the interrupt program through the command Label 65 and the end of RTI like Winproladder. In addition to the ladder LD language, programmers can also write special program logic through ST. Each special type of program is unique and cannot be repeated.<\/p>\n<h4>6-6-1 Types of Interrupt Program<\/h4>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p><strong>Interrupt Source<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Priority<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Interrupt Label<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Condition<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Note<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"8\">\n<p>Hardware Time Tick<\/p>\n<\/td>\n<td>\n<p>3<\/p>\n<\/td>\n<td>\n<p>STM0I<\/p>\n<\/td>\n<td>\n<p>Interval from 1ms~9ms<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>Tick unit 1ms<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>3<\/p>\n<\/td>\n<td>\n<p>STM1I<\/p>\n<\/td>\n<td>\n<p>Interval from 1ms~9ms<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>3<\/p>\n<\/td>\n<td>\n<p>STM2I<\/p>\n<\/td>\n<td>\n<p>Interval from 1ms~9ms<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>3<\/p>\n<\/td>\n<td>\n<p>STM3I<\/p>\n<\/td>\n<td>\n<p>Interval from 1ms~9ms<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>3<\/p>\n<\/td>\n<td>\n<p>LTM0I<\/p>\n<\/td>\n<td>\n<p>Interval from 10ms~60000ms<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>Tick unit 10ms<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>3<\/p>\n<\/td>\n<td>\n<p>LTM1I<\/p>\n<\/td>\n<td>\n<p>Interval from 10ms~60000ms<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>3<\/p>\n<\/td>\n<td>\n<p>LTM2I<\/p>\n<\/td>\n<td>\n<p>Interval from 10ms~60000ms<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>3<\/p>\n<\/td>\n<td>\n<p>LTM3I<\/p>\n<\/td>\n<td>\n<p>Interval from 10ms~60000ms<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"8\">\n<p>HSC<\/p>\n<\/td>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>HSC0I<\/p>\n<\/td>\n<td>\n<p>Interval from HSC0 to (CV=PV)<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>HSC1I<\/p>\n<\/td>\n<td>\n<p>Interval from HSC1 to (CV=PV)<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>HSC2I<\/p>\n<\/td>\n<td>\n<p>Interval from HSC2 to (CV=PV)<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>HSC3I<\/p>\n<\/td>\n<td>\n<p>Interval from HSC3 to (CV=PV)<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>HSC4I<\/p>\n<\/td>\n<td>\n<p>Interval from HSC4 to (CV=PV)<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>HSC5I<\/p>\n<\/td>\n<td>\n<p>Interval from HSC5 to (CV=PV)<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>HSC6I<\/p>\n<\/td>\n<td>\n<p>Interval from HSC6 to (CV=PV)<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>HSC7I<\/p>\n<\/td>\n<td>\n<p>Interval from HSC7 to (CV=PV)<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td rowspan=\"4\">\n<p>HST<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>HST0I<\/p>\n<\/td>\n<td>\n<p>Interval from HST0 to (CV=PV)<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>Tick uint 100us<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>HST1I<\/p>\n<\/td>\n<td>\n<p>Interval from HST1 to (CV=PV)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>HST2I<\/p>\n<\/td>\n<td>\n<p>Interval from HST2 to (CV=PV)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>HST3I<\/p>\n<\/td>\n<td>\n<p>Interval from HST3 to (CV=PV)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"16\">\n<p>Interrupt from <\/p>\n<p>External <\/p>\n<p>Hardware Input <\/p>\n<p>or Software <\/p>\n<p>High-Speed <\/p>\n<p>Timer<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>X0+I (INT0+)<\/p>\n<\/td>\n<td>\n<p>X0 positive edge trigger<\/p>\n<\/td>\n<td rowspan=\"16\">\n<p>The software high speed counter HSC0~HSC7 can be assigned as the trigger source of any interrupt X0~X15. Therefore, the<\/p>\n<p>interrupt priority of the<\/p>\n<p>software high speed<\/p>\n<p>counter depends on<\/p>\n<p>the priority of X0~X15.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X0\u2212I (INT0-)<\/p>\n<\/td>\n<td>\n<p>X0 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X1+I (INT1+)<\/p>\n<\/td>\n<td>\n<p>X1 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X1\u2212I (INT1-)<\/p>\n<\/td>\n<td>\n<p>X1 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X2+I (INT2+)<\/p>\n<\/td>\n<td>\n<p>X2 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X2\u2212I (INT2-)<\/p>\n<\/td>\n<td>\n<p>X2 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X3+I (INT3+)<\/p>\n<\/td>\n<td>\n<p>X3 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X3\u2212I (INT3-)<\/p>\n<\/td>\n<td>\n<p>X3 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X4+I (INT4+)<\/p>\n<\/td>\n<td>\n<p>X4 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X4\u2212I (INT4-)<\/p>\n<\/td>\n<td>\n<p>X4 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X5+I (INT5+)<\/p>\n<\/td>\n<td>\n<p>X5 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X5\u2212I (INT5-)<\/p>\n<\/td>\n<td>\n<p>X5 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X6+I (INT6+)<\/p>\n<\/td>\n<td>\n<p>X6 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X6\u2212I (INT6-)<\/p>\n<\/td>\n<td>\n<p>X6 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X7+I (INT7+)<\/p>\n<\/td>\n<td>\n<p>X7 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X7\u2212I (INT7-)<\/p>\n<\/td>\n<td>\n<p>X7 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"16\">\n<p>Interrupt from <\/p>\n<p>External <\/p>\n<p>Hardware Input <\/p>\n<p>or Software <\/p>\n<p>High-Speed <\/p>\n<p>Timer (MA Series)<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>X8+I (INT8+)<\/p>\n<\/td>\n<td>\n<p>X8 positive edge trigger<\/p>\n<\/td>\n<td rowspan=\"16\">\n<p>The software high speed counter HSC0~HSC7 can be assigned as the trigger source of any interrupt X0~X15. Therefore, the<\/p>\n<p>interrupt priority of the<\/p>\n<p>software high speed<\/p>\n<p>counter depends on<\/p>\n<p>the priority of X0~X15.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X8\u2212I (INT8-)<\/p>\n<\/td>\n<td>\n<p>X8 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X9+I (INT9+)<\/p>\n<\/td>\n<td>\n<p>X9 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X9\u2212I (INT9-)<\/p>\n<\/td>\n<td>\n<p>X9 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X10+I (INT10+)<\/p>\n<\/td>\n<td>\n<p>X10 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X10\u2212I (INT10-)<\/p>\n<\/td>\n<td>\n<p>X10 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X11+I (INT11+)<\/p>\n<\/td>\n<td>\n<p>X11 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X11\u2212I (INT11-)<\/p>\n<\/td>\n<td>\n<p>X11 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X12+I (INT12+)<\/p>\n<\/td>\n<td>\n<p>X12 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X12\u2212I (INT12-)<\/p>\n<\/td>\n<td>\n<p>X12 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X13+I (INT13+)<\/p>\n<\/td>\n<td>\n<p>X13 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X13\u2212I (INT13-)<\/p>\n<\/td>\n<td>\n<p>X13 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X14+I (INT14+)<\/p>\n<\/td>\n<td>\n<p>X14 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X14\u2212I (INT14-)<\/p>\n<\/td>\n<td>\n<p>X14 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X15+I (INT15+)<\/p>\n<\/td>\n<td>\n<p>X15 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X15\u2212I (INT15-)<\/p>\n<\/td>\n<td>\n<p>X15 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"16\">\n<p>MQ model DI Plug-in (MQ Series)<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>X16+I<\/p>\n<\/td>\n<td>\n<p>X16 positive edge trigger<\/p>\n<\/td>\n<td rowspan=\"16\"><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X16-I<\/p>\n<\/td>\n<td>\n<p>X16 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X17+I<\/p>\n<\/td>\n<td>\n<p>X17 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X17-I<\/p>\n<\/td>\n<td>\n<p>X17 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X18+I<\/p>\n<\/td>\n<td>\n<p>X18 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X18-I<\/p>\n<\/td>\n<td>\n<p>X18 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X19+I<\/p>\n<\/td>\n<td>\n<p>X19 positive edge trigge<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X19-I<\/p>\n<\/td>\n<td>\n<p>X19 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X20+I<\/p>\n<\/td>\n<td>\n<p>X20 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X20-I<\/p>\n<\/td>\n<td>\n<p>X20 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X21+I<\/p>\n<\/td>\n<td>\n<p>X21 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X21-I<\/p>\n<\/td>\n<td>\n<p>X21 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X22+I<\/p>\n<\/td>\n<td>\n<p>X22 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X22-I<\/p>\n<\/td>\n<td>\n<p>X22 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X23+I<\/p>\n<\/td>\n<td>\n<p>X23 positive edge trigger<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X23-I<\/p>\n<\/td>\n<td>\n<p>X23 negative edge trigger<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-062.png\" \/><\/p>\n<p>Fig. 124: Select interrupt program type<\/p>\n<h4>6-6-2 Types of motion program<\/h4>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p><strong>Motion Source<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Priority<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Motion Label<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Condition<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Note<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Motion Control<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>MSR<\/p>\n<\/td>\n<td>\n<p>Motion Synchronous Routine<\/p>\n<\/td>\n<td>\n<p>Interrupt every 1 ms cycle.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-063.png\" \/><\/p>\n<p>Fig. 125: Select motion program type<\/p>\n<p>MSR can be regarded as the continuous PLC program flow after the action of the continuation of the motion process. It is used as the planning of synchronous motion parameters to avoid the running time difference between the PLC program and the motion process. Designers can synchronize motion parameters in the MSR program to output to PLC registers or output Y contacts in real time, ensuring that the output of motion control will not be affected by the existing PLC program logic. For more details, please refer to the chapter on motion control.<\/p>\n<h4>6-6-3 Add special program<\/h4>\n<p>Click [Project] \u2192 [Program Unit] \u2192 [Special Program] \u2192 [Add Special Program] with the mouse; or right-click [Add Special Program] in the project management window [Special Program] to create a new special program:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-064.png\" \/><\/p>\n<p>Fig. 126: Add special program unit<\/p>\n<p><strong>Program Unit Name:<\/strong><\/p>\n<p>Will be automatically generated by the system, and will have the same name as the interrupt or motion control type.<\/p>\n<p><strong>Language:<\/strong><\/p>\n<p>Users can choose whether this special program unit is edited using ladder diagram or ST programming language.<\/p>\n<p><strong>Interrupt Type:<\/strong><\/p>\n<p>Usera can choose the type of the interrupt program, and each interrupt type can only create one program unit, which cannot be created repeatedly.<\/p>\n<h4>6-6-4 Adjust Interrupt Program<\/h4>\n<p>Click [Project] \u2192 [Program Unit] \u2192 [Interrupt Program] \u2192 [Adjust Interrupt Program]; or right-click [Adjust Interrupt Program] in the project management window [Interrupt Program] to adjust the interrupt program order of sorting:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-065.png\" \/><\/p>\n<p>Fig. 127: Adjusting Interrupt Program<\/p>\n<h4>6-6-5 Call Interrupt Program<\/h4>\n<p>The calling of the interrupt is not by using software instructions, but by sending an interrupt signal to the CPU through the hardware circuit, and the CPU recognizes the name of the interrupt and automatically jumps into the interrupt subroutine and marks it with the interrupt name.<\/p>\n<h3>6-7 Function Module Program<\/h3>\n<p>In PLC programming, to allow users to easily reuse code, simplify and speed up programming, avoid errors and repetitive debugging, and even establish commonly used libraries for programmers to facilitate reuse in different projects, M PLC provides the FCM function module program. This allows users to easily implement Function and Function Block features to modularize PLC programs. For detailed usage, please refer to M PLC Function \/ Function BlocK User Manual.<\/p>\n<h4>6-7-1 Add Function Module Program<\/h4>\n<p>Click [Project] \u2192 [Program Unit] \u2192 [Function Module Program] \u2192 [Add FCM Program] with the mouse; or right-click [Add FCM Program] in the project management window [Function Module Program], you can add new function module program:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-066.png\" \/><\/p>\n<p>Fig. 128: Add Function Module Program<\/p>\n<p><strong>Program Unit Name:<\/strong><\/p>\n<p>Users can define the name of the desired program unit at the time of creation, and this name will be used when calling this function block program when other program units are programmed.<\/p>\n<p><strong>Language:<\/strong><\/p>\n<p>Users can choose whether to use the ladder diagram or ST programming language to edit the interrupt program unit.<\/p>\n<p><strong>Function Module Description:<\/strong><\/p>\n<p>Users can define the required program unit descriptions by themselves.<\/p>\n<p><strong>Input Numbers:<\/strong><\/p>\n<p>Users can set the quantity to be input, the minimum is 1 and the maximum is 8. The first group of input names is fixed as EN, and the remaining 7 groups of input names can be edited by the user.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-067.png\" \/><\/p>\n<p>Fig. 129: FCM input variables<\/p>\n<p><strong>Output Numbers:<\/strong><\/p>\n<p>Usera can set the quantity to be output, the minimum is 0 and the maximum is 8. Users can edit the name of the output by themselves.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-068.png\" \/><\/p>\n<p>\tFig. 130: FCM output variables\t<\/p>\n<p><strong>Parameter Numbers:<\/strong><\/p>\n<p>The user can set the number of parameters required by the function module, the minimum is 0, and the maximum is 12. Users can define the mode, name and data type of parameters by themselves, which will be explained one by one below:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-069.png\" \/><\/p>\n<p>Fig. 131: INOUT parameters of function block<\/p>\n<ul>\n<li><strong>Mode <\/strong><\/li>\n<\/ul>\n<p>Users can choose the mode of this parameter as input (IN), output (OUT), or output-input (INOUT). When IN is selected, the value of the parameter before entering FCM will be inherited, and the change in FCM will be ignored after the function block is terminated. <\/p>\n<p>When selecting OUT, the value of the parameter before entering the FCM will be ignored, and if the value is changed, it will be output to the designated register.<\/p>\n<p>When INOUT is selected, it will have both the characteristics of IN and OUT, inherit the value of the parameter before entering FCM, and retain the changes in FCM.<\/p>\n<ul>\n<li><strong>Name<\/strong><\/li>\n<\/ul>\n<p>Users can define the name of the parameter by themselves.<\/p>\n<ul>\n<li><strong>Data Type<\/strong><\/li>\n<\/ul>\n<p>Users can select the data type of the parameter as 16Bit-Int, 16Bit-UInt, 32Bit-Int, 32Bit-UInt or Float.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-070.png\" \/><\/p>\n<p>Fig. 132: Data type<\/p>\n<ul>\n<li><strong>Return Value<\/strong><\/li>\n<\/ul>\n<p>After checking, the return value and the specified register will be output. It is mainly used in ST language.<\/p>\n<h4>6-7-2 Adjust Function Module Program<\/h4>\n<p>Click the function bar [Project] \u2192 [Program Unit] \u2192 [FCM Program] \u2192 [Adjust FCM Program] with the mouse; or right click [Adjust FCM Program] in the project management window [FCM Program] to adjust the FCM program order of sorting:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m04-en-06\/mplc-m04-en-06-071.png\" \/><\/p>\n<p>Fig. 133: Adjusting FCM Program<\/p>\n<h4>6-7-3 Import and Export Function Module Program<\/h4>\n<ul>\n<li><strong>Import:<\/strong><\/li>\n<\/ul>\n<p>Click the function bar [Project] \u2192 [Program Unit] \u2192 [FCM Program] \u2192 [Import Program] with the mouse; or right click [Import Program] in the project management window [FCM Program].<\/p>\n<ul>\n<li><strong>Export:<\/strong><\/li>\n<\/ul>\n<p>Right click the program to be exported in project management window and select [Export Program].<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u26a0Danger When installing or removing the M-series CPU mo [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48],"tags":[],"class_list":["post-3231","post","type-post","status-publish","format-standard","hentry","category-en-mplc-m04"],"_links":{"self":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts\/3231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/comments?post=3231"}],"version-history":[{"count":0,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts\/3231\/revisions"}],"wp:attachment":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/media?parent=3231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/categories?post=3231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/tags?post=3231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}