{"id":3377,"date":"2026-11-17T21:05:05","date_gmt":"2026-11-17T13:05:05","guid":{"rendered":"https:\/\/resource.fatek.com\/index.php\/2026\/11\/17\/fbs-hw-en-009\/"},"modified":"2026-11-17T21:12:54","modified_gmt":"2026-11-17T13:12:54","slug":"fbs-hw-en-009","status":"publish","type":"post","link":"https:\/\/resource.fatek.com\/index.php\/2026\/11\/17\/fbs-hw-en-009\/","title":{"rendered":"Chapter 9 FBs-PLC Interrupt Function"},"content":{"rendered":"<p>9.1The Principle and the Structure of Interrupt Function <\/p>\n<p>There are many jobs that FBs-PLC needs to carry out. For example, there are 20K words user\u2019s program need to be solved, 512 points of I\/O status need to be captured or updated, 5 communication ports need to be serviced, and etc. However, jobs can only be executed one at a time as there is merely one CPU available. Therefore, PLC service one job after another in sequence until all the jobs are executed once. Then, it will return to the first job to repeat the same cycle. The time interval of each execution is called the \u201cscan time\u201d of PLC. The CPU execution speed is extremely fast in comparison with human response. As far as human feeling is concerned, PLC almost completes all jobs at the same time when PLC can normally complete the foregoing huge workload within tens of milliseconds (ms). Hence, it can meet the requirements of the most practical control cases. <\/p>\n<p>In most application cases, the control method described above is very much sufficient. But for some applications that require a high-speed response (such as positioning control), a delay in scan time will certainly mean an increase in error. Under the circumstances, only applying the \u201cInterrupt\u201d function can achieve the precision requirement. <\/p>\n<p>The so-called \u201cInterrupt\u201d means the interrupt request to the CPU during normal scan cycle when an immediate response is required. After receiving such request, the CPU will promptly stop all scanning work to prioritize to perform and complete the corresponding service work before return (the so-called \u201cReturn from Interrupt\u201d or RTI) to where interrupt occurred and resume the interrupted scanning work. <\/p>\n<p>The service work needed to carry out while interrupt occurred is called Interrupt Service Routine, which is a subroutine consisted by a series of ladder codes. It is placed in the subroutine area and begin with the LBL instruction with reserved label name (please refer to Section 9.3). Since it is placed in the subroutine area, it will not be executed in a normal PLC scanning cycle (PLC only constantly scans the main program area but not the subroutine area). <\/p>\n<p>In normal case, the CPU can promptly execute the corresponding interrupt routine within hundreds of micro-seconds when an interrupt occurred. When there are more than one interrupt occurred at the same time (e.g. FBs-PLC has 49 interrupts source), only the interrupt with highest priority can be executed. All the other interrupt routines need to wait until it became the highest priority among the pending interrupts. Consequently, a response delay of hundreds of microseconds, or even few milliseconds, may be caused. Hence, in a multiple interrupt inputs structure, an interrupt priority is given to each interrupt in accordance with its importance. In case another interrupt request is made when the PLC is carrying out the interrupt service routine for an interrupt request that has a higher priority than the new interrupt request, the CPU will wait until the execution of the subroutine is completed before accepting the new interrupt request. However, if the priority of the new interrupt request is higher than the one being executed, the CPU will stop the running of the current interrupt service routine immediately to execute the interrupt service routine with a higher priority. After completing the execution, the CPU will return to the previously interrupted service routine with a lower priority to continue the incomplete work. This kind of interrupt in an interrupt execution is called the \u201cNested Interrupt\u201d. FBs-PLC can have up to 5 levels of nested interrupts. The diagram below shows the examples of single interrupts and nested interrupt: <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-001.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-002.png\" \/><\/p>\n<p>X8+interrupt <br \/>(Priorty:34)<\/p>\n<p>HSC0 interrupt <br \/>(Priority:10)<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Main <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>Mian Program<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>Mian Program<\/p>\n<\/td>\n<td colspan=\"2\" rowspan=\"2\">\n<p>Mian Program<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>Nested Subroutine <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>Program<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p>X8+I<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>X8+I Subroutine<\/p>\n<\/td>\n<td colspan=\"2\" rowspan=\"3\">\n<p>First level<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"4\">\n<p>Subroutine<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>can have up to 5 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>Subroutine<\/p>\n<\/td>\n<td colspan=\"2\" rowspan=\"2\">\n<p>HSC0I Subroutine<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>Second level<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>level<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>9.2Structure and Application of Interrupt Service Routine <\/p>\n<p>Although both \u201cInterrupt\u201d and \u201cCall\u201d are having subroutines, but the calling methods (to jump to subroutine for execution) are different. When the CALL command [FUN67] is executed by \u201cCall\u201d in the main program, the CPU will execute the subroutine with the label name designated by the CALL command. The CPU will return to the main program after the RTS (Return from Subroutine) command is executed. <\/p>\n<p>The calling of \u201cInterrupt\u201d is triggered by, instead of using software commands, the hardware interrupt signal to the CPU. The CPU will identify the source of the interrupt and jump automatically to the \u201cInterrupt Service Routine\u201d with the label name of the interrupt in the subroutine for execution. It will return to the main program after the RTI (Return from Interrupt) command is executed. Therefore, there is no ladder code relevant to interrupt in the main program area. <\/p>\n<p>Interrupt label \t(Head)<\/p>\n<p>As mentioned before, interrupt service routine <br \/>must be placed in the sub program area. The <br \/>structure is shown as the diagram on the right where <br \/>a \u201chead\u201d, a \u201ctail\u201d and the main body of the service <\/p>\n<p>routine are included. The \u201chead\u201d is the \u201cinterrupt label name\u201d of the interrupt (to be discussed in the next section). The \u201ctail\u201d is the RTI command [FUN69], to tell the CPU that the interrupt subroutine is ended and it should jump to the place where were interrupted, please refers to FUN69 (RTI) instruction. In between the \u201chead\u201d and the \u201ctail\u201d is the main body of the interrupt service routine used to tell the CPU what control actions should be executed when interrupt occurs. <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-003.png\" \/>The power line for subroutine is indicated by <\/p>\n<p>double lines to differentiate from the power line for <\/p>\n<p>9.3Interrupt Source, Label and Priority for FBs-PLC<\/p>\n<p>As described in the last section, every \u201cInterrupt Service Routine\u201d should have a unique \u201cInterrupt Label\u201d. There are 49 corresponding \u201cInterrupt Labels\u201d for interrupts, namely \u201cInterrupt Reserve Words\u201d, cab be used in the sub program area of FBs-PLC. These labels are dedicated to the interrupt routines hence cannot use for normal subroutine or jump target. <\/p>\n<p>The \u201cInterrupt Label\u201d (Interrupt Reserve Words) are all suffix with an \u201cI\u201d letter. For examples, the interrupt label for high-speed counter HSC0 should be \u201cHSC0I\u201d and the interrupt label for X0+ should be \u201cX0+I\u201d. The \u201cInterrupt Labels\u201d and their priorities for the 49 FBs-PLC interrupt sources of FBs-PLC are shown as below. <\/p>\n<p>The following table is the interrupt sources and their label names. To compatible with previous versions of programming tool, besides HSC\/HST, the label names in old versions are also enlisted (label name with parenthesis). <\/p>\n<p>The new label names are prefer than old while in usage (HSTAI, 1MSI~100MSI, X0+I~X15-I are prior in using).<\/p>\n<p>(The priority of interrupt is inversely proportional to the value of priority) <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Interrupt Source <\/p>\n<\/td>\n<td>\n<p>Priority <\/p>\n<\/td>\n<td>\n<p>Interrupt Label <\/p>\n<\/td>\n<td>\n<p>Condition for Interrupt <\/p>\n<\/td>\n<td>\n<p>Note <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>High Speed Timer <\/p>\n<\/td>\n<td>\n<p>1 <\/p>\n<\/td>\n<td>\n<p>HSTAI (ATMRI) <\/p>\n<\/td>\n<td>\n<p>Timing from HSTA to\uff08CV=PV\uff09<\/p>\n<\/td>\n<td>\n<p>No interrupt when act as a cyclic timer <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"8\">\n<p>Internal <br \/>Time Base <\/p>\n<\/td>\n<td>\n<p>2 <\/p>\n<\/td>\n<td>\n<p>1MSI (1MS) <\/p>\n<\/td>\n<td>\n<p>One interrupt every 1mS <\/p>\n<\/td>\n<td rowspan=\"8\">\n<p>One kind of time base interrupt is allowed at a time (please refer to <br \/>Section 9.5.2). <\/p>\n<p>Therefore, the actual <br \/>number of interrupts is 42.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>3 <\/p>\n<\/td>\n<td>\n<p>2MSI (2MS) <\/p>\n<\/td>\n<td>\n<p>One interrupt every 2mS <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>4 <\/p>\n<\/td>\n<td>\n<p>3MSI (3MS) <\/p>\n<\/td>\n<td>\n<p>One interrupt every 3mS <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>5 <\/p>\n<\/td>\n<td>\n<p>4MSI (4MS) <\/p>\n<\/td>\n<td>\n<p>One interrupt every 4mS <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>6 <\/p>\n<\/td>\n<td>\n<p>5MSI (5MS) <\/p>\n<\/td>\n<td>\n<p>One interrupt every 5mS <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>7 <\/p>\n<\/td>\n<td>\n<p>10MSI (10MS) <\/p>\n<\/td>\n<td>\n<p>One interrupt every 10mS <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>8 <\/p>\n<\/td>\n<td>\n<p>50MSI (50MS) <\/p>\n<\/td>\n<td>\n<p>One interrupt every 50mS <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>9 <\/p>\n<\/td>\n<td>\n<p>100MSI (100MS) <\/p>\n<\/td>\n<td>\n<p>One interrupt every 100mS <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"4\">\n<p>HSC <br \/>\uff0f<br \/>HST <\/p>\n<\/td>\n<td>\n<p>10 <\/p>\n<\/td>\n<td>\n<p>HSC0I\/HST0I <\/p>\n<\/td>\n<td>\n<p>Counting\/Timing from HSC0\/HST0 to (CV=PV)<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>HSC0~HSC3 are labeled as HSC0I~HSC3I when configured as high speed counter; and are labeled as HST0I~HST3I for <br \/>high speed timer. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>11 <\/p>\n<\/td>\n<td>\n<p>HSC1I\/HST1I <\/p>\n<\/td>\n<td>\n<p>Counting\/Timing from HSC1\/HST1 to (CV=PV)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>12 <\/p>\n<\/td>\n<td>\n<p>HSC2I\/HST2I <\/p>\n<\/td>\n<td>\n<p>Counting\/Timing from HSC2\/HST2 to (CV=PV)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>13 <\/p>\n<\/td>\n<td>\n<p>HSC3I\/HST3I <\/p>\n<\/td>\n<td>\n<p>Counting\/Timing from HSC3\/HST3 to (CV=PV)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"4\">\n<p>PSO <\/p>\n<\/td>\n<td>\n<p>14 <\/p>\n<\/td>\n<td>\n<p>PSO0I <\/p>\n<\/td>\n<td>\n<p>Pulse output of PSO0 completed <\/p>\n<\/td>\n<td rowspan=\"4\"><\/td>\n<\/tr>\n<tr>\n<td>\n<p>15 <\/p>\n<\/td>\n<td>\n<p>PSO1I <\/p>\n<\/td>\n<td>\n<p>Pulse output of PSO1 completed <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>16 <\/p>\n<\/td>\n<td>\n<p>PSO2I <\/p>\n<\/td>\n<td>\n<p>Pulse output of PSO2 completed <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>17 <\/p>\n<\/td>\n<td>\n<p>PSO3I <\/p>\n<\/td>\n<td>\n<p>Pulse output of PSO3 completed <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Interrupt Source <\/p>\n<\/td>\n<td>\n<p>Priority <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Interrupt Label <\/p>\n<\/td>\n<td>\n<p>Condition for Interrupt <\/p>\n<\/td>\n<td>\n<p>Note <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"32\">\n<p>Interrupt from <br \/>External <br \/>Hardware Input or Software <br \/>High-Speed <br \/>Timer <\/p>\n<\/td>\n<td>\n<p>18 <\/p>\n<\/td>\n<td>\n<p>X0+I (INT0) <\/p>\n<\/td>\n<td rowspan=\"32\">\n<p>\u2191<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<\/p>\n<p>HSC4I <\/p>\n<p>\u222b<\/p>\n<p>HSC7I <\/p>\n<p>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2502<br \/>\u2193<\/p>\n<\/td>\n<td>\n<p>Interrupt when 0\u21921\uff08\u2022\uff09of X0 <\/p>\n<\/td>\n<td rowspan=\"32\">\n<p>The counter input and control input of the <br \/>software high speed counter HSC4 \uff5e<br \/>HSC7 which were <br \/>implemented by the <br \/>interrupt function can be designated as any one input of X0\uff5e<br \/>X15. Therefore, the <br \/>interrupt priority of the software high speed counter depends on the input it utilized. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>19 <\/p>\n<\/td>\n<td>\n<p>X0\u2212I (INT0\u2212) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 1\u21920\uff08\u2022\uff09of X0 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>20 <\/p>\n<\/td>\n<td>\n<p>X1+I (INT1) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 0\u21921\uff08\u2022\uff09of X1 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>21 <\/p>\n<\/td>\n<td>\n<p>X1\u2212I (INT1\u2212) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 1\u21920\uff08\u2022\uff09of X1 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>22 <\/p>\n<\/td>\n<td>\n<p>X2+I (INT2) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 0\u21921\uff08\u2022\uff09of X2 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>23 <\/p>\n<\/td>\n<td>\n<p>X2\u2212I (INT2\u2212) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 1\u21920\uff08\u2022\uff09of X2 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>24 <\/p>\n<\/td>\n<td>\n<p>X3+I (INT3) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 0\u21921\uff08\u2022\uff09of X3 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>25 <\/p>\n<\/td>\n<td>\n<p>X3\u2212I (INT3\u2212) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 1\u21920\uff08\u2022\uff09of X3 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>26 <\/p>\n<\/td>\n<td>\n<p>X4+I (INT4) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 0\u21921\uff08\u2022\uff09of X4 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>27 <\/p>\n<\/td>\n<td>\n<p>X4\u2212I (INT4\u2212) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 1\u21920\uff08\u2022\uff09of X4 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>28 <\/p>\n<\/td>\n<td>\n<p>X5+I (INT5) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 0\u21921\uff08\u2022\uff09of X5 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>29 <\/p>\n<\/td>\n<td>\n<p>X5\u2212I (INT5\u2212) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 1\u21920\uff08\u2022\uff09of X5 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>30 <\/p>\n<\/td>\n<td>\n<p>X6+I (INT6) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 0\u21921\uff08\u2022\uff09of X6 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>31 <\/p>\n<\/td>\n<td>\n<p>X6\u2212I (INT6\u2212) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 1\u21920\uff08\u2022\uff09of X6 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>32 <\/p>\n<\/td>\n<td>\n<p>X7+I (INT7) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 0\u21921\uff08\u2022\uff09of X7 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>33 <\/p>\n<\/td>\n<td>\n<p>X7\u2212I (INT7\u2212) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 1\u21920\uff08\u2022\uff09of X7 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>34 <\/p>\n<\/td>\n<td>\n<p>X8+I (INT8) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 0\u21921\uff08\u2022\uff09of X8 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>35 <\/p>\n<\/td>\n<td>\n<p>X8\u2212I (INT8\u2212) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 1\u21920\uff08\u2022\uff09of X8 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>36 <\/p>\n<\/td>\n<td>\n<p>X9+I (INT9) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 0\u21921\uff08\u2022\uff09of X9 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>37 <\/p>\n<\/td>\n<td>\n<p>X9\u2212I (INT9\u2212) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 1\u21920\uff08\u2022\uff09of X9 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>38 <\/p>\n<\/td>\n<td>\n<p>X10+I (INT10) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 0\u21921\uff08\u2022\uff09of X10 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>39 <\/p>\n<\/td>\n<td>\n<p>X10\u2212I (INT10\u2212) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 1\u21920\uff08\u2022\uff09of X10 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>40 <\/p>\n<\/td>\n<td>\n<p>X11+I (INT11) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 0\u21921\uff08\u2022\uff09of X11 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>41 <\/p>\n<\/td>\n<td>\n<p>X11\u2212I (INT11\u2212) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 1\u21920\uff08\u2022\uff09of X11 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>42 <\/p>\n<\/td>\n<td>\n<p>X12+I (INT12) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 0\u21921\uff08\u2022\uff09of X12 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>43 <\/p>\n<\/td>\n<td>\n<p>X12\u2212I (INT12\u2212) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 1\u21920\uff08\u2022\uff09of X12 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>44 <\/p>\n<\/td>\n<td>\n<p>X13+I (INT13) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 0\u21921\uff08\u2022\uff09of X13 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>45 <\/p>\n<\/td>\n<td>\n<p>X13\u2212I (INT13\u2212) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 1\u21920\uff08\u2022\uff09of X13 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>46 <\/p>\n<\/td>\n<td>\n<p>X14+I (INT14) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 0\u21921\uff08\u2022\uff09of X14 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>47 <\/p>\n<\/td>\n<td>\n<p>X14\u2212I (INT14\u2212) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 1\u21920\uff08\u2022\uff09of X14 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>48 <\/p>\n<\/td>\n<td>\n<p>X15+I (INT15) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 0\u21921\uff08\u2022\uff09of X15 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>49 <\/p>\n<\/td>\n<td>\n<p>X15\u2212I (INT15\u2212) <\/p>\n<\/td>\n<td>\n<p>Interrupt when 1\u21920\uff08\u2022\uff09of X15 <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-004.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-005.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-006.png\" \/><\/p>\n<p>9.4How to Use Interrupt of FBs-PLC <\/p>\n<p>The applications of interrupt in internal timing, external input, HSC\/HST or PSO are similar. Since the applications <\/p>\n<p>of HSC\/HST and PSO have been described in other chapters\/sections, only examples of internal timing and external input <\/p>\n<p>will be described in this section. <\/p>\n<p>Begin <\/p>\n<p>Setup interrupt configuration <\/p>\n<p>Writing interrupt service routine in <\/p>\n<p>sub program area <\/p>\n<p>End <\/p>\n<p>9.5Interrupt Configuration <\/p>\n<p> &#8212;&#8212;&#8212;&#8212;&#8212; Refer to section 9.5 <\/p>\n<p> &#8212;&#8212;&#8212;&#8212;&#8212; Refer to section 9.6 <\/p>\n<p>In fact, interrupt configuration is simply to determine whether the application of a certain interrupt is to be used or not. <\/p>\n<p>Interrupt configuration can be divided into configuration relevant to I\/O or irrelevant to I\/O two categories. HSTA, HSC\/HST, PSO and external interrupt are all relevant to I\/O and should be performed by the configuration function of programming tool, WinProladder or FP-08. The programming tool will automatically enable the interrupt of the device once it is configured. <\/p>\n<p>The configuration of internal time base interrupt (1MSI~100MSI), which is irrelevant to I\/O, need not to be configured. As long as the time base interrupt reserved words, which is placed in front of the interrupt service subroutine, appears in the sub program area, it imply the interrupt has been planned. If more than one such interrupts appear, can use low byte, B0~B7, of the special register R4162 to control the interrupt of 1MSI~100MSI to be executed or not. <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-007.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-008.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-009.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-010.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-011.png\" \/><\/p>\n<h4>9.5.1Interrupt Configuration Through the Operation of FP-08 <\/h4>\n<p>\u3010Keypad Operation\u3011\u3010LCD Display\u3011<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-012.png\" \/><\/p>\n<p>\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<br \/>\u2022<\/p>\n<p>\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<br \/>\u2022<\/p>\n<p>\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<br \/>\t\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<\/p>\n<p>\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<br \/>\t\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<\/p>\n<p>\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<br \/>\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<\/p>\n<p>\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<\/p>\n<p>\u2022\u2022\u2022\u2022\u2022\u2022<br \/>\u2022<\/p>\n<p>\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<br \/>\u2022<\/p>\n<p>\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<br \/>\u2022\u2022<\/p>\n<p>\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<br \/>\t\u2022\u2022\u2022\u2022\u2022<\/p>\n<p>\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<br \/>\t\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<\/p>\n<p>\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<br \/>\t\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<\/p>\n<p>\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<br \/>\u2022\u2022<\/p>\n<p>\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<br \/>\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<\/p>\n<p>\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022<br \/>\u2022\u2022<\/p>\n<p>z External interrupt shares the 16 high-speed input points, X0~X15, with HSC and SPD instructions. Therefore, the \tnumber of the input points used by HSC or SPD cannot configure for external interrupt. <\/p>\n<p> Note: SPD instruction can only uses X0~X7 8 input points for average speed detection. <\/p>\n<p>z Once the interrupt configuration is determined, it cannot be changed in PLC RUN. But the EN command [FUN145] and DIS command [FUN146] provided by FBs-PLC can dynamically enable\/disable the operation of interrupt of external, HSC and HSTA in PLC RUN. Please refer to the description of the two instructions. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p> 9.5.2 Interrupt Configuration Through the Operation of WinProladder <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>Click the item \u201cI\/O Configuration\u201d which in Project Windows <strong>: <\/strong><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"3\">\n<p> Project name <\/p>\n<\/td>\n<td colspan=\"4\" rowspan=\"2\"><\/td>\n<\/tr>\n<tr>\n<td rowspan=\"5\"><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p> S<\/p>\n<\/td>\n<td>\n<p>stem Co<\/p>\n<\/td>\n<td>\n<p>nfigurat<\/p>\n<\/td>\n<td>\n<p>on <\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p> I\/O Configuration  \u00c6 Select  \u201cInterrupt Setup\u201d <\/p>\n<p>When \u201cInterrupt Setup\u201d windows appear, then you can choose the Interrupt which you want. <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-013.png\" \/><\/p>\n<h4> 9.5.3Internal Time Base Interrupt Configuration by R4162<\/h4>\n<p>When the internal time base interrupt reserved words (8 kinds, 1MSI~100MSI) appears in the sub program area, it imply that the designated interrupt has been planned and can be masked by using the 8 bits of the low byte in the register R4162 as shown in below: <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>R4162: <\/p>\n<\/td>\n<td>\n<p>B7 \tB6 \tB5 \tB4 \tB3 \tB2 \tB1 \tB0 <\/p>\n<p>\uff5e<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td><\/td>\n<td>\n<p>100MS <\/p>\n<\/td>\n<td>\n<p>50MS <\/p>\n<\/td>\n<td>\n<p>10MS <\/p>\n<\/td>\n<td>\n<p>5MS <\/p>\n<\/td>\n<td>\n<p>4MS <\/p>\n<\/td>\n<td>\n<p>3MS <\/p>\n<\/td>\n<td>\n<p>2MS <\/p>\n<\/td>\n<td>\n<p>1MS <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\uff5e<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u2022 When bit status =0: Enable the time base interrupt (not masked) \u2022 When bit status =1: Disable the time base interrupt (masked) <\/p>\n<p>z Among B0~B7, if more than one of the bits is 0, FBs-PLC will enable the one with the smallest time base and disable the others. If the content of R4162 is 00H, then all time base interrupts will not be masked. However, if 1 MS and 2MS~100MS time base interrupt subroutine are all appeared in subprogram area, only the 1MS time base interrupt will be executed, and the others will not be executed. <\/p>\n<p>z It is with great flexibility since the user can dynamically change the time base or pause or enable the interrupt by using the ladder program to change the value of R4162 at any time in PLC RUN. <\/p>\n<p>z The default of R4162 is 0; it represents that 1MS~100MS time base interrupt are not been masked. As long as any one of time base interrupt processing subroutine exists in the sub program area, it will be executed periodically. <\/p>\n<p>z Since a considerable CPU time is required for execution of every interrupt, the smaller the interrupt time base, the more interrupts required and the longer CPU time occupied. Therefore, application should be made only when necessary to avoid degradation of CPU performance. <\/p>\n<p>9.6Examples of Interrupt Routine <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p> Example 1  Precision position control by positioning switch .(Configure X0 as the positive edge interrupt input) <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>X0 : Position Sensor <br \/>X1 : Emergency Stop <br \/>Y0\uff1aPower motor<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-014.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-015.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-016.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-017.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-018.png\" \/><\/p>\n<p>\u3010Main program\u3011<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>M0<\/p>\n<\/td>\n<td>\n<p>X0<\/p>\n<\/td>\n<td>\n<p>SET<\/p>\n<\/td>\n<td>\n<p>Y0<\/p>\n<\/td>\n<td>\n<p>\u2022 M0 (start) changes from 0\u21921, the motor is ON. <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>X1 <br \/>\tRST \tY0<\/p>\n<p>\u3010Subroutine\u3011<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>65<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>X0+I<\/p>\n<\/td>\n<td>\n<p>\u2022 When the sensor, X0, detects the arriving of positioning <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>LBL<\/p>\n<\/td>\n<td>\n<p>location, i.e. X0 change from 0 \u21921, the hardware will <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>automatically execute the interrupt subroutine <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"6\">\n<p>69<\/p>\n<\/td>\n<td>\n<p>EN<\/p>\n<\/td>\n<td>\n<p>RST<\/p>\n<\/td>\n<td>\n<p>Y0<\/p>\n<\/td>\n<td>\n<p>\u2022 As motor Y0 changes to 0, it stops the motor immediately. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"5\">\n<p>EN<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>74.IMDI0<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u2022 Output Y0 immediately to reduce delay caused by scan time <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>D  :<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>Y0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u2022 It must employ immediate input\/output instruction in the <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>N  :<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>1<\/p>\n<\/td>\n<td>\n<p>interrupt subroutine to meet the real time high speed <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>precision control requirement. <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>RTI<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p> Example 2   1MS Internal Time base Interrupt <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u3010Main program\u3011<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"4\">\n<p>M0<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>EN<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>08.MOV<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u2022 When M0=1, 1MS timing interrupt is disabled <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>S  :<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>(1MS timing interrupt being masked) <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D  :<\/p>\n<\/td>\n<td>\n<p>R4162<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p>M0<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>EN<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>08.MOV<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>\u2022 When M0=0, 1MS timing interrupt is enabled <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>S  :<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D  :<\/p>\n<\/td>\n<td>\n<p>R4162<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u3010Subroutine\u3011<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>65<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>1MSI<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>15<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>R0<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>OVF<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u2022 After 1MS time base interrupt is started, the system will <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p>LBL<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>EN<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>automatically execute the interrupt subroutine every 1MS <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>(+1)<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u2022 R0 is used as the up counting cyclic timer for every 1MS <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"4\">\n<p>69<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>EN<\/p>\n<\/td>\n<td>\n<p>16<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>R1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>UDF<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>time base <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p>(-1)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>\u2022 R1 is used as the down counting cyclic timer for every <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>RTI<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>1MS time base <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p> 9.7Capture Input and Digital Filter <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>In many high-speed application, you can set interrupt input to prevent signal lose. Besides, you can set Captured <\/p>\n<p>Input to capture the transient input signal less than one PLC scan time. The method to set Capture Input is very easy. <\/p>\n<p>Click the item \u201cI\/O Configuration\u201d which in Project Windows <strong>: <\/strong><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"3\">\n<p> Project name <\/p>\n<\/td>\n<td colspan=\"4\" rowspan=\"2\"><\/td>\n<\/tr>\n<tr>\n<td rowspan=\"5\"><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p> S<\/p>\n<\/td>\n<td>\n<p>stem Co<\/p>\n<\/td>\n<td>\n<p>nfigurat<\/p>\n<\/td>\n<td>\n<p>on <\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p> I\/O Configuration  \u00c6 Select  \u201cInput Setup\u201d <\/p>\n<p>When \u201cInput Setup\u201d windows appear, then you can choose the Capture Input point which you want. <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-019.png\" \/><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p> Example_1 <\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p> When the input is configured as the captured input and used for counting application, it is necessary that the input <\/p>\n<p>signal period must be greater than 2 scan time for correct counting. For example the input frequency is 50Hz, then the <\/p>\n<p>scan time of PLC must be less than 10mS for counting without loss. <\/p>\n<p>Input signal &lt; PLC scan time<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-020.png\" \/><\/p>\n<p>PLC scan time PLC scan time<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-021.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-022.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-023.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-024.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-025.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-026.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-027.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-028.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-029.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-030.png\" \/><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p> Example_2 <\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p> The captured input can get the input signal which duration is less than 1 scan time of PLC. <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-031.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-032.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-033.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-034.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-035.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-036.png\" \/><\/p>\n<p>The FBs series PLC main unit supports the captured input function as mentioned above, except this, it also supplies the digital filtering function for digital inputs X0~X35. There are 6 groups of digital inputs { (X0~X3)\u3001(X4~X7)\u3001(X8~X11)\u3001(X12~X15)\u3001(X16~X23)\u3001(X24~X35) } for filtering setting. <\/p>\n<p> There are 2 methods for digital filtering, one is the frequency domain, the other is the time domain. The filtering setting for upper four groups of digital inputs (X0~X15) can be either frequency domain or time domain; while in frequency domain, it supports the range of 14KHz\uff5e1.8MHz in total 8 selections; while in time domain, it supports the range of 1~15\u00d71mS or 1~15\u00d70.1mS selections. The last two groups of digital inputs (X16~X35) only supports the time domain, and the selections are 1~15\u00d71mS. <\/p>\n<p> Example 1 <\/p>\n<p> When the filtering time is 2mS, if the ON or OFF duration is less than 2mS, it will lose the ON or OFF signal. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-037.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-038.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-039.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-040.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-041.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-042.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-043.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-044.png\" \/><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p> Example 2 <\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-045.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-046.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-047.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-048.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-049.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-050.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-051.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-052.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-053.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-054.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-055.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-056.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p> When the filtering frequency is 28KHz, if the input frequency is greater than 28KHz, it will lose the input signal. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-057.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-058.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-059.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-060.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-061.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-062.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-063.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-064.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-065.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-009\/fbs-hw-en-009-066.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>9.1The Principle and the Structure of Interrupt Functio [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[],"class_list":["post-3377","post","type-post","status-publish","format-standard","hentry","category-en-fbs-hw"],"_links":{"self":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts\/3377","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=3377"}],"version-history":[{"count":0,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts\/3377\/revisions"}],"wp:attachment":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/media?parent=3377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/categories?post=3377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/tags?post=3377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}