{"id":3272,"date":"2026-11-17T18:39:59","date_gmt":"2026-11-17T10:39:59","guid":{"rendered":"https:\/\/resource.fatek.com\/index.php\/2026\/11\/17\/mplc-m07-en-06\/"},"modified":"2026-11-17T18:39:59","modified_gmt":"2026-11-17T10:39:59","slug":"mplc-m07-en-06","status":"publish","type":"post","link":"https:\/\/resource.fatek.com\/index.php\/2026\/11\/17\/mplc-m07-en-06\/","title":{"rendered":"Chapter 6. Basic Function Instruction"},"content":{"rendered":"<h3>6-1  TIMER(T)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>T<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>TIMER<\/p>\n<\/td>\n<td>\n<p>T<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"4\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-001.png\" \/><\/p>\n<p>TB: Time Base (0.001S,0.01S, 0.1S, 1S)<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>Tn: Timer Number<\/p>\n<p>PV: Preset value of the timer.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WX<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>IR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WX0<\/p>\n<p>\u2223<\/p>\n<p>WX1008<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R34768<\/p>\n<p>\u2223<\/p>\n<p>R34895<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D11999<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<p>\u2223<\/p>\n<p>32767<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Tn<\/p>\n<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>PV<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<ul>\n<li>The total number of timers is 1024 (T0\uff5eT1023) with three different time bases, 0.01S, 0.1S and 1S.The default number and allocation of timers is shown as below (Can be adjusted according to user\u2019s actual requirements by the \u201cConfiguration\u201d function):<\/li>\n<\/ul>\n<p>T0\uff5eT255\uff1a0.001S timer\uff08default as 0.00\uff5e32.767S\uff09<\/p>\n<p>T256\uff5eT511\uff1a0.01S timer\uff08default as 0.0\uff5e327.67S\uff09<\/p>\n<p>T512\uff5eT767\uff1a0.1S timer\uff08default as 0\uff5e3276.7S\uff09<\/p>\n<p>T768\uff5eT1023\uff1a1S timer\uff08default as 0\uff5e32767S\uff09<\/p>\n<ul>\n<li>The Timer of M-Series PLC will start to run when subprogram triggers. To stop the Timer operation, you must Disable the Timer, not calling the subprogram, which is not equal to Disable Timer. If there is no Disable Timer, it will continue to count.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>T<\/p>\n<\/td>\n<td>\n<p>TIMER<\/p>\n<\/td>\n<td>\n<p>T<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<ul>\n<li>If PV is a register, then Timer\u2019s time = Time base x register content. Therefore, you only need to change the register content to change the timer\u2019s time. Please refer to Example 2.<\/li>\n<li>The maximum error of a timer is a time base plus a scan time. In order to reduce the timing error in the application, please use the timer with a smaller time base.<\/li>\n<li>When the time control \u201cEN\u201d is 1, the timer will start timing (the current value will accumulate from 0) until \u201cTime Up\u201d (i.e., CV\u2267PV), then the Tn contact and TUP (FO0) will change to 1. As long as the timer control \u201cEN\u201d input is kept as 1, even the CV of Tn has reached or exceeded the PV, the CV of the timer will continue accumulating, until it reaches the maximum limit (32767). The Tn contact status and flag will remain as 1 when CV\u2267PV, unless the \u201cEN\u201d input is 0. When \u201cEN\u201d input is 0, the CV of Tn will be reset to 0 immediately and the Tn contact and \u201cTime Up\u201d flag TUP will also change to 0 (please refer to the diagram \u2780 below).<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>T<\/p>\n<\/td>\n<td>\n<p>TIMER<\/p>\n<\/td>\n<td>\n<p>T<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example 1<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Fixed Time Timer<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-002.png\" \/><\/p>\n<\/td>\n<td>\n<p>M9158 := FALSE;<\/p>\n<p>Timer( EN:= X1, <\/p>\n<p>       T:= 0, <\/p>\n<p>       PV:= 1000, <\/p>\n<p>       IsTimeout=&gt; Y0);<\/p>\n<p>M9158 := TRUE;<\/p>\n<p>Timer( EN:= X1, <\/p>\n<p>       T:= 1, <\/p>\n<p>       PV:= 1000, <\/p>\n<p>       IsTimeout=&gt; T1);<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-003.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-004.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>T<\/p>\n<\/td>\n<td>\n<p>TIMER<\/p>\n<\/td>\n<td>\n<p>T<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example 2<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Variable Time Timer<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<ul>\n<li>The preset value (PV) shown in example 1 is a constant which is equal to 1000. This value is fixed and can not be changed once programmed. In many circumstances, the preset time of the timers needs to be varied while PLC running. In order to change the preset time of a timer, can first use a register as the PV operand (R or D&#8230;) and then the preset time can be varied by changing the register content. As shown in this example, if set R0 to 100, then T becomes a 10S Timer, and hence if set R0 to 200, then T becomes a 20S Timer. So that we can easily change the timer dynamically while the PLC is running.<\/li>\n<\/ul>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-005.png\" \/><\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>Timer( EN:= X1, <\/p>\n<p>       T:= 512, <\/p>\n<p>       PV:= R0, <\/p>\n<p>       IsTimeout=&gt; T512);<\/p>\n<p>IF T512 THEN<\/p>\n<p>Y0 := TRUE;<\/p>\n<p>ELSE<\/p>\n<p>Y0 := FALSE;<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>An example of applying the \u201ctime-up\u201d status by using the T512 contact.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\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\/mplc-m07-en-06\/mplc-m07-en-06-006.jpg\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<ul>\n<li>Note: If the preset value of the timer is equal to 0, then the timer&#8217;s contact status and become 1 (&quot;EN&quot; input must be at 1) immediately, after the PLC finishes its first scan because &quot;Time-Up&quot; has occurred. (TUP) stays at 1 until &quot;EN&quot; input changes to 0.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-2  COUNTER(C)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>C<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>COUNTER<\/p>\n<p>(16-Bit: C0\uff5eC1023\uff0c32-Bit: C1024\uff5eC1279)<\/p>\n<\/td>\n<td>\n<p>C<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-007.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>Cn: The Counter number<\/p>\n<p>PV: Preset value<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WX<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>IR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WX0<\/p>\n<p>\u2223<\/p>\n<p>WX1008<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R34768<\/p>\n<p>\u2223<\/p>\n<p>R34895<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D11999<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<p>\u2223<\/p>\n<p>32767<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Cn<\/p>\n<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>PV<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<ul>\n<li>There is total 1024 16-Bit counters (C0~C1023). The range of preset value is between 0~32767. C0~C139 are Retentive Counters and the CV value will be retained when the PLC turns on or RUN again after a power failure or a PLC STOP. C140~C1023 are Non-Retentive Counters, if a power failure or PLC STOP occurs, the CV value will be reset to 0 when the PLC turns on or RUN again.<\/li>\n<li>There is total 56 32-Bit counters (C1024~C1079). The range of the preset value is between 0~2147483647. C1024~C1063 are Retentive Counters and C1063~C1279 are Non-Retentive Counters.<\/li>\n<li>The above 16-bit and 32-bit counters&#8217; retentive\/non-retentive number distribution is the original factory setting. If this does not meet your needs, you can use the &quot;Frame Configuration&quot; function to adjust.<\/li>\n<li>To ensure the proper counting from C0~C1024, the sustain time of input status of CLK should greater than 1 scan time.<\/li>\n<li>This command counts based on the changes in the PLS signal during each scan cycle. Therefore, as long as the duration of the signal change exceeds the scan cycle, this command can detect the change. However, the scan cycle time will vary depending on the number of user programs. To obtain accurate count values, please use a high-speed counter in software or hardware.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>C<\/p>\n<\/td>\n<td>\n<p>COUNTER<\/p>\n<p>(16-Bit: C0\uff5eC1023\uff0c32-Bit: C1024\uff5eC1279)<\/p>\n<\/td>\n<td>\n<p>C<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<ul>\n<li>When &quot;CLR&quot; is at 1, all of the contact Cn, FO0 (CUP), and CV value of the counter CV are cleared to 0 and the counter stops counting.<\/li>\n<li>When &quot;CLR&quot; = 0, the counter is allowed to count, because the counter command is essentially a &quot;P command&quot;, so only when the counting pulse &quot;PLS&quot; changes from 0 to 1, the current value CV of the counter Cn will increase by 1. Until &quot;Count up&quot; (Count up, that is, CV value \u2267 set value), the count up contact Cn and the count up flag CUP (FO0) of the counter will both become 1. If there is still counting pulse input at this time, the current value CV of Cn will exceed the set value and continue to accumulate, until it reaches the upper limit (32767 or 2147483647), and the Cn contact and the counting flag CUP will As long as CV\u2267PV, it will always be 1, unless the clear control CLR input becomes 1. (Please refer the diagram \u2780 below)<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example 1<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Fixed Time Counter<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\t<img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-008.png\" \/><\/p>\n<\/td>\n<td>\n<p>Counter( Pulse:= X0, <\/p>\n<p>         Clr:= Y1, <\/p>\n<p>         C:= 2, <\/p>\n<p>         PV:= 5, <\/p>\n<p>         IsUp=&gt; Y1);<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\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\/mplc-m07-en-06\/mplc-m07-en-06-009.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>C<\/p>\n<\/td>\n<td>\n<p>COUNTER<\/p>\n<p>\uff0816-Bit: C0\uff5eC1023\uff0c32-Bit: C1024\uff5eC1279\uff09<\/p>\n<\/td>\n<td>\n<p>C<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example 2<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>32-Bit counter with variable value<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<ul>\n<li>Like a timer, if the PV of a counter is changed to a register (such as R, D, and so on), the counter will use the register contents as the counting PV. Therefore, only need to change the register contents to change the PV of the counter while PLC is running. Below is an example of a 32-bit counter that uses the data register R0 as the PV (in fact it is the 32-bit PV formed by R1 and R0).<\/li>\n<li>Like a timer, if the PV of a counter is changed to a register (such as R, D, and so on), the counter will use the register contents as the counting PV. Therefore, only need to change the register contents to change the PV of the counter while PLC is running. Below is an example of a 32-bit counter that uses the data register R0 as the PV (in fact it is the 32-bit PV formed by R1 and R0).<\/li>\n<\/ul>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-010.png\" \/><\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>Counter( Pulse:= X0,<\/p>\n<p>Clr:= X1,<\/p>\n<p>C:= 1024,<\/p>\n<p>PV:= R0,<\/p>\n<p>IsUp=&gt; C1024);<\/p>\n<p>IF C1024 THEN<\/p>\n<p>Y1 := TRUE;<\/p>\n<p>ELSE<\/p>\n<p>Y1 := FALSE;<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>An example of applying the \u201cTime-up\u201d status by using the C1024 contact.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>C<\/p>\n<\/td>\n<td>\n<p>COUNTER<\/p>\n<p>\uff0816-Bit: C0\uff5eC1023\uff0c32-Bit: C1024\uff5eC1279\uff09<\/p>\n<\/td>\n<td>\n<p>C<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example 2<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>32-Bit counter with variable value<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>\u2780<\/p>\n<p>\u2781<\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-011.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<ul>\n<li>Note: If the preset value of the counter is 0 and &quot;CLR&quot; input also at 0, then the Cn contact status and FO0 (CUP) becomes 1 immediately after the PLC finishes its first scan because the &quot;Count-Up&quot; has occurred. It will stay at 1 regardless how the CV value varies until &quot;CLR&quot; input changes to 1.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-3  SET(S)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>SET D P<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>SET<\/p>\n<p>(Set coil or all the bits of register to 1)<\/p>\n<\/td>\n<td>\n<p>SET D P<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"4\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p>  <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-012.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>D: destination to be set <\/p>\n<p>(The number of a coil or a register)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>Y<\/p>\n<\/td>\n<td>\n<p>M<\/p>\n<\/td>\n<td>\n<p>SM<\/p>\n<\/td>\n<td>\n<p>S<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>IR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Y0<\/p>\n<p>\u2223<\/p>\n<p>Y1023<\/p>\n<\/td>\n<td>\n<p>M0<\/p>\n<p>\u2223<\/p>\n<p>M9119<\/p>\n<\/td>\n<td>\n<p>M9120<\/p>\n<p>\u2223<\/p>\n<p>M25599<\/p>\n<\/td>\n<td>\n<p>S0<\/p>\n<p>\u2223<\/p>\n<p>S3103<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R34768<\/p>\n<p>\u2223<\/p>\n<p>R34895<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<ul>\n<li>When the set control &quot;EN&quot; =1 or from 0 \u2192 1 (P instruction), sets the bit of a coil or all bits of a register to 1.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Example 1<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>   Single Coil Set<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-013.png\" \/><\/p>\n<\/td>\n<td>\n<p>IF X0 THEN<\/p>\n<p>Y0 := TRUE;<\/p>\n<p>END_IF<\/p>\n<p>IF X1 THEN<\/p>\n<p>Y0 := FALSE;<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>SET D P<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>SET<\/p>\n<p>(Set coil or all the bits of register to 1)<\/p>\n<\/td>\n<td>\n<p>SET D P<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-014.png\" \/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Example 2<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>   Set 16-Bit Register<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-015.png\" \/><\/p>\n<\/td>\n<td>\n<p>IF X0 THEN<\/p>\n<p>R0 := -1;<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>                     B15\tB0                                         <\/p>\n<p>\t\u2193\t\u2193<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u21e9X0\uff1d<\/p>\n<p>\tB15\tB0<\/p>\n<p>\t\u2193\t\u2193<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>SET D P<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>SET<\/p>\n<p>(Set coil or all the bits of register to 1)<\/p>\n<\/td>\n<td>\n<p>SET D P<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Example 3<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>   32-Bit Register Set<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-016.png\" \/><\/p>\n<\/td>\n<td>\n<p>IF X0 THEN<\/p>\n<p>DR0 := -1;<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\t B31\t R1\tR0          B0<\/p>\n<p>\t\u2193\t\u2223\t\u2193<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u21e9X0\uff1d1<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<ul>\n<li>Note: If you use a single coil set (Y, M, S), it is recommended to use &quot;coil set&quot;, the efficiency of using the PLC will be better than set instruction<\/li>\n<li>The example is as follows: <\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-017.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-4  RST(R)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>RST D P<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>RESET<\/p>\n<p>(Reset the coil or the register to 0)<\/p>\n<\/td>\n<td>\n<p>RST D P<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"4\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-018.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>D: Destination to be reset <\/p>\n<p>(The number of a coil or a register)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>Y<\/p>\n<\/td>\n<td>\n<p>M<\/p>\n<\/td>\n<td>\n<p>SM<\/p>\n<\/td>\n<td>\n<p>S<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Y0<\/p>\n<p>\u2223<\/p>\n<p>Y1023<\/p>\n<\/td>\n<td>\n<p>M0<\/p>\n<p>\u2223<\/p>\n<p>M9119<\/p>\n<\/td>\n<td>\n<p>M9120<\/p>\n<p>\u2223<\/p>\n<p>M25599<\/p>\n<\/td>\n<td>\n<p>S0<\/p>\n<p>\u2223<\/p>\n<p>S3103<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<ul>\n<li>When the reset control &quot;EN&quot; =1 or from 0 \u2192 1 ( P instruction ), resets the coil or register to 0.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Example 1<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>    Single Coil Reset<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<p>Please refer to example 1 for the SET instruction <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Example 2<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>    16-Bit Register Reset<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-019.png\" \/><\/p>\n<\/td>\n<td>\n<p>IF X0 THEN<\/p>\n<p>R0 := 0;<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<p>\tB15                        B0<\/p>\n<p>\t\u2193\t\u2193<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u21e9X0\uff1d<\/p>\n<p>\tB15\tB0<\/p>\n<p>\t\u2193\t\u2193<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Example 3<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>    32-Bit Register Reset<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-020.png\" \/><\/p>\n<\/td>\n<td>\n<p>IF X0 THEN<\/p>\n<p>WM1376 := 0;<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\tM1408\tWM1392\tWM1376     M1376       <\/p>\n<p>\t\u2193\t\u2223\t\u2193<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>WM1376<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u21e9X0\uff1d1<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>WM1376<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<ul>\n<li>Note:<\/li>\n<li>If you use a single coil reset (Y, M, S), it is recommended to use &quot;coil reset&quot;, the efficiency of using the PLC will be better than set instruction<\/li>\n<li>The example is as follows: <\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-021.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-5  MASTER CONTROL(MC)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN0<\/p>\n<p>MC<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>MASTER CONTROL LOOP START<\/p>\n<\/td>\n<td>\n<p>FUN0<\/p>\n<p>MC<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol <\/p>\n<\/td>\n<td colspan=\"4\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-022.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>N: Master Control Loop number (N=0~127) the number N cannot be used repeatedly.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<ul>\n<li>M There are a total of 128 MC loops (N=0~127). Every Master Control Start instruction, MC N, must correspond to a Master Control End instruction, MCE N, which has the same loop number as MC N. They must always be used in pairs and you should also make sure that the MCE N instruction is after the MC N instruction.<\/li>\n<li>When the Master Control input &quot;EN\/&quot; is 1, then this MC N instruction will not be executed, as it does not exist.<\/li>\n<li>When the Master Control input &quot;EN\/&quot; is 0, the master control loop is active, the area between the MC N and MCE N is called the Master Control active loop area. All the status of OUT coils or Timers within Master Control active loop area will be cleared to 0. Other instructions will not be executed.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN0<\/p>\n<p>MC<\/p>\n<\/td>\n<td>\n<p>MASTER CONTROL LOOP START<\/p>\n<\/td>\n<td>\n<p>FUN0<\/p>\n<p>MC<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-023.png\" \/> <\/p>\n<\/td>\n<td>\n<p>IF M0 = FALSE THEN<\/p>\n<p>    IF M1 THEN Y0 := TRUE;<\/p>\n<p>    ELSE<\/p>\n<p>        Y0 := FALSE;<\/p>\n<p>    END_IF<\/p>\n<p>    Timer( EN:= M2, <\/p>\n<p>           T:= 1023, <\/p>\n<p>           PV:= 10, <\/p>\n<p>           IsTimeout=&gt; T1023);<\/p>\n<p>    IF T1023 THEN Y1 := TRUE;<\/p>\n<p>    ELSE<\/p>\n<p>        Y1 := FALSE;<\/p>\n<p>    END_IF<\/p>\n<p>ELSE<\/p>\n<p>    IF M1 THEN Y2 := TRUE;<\/p>\n<p>    ELSE<\/p>\n<p>        Y2 := FALSE;<\/p>\n<p>    END_IF<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-024.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN0<\/p>\n<p>MC<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>MASTER CONTROL LOOP START<\/p>\n<\/td>\n<td>\n<p>FUN0<\/p>\n<p>MC<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Note 1: MC\/MCE instructions can be used in nesting or interleaving as shown to the right:<\/p>\n<\/td>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-025.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-6  MASTER CONTROL END(MCE)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN1<\/p>\n<p>MCE<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>MASTER CONTROL LOOP END<\/p>\n<\/td>\n<td>\n<p>FUN1<\/p>\n<p>MCE<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"4\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-026.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>N: Master Control End number (N=0~127) N can not be used repeatedly.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<ul>\n<li>Every MCE N must correspond to a Master Control Start instruction. They must always be used as a pair and you should also make sure that the MCE N instruction is after the MC N instruction. After the MC N instruction has been executed, all output coil status and timers will be cleared to 0 and no other instructions will be executed. The program execution will resume until a MCE instruction which has the same N number as MC N instruction appears.<\/li>\n<li>MCE instruction does not require an input control because the instruction itself forms a network which other instructions can not connect to it. If the MC instruction has been executed then the master control operation will be completed when the execution of the program reaches the MCE instruction. If MC N instruction has never been executed then the MCE instruction will do nothing.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Example 1<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<ul>\n<li>Please refer to the example and explanations for MC instruction.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-7  SKIP(SKP)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN2<\/p>\n<p>SKP<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>SKIP START<\/p>\n<\/td>\n<td>\n<p>FUN2<\/p>\n<p>SKP<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"4\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p>  <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-027.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>N: Skip loop number (N=0~127), <\/p>\n<p>N can not be used repeatedly.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Description<\/p>\n<\/td>\n<td colspan=\"4\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"6\">\n<ul>\n<li>There is total 128 SKP loops (N=0~127). Every skip start instruction, SKP N, must correspond to a skip end instruction, SKPE N, which has the same loop number as SKP N. They must always be used as a pair and you should also make sure that the SKPE N instruction is after the SKP N instruction.<\/li>\n<li>When the skip control &quot;EN&quot; is 0, then the Skip Start instruction will not be executed (An equivalent SKP N command does not exist).<\/li>\n<li>When the skip control &quot;EN&quot; is 1, the range between the SKP N and SKPE N which is so called the Skip active loop area will be skipped, that is all the instructions in this area will not be executed. Therefore, the statuses of the discrete or registers in this Skip active loop area will be retained.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN2<\/p>\n<p>SKP<\/p>\n<\/td>\n<td>\n<p>SKIP START<\/p>\n<\/td>\n<td>\n<p>FUN2<\/p>\n<p>SKP<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example<\/p>\n<\/td>\n<td colspan=\"2\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-028.png\" \/> <\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-029.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-8  SKIP END(SKPE)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN3<\/p>\n<p>SKPE<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>SKIP END<\/p>\n<\/td>\n<td>\n<p>FUN3<\/p>\n<p>SKPE<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"4\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-030.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>N\uff1a SKIP END Loop number (N=0~127) N can not be used repeatedly.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Description<\/p>\n<\/td>\n<td colspan=\"4\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"6\">\n<ul>\n<li>Every SKPE N must correspond to a SKP N instruction. They must always be used as a pair and you should also make sure that the SKPE N instruction is behind the SKP N instruction.<\/li>\n<li>SKPE instruction does not require an input control because the instruction itself forms a network which other instructions can not connect to it. If the SKP N instruction has been executed then the skip operation will be completed when the execution of the program reaches the SKPE N instruction. If SKP N instruction has never been executed then the SKPE instruction will do nothing.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Example 1<\/p>\n<\/td>\n<td colspan=\"4\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"6\">\n<p>Please refer to the example and explanations for SKP N instruction.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-9  DIFFERENTIAL UP (DIFU)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN4 P<\/p>\n<p>DIFU<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>DIFFERENTIAL UP<\/p>\n<\/td>\n<td>\n<p>FUN4 P<\/p>\n<p>DIFU<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"4\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p>  <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-031.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>D: The specific coil number where the result of the Differential Up operation is stored.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>Y<\/p>\n<\/td>\n<td>\n<p>M<\/p>\n<\/td>\n<td>\n<p>SM<\/p>\n<\/td>\n<td>\n<p>S<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Y0<\/p>\n<p>\u2223<\/p>\n<p>Y1023<\/p>\n<\/td>\n<td>\n<p>M0<\/p>\n<p>\u2223<\/p>\n<p>M9119<\/p>\n<\/td>\n<td>\n<p>M9120<\/p>\n<p>\u2223<\/p>\n<p>M25599<\/p>\n<\/td>\n<td>\n<p>S0<\/p>\n<p>\u2223<\/p>\n<p>S3103<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<ul>\n<li>The DIFU instruction is used to output the up differentiation of a node status (status input to &quot;TGU&quot;) and the pulse signal resulting from the status change at the rising edge of the &quot;TGU&quot; for one scan time is stored to a coil specified by D.<\/li>\n<li>The functionality of this instruction can also be achieved by using a TU contact.\u3002<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN4 P<\/p>\n<p>DIFU<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>DIFFERENTIAL UP<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>FUN4 P<\/p>\n<p>DIFU<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Example<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>The results of the following two samples are exactly the same<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-032.png\" \/>Example 1<\/p>\n<\/td>\n<td>\n<p>R_TRIG( S:= X1, D=&gt;Y0 );<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-033.png\" \/>Example 2<\/p>\n<\/td>\n<td>\n<p>R_TRIG( S:= X1, D=&gt;Y0 );<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-034.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-10  DIFFERENTIAL DOWN(DIFD)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN5 P<\/p>\n<p>DIFD<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>DIFFERENTIAL DOWN <\/p>\n<\/td>\n<td>\n<p>FUN5 P<\/p>\n<p>DIFD<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"4\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p>  <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-035.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>D: The specific coil number where the result of the Differential Up operation is stored.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>Y<\/p>\n<\/td>\n<td>\n<p>M<\/p>\n<\/td>\n<td>\n<p>SM<\/p>\n<\/td>\n<td>\n<p>S<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Y0<\/p>\n<p>\u2223<\/p>\n<p>Y1023<\/p>\n<\/td>\n<td>\n<p>M0<\/p>\n<p>\u2223<\/p>\n<p>M9119<\/p>\n<\/td>\n<td>\n<p>M9120<\/p>\n<p>\u2223<\/p>\n<p>M25599<\/p>\n<\/td>\n<td>\n<p>S0<\/p>\n<p>\u2223<\/p>\n<p>S3103<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<ul>\n<li>The DIFD instruction is used to output the down differentiation of a node status (status input to &quot;TGD&quot;) and the pulse signal resulting from the status change at the falling edge of the &quot;TGD&quot; for one scan time is stored to a coil specified by D.<\/li>\n<li>The functionality of this instruction can also be achieved by using a TD contact.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Example<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>The results of the following two samples are exactly the same<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-036.png\" \/>Example 1<\/p>\n<\/td>\n<td>\n<p>F_TRIG( S:= X1, D=&gt;Y0 );<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example 2<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-037.png\" \/><\/p>\n<\/td>\n<td>\n<p>R_TRIG( S:= X1, D=&gt;Y0 );<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-11  BIT SHIFT(BSHF)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN6 D P<\/p>\n<p>BSHF<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>BIT SHIFT<\/p>\n<p>(Shifts the data of the 16-bit or 32-bit register to left or to right by one bit)<\/p>\n<\/td>\n<td>\n<p>FUN6 D P<\/p>\n<p>BSHF<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"4\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-038.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>D: The register number for shifting<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>    Operand<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<ul>\n<li>When the status of clear control &quot;CLR&quot; is at 1, then the data of register D and FO0 will all be cleared to 0. All other input signals are invalid.<\/li>\n<li>When the status of clear control is &quot;CLR&quot; at 0, then the shift operation is permissible. When the shift control &quot;EN&quot; = 1 or from 0 \u21921 (P Instruction), the data of the register will be shifted to right (L\/R=0) or to left (L\/R=1) by one bit. The shifted-out bit (MSB when shift to left and LSB when shift to right) for both cases will be sent to FO0. The vacated bit space (LSB when shift to left and MSB when shift to right) due to shift operation will be filled in by the input status of fill-in bit &quot;INB&quot;.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN6 D P<\/p>\n<p>BSHF<\/p>\n<\/td>\n<td>\n<p>BIT SHIFT<\/p>\n<p>(Shifts the data of the 16-bit or 32-bit register to left or to right by one bit)<\/p>\n<\/td>\n<td>\n<p>FUN6 D P<\/p>\n<p>BSHF<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>   Shifts the 16-bit register data<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-039.png\" \/><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"3\">\n<p>X3=1<\/p>\n<p>(Left shift)<\/p>\n<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td colspan=\"2\">\n<p>B15<\/p>\n<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td>\n<p>B0<\/p>\n<\/td>\n<td colspan=\"2\"><\/td>\n<td colspan=\"2\"><\/td>\n<td colspan=\"2\"><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td>\n<p>\u2190\uff0d<\/p>\n<\/td>\n<td>\n<p>\u2190<\/p>\n<\/td>\n<td>\n<p>\u2190<\/p>\n<\/td>\n<td>\n<p>\u2190<\/p>\n<\/td>\n<td>\n<p>\u2190<\/p>\n<\/td>\n<td>\n<p>\u2190<\/p>\n<\/td>\n<td>\n<p>\u2190<\/p>\n<\/td>\n<td>\n<p>\u2190<\/p>\n<\/td>\n<td>\n<p>\u2190<\/p>\n<\/td>\n<td>\n<p>\u2190<\/p>\n<\/td>\n<td>\n<p>\u2190<\/p>\n<\/td>\n<td>\n<p>\u2190<\/p>\n<\/td>\n<td>\n<p>\u2190<\/p>\n<\/td>\n<td>\n<p>\u2190<\/p>\n<\/td>\n<td>\n<p>\u2190<\/p>\n<\/td>\n<td>\n<p>\u2190<\/p>\n<\/td>\n<td>\n<p>\u2190<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>\u2190\uff0d<\/p>\n<\/td>\n<td colspan=\"2\"><\/td>\n<td colspan=\"2\"><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>Y0<\/p>\n<\/td>\n<td><\/td>\n<td colspan=\"17\">\n<p>Shifts the 16-bit data to left by one bit<\/p>\n<\/td>\n<td colspan=\"2\"><\/td>\n<td colspan=\"2\">\n<p>X2<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p>X3=0<\/p>\n<p>(Right shift)<\/p>\n<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td colspan=\"2\">\n<p>B15<\/p>\n<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td>\n<p>B0<\/p>\n<\/td>\n<td colspan=\"2\"><\/td>\n<td colspan=\"2\"><\/td>\n<td colspan=\"2\"><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td>\n<p>\uff0d\u2192<\/p>\n<\/td>\n<td>\n<p>\u2192<\/p>\n<\/td>\n<td>\n<p>\u2192<\/p>\n<\/td>\n<td>\n<p>\u2192<\/p>\n<\/td>\n<td>\n<p>\u2192<\/p>\n<\/td>\n<td>\n<p>\u2192<\/p>\n<\/td>\n<td>\n<p>\u2192<\/p>\n<\/td>\n<td>\n<p>\u2192<\/p>\n<\/td>\n<td>\n<p>\u2192<\/p>\n<\/td>\n<td>\n<p>\u2192<\/p>\n<\/td>\n<td>\n<p>\u2192<\/p>\n<\/td>\n<td>\n<p>\u2192<\/p>\n<\/td>\n<td>\n<p>\u2192<\/p>\n<\/td>\n<td>\n<p>\u2192<\/p>\n<\/td>\n<td>\n<p>\u2192<\/p>\n<\/td>\n<td>\n<p>\u2192<\/p>\n<\/td>\n<td>\n<p>\u2192<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>\uff0d\u2192<\/p>\n<\/td>\n<td colspan=\"2\"><\/td>\n<td colspan=\"2\"><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>X2<\/p>\n<\/td>\n<td><\/td>\n<td colspan=\"17\">\n<p>Shifts the 16-bit data to right by one bit<\/p>\n<\/td>\n<td colspan=\"2\"><\/td>\n<td colspan=\"2\">\n<p>Y0<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-12  UP\/DOWN COUNTER(UDCTR)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN7 D P<\/p>\n<p>UDCTR<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>UP\/DOWN COUNTER<\/p>\n<p>(16-bit or 32-bit up and down 2-phase Counter)<\/p>\n<\/td>\n<td>\n<p>FUN7D P<\/p>\n<p>UDCTR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-040.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>CV: The number of the Up\/Down Counter <\/p>\n<p>PV: Preset value of the counter or it&#8217;s register number<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WX<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>IR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WX0<\/p>\n<p>\u2223<\/p>\n<p>WX1008<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R34768<\/p>\n<p>\u2223<\/p>\n<p>R34895<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<td>\n<p>16\/32 &#8211; bit\u2019 +\/- number<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>CV<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>PV<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<ul>\n<li>When the clear control \u201cCLR\u201d is 1, the counter\u2019s CV will be reset to 0 and the counter will not be able to count.<\/li>\n<li>When the clear control \u201cCLR\u201d is 0, counting will then be allowed. The nature of the instruction is a P instruction. Therefore, when the count-pulse \u201cPLS\u201d is from 0\u21921 (rising edge), the CV will be increased by 1 (if U\/D=1) or decreased by 1 (if U\/D=0).<\/li>\n<li>When CV=PV, FO0(\u201cCount-Up) will change to 1\u201d. If there are more clocks input, the counter will continue counting which cause CV\u2260PV. Then, FO0 will immediately change to 0. This means the \u201cCount-Up\u201d signal will only be equal to 1 if CV=PV, or else it will be equal to 0 (Care should be taken to this difference from the \u201cCount-Up\u201d signal of the general counter).<\/li>\n<li>The upper limit of up count value is 32767 (16-bit) or 2147483647 (32-bit). After the upper limit is reached, if another up-count clock is received, the counting value will become \u201332768 or -2147483648 (the lower limit of down count).<\/li>\n<li>The lower limit of down count value is -32767 (16-bit) or -2147483647 (32-bit). After the lower limit is reached, if another down count clock is received, the counting value will become 32768 or 2147483648 (the upper limit of up count).<\/li>\n<li>If U\/D is fixed as 1, the instruction will become a single-phase up count counter. If U\/D is fixed as 0, the instruction will become a single-phase down count counter.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Example<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-041.png\" \/><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-042.png\" \/><\/p>\n<ul>\n<li>Note 1: Since the counting operation of UDCTR is implemented by software scanning, therefore if the clock speed is faster than the scan speed, lose count may then happen (This instruction counts based on the changes in the PLS signal during each scan cycle. Therefore, as long as the duration of the signal change exceeds the scan cycle, this instruction can detect the change. However, the scan cycle time will vary depending on the complexity of the user\u2019s program. To obtain accurate count values, please use a software or hardware high-speed counter. ). Please use the software or hardware high-speed counter in the PLC. Refer to the \u201cHigh Speed Counter Application\u201d in the Advanced Manual.<\/li>\n<li>Note 2: In order to ensure that this command can count correctly, the width of the counting pulse must be greater than one scan time no matter it is 1 or 0.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-13  MOVE(MOV)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN8 D P<\/p>\n<p>MOV<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>MOVE<\/p>\n<p>(Moves data from S to D)<\/p>\n<\/td>\n<td>\n<p>FUN8 D P<\/p>\n<p>MOV<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-043.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>S: Source register number <\/p>\n<p>D: Destination register number<\/p>\n<p>The S, D may combine with V, Z, P0~P9 to serve indirect addressing<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WX<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>IR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<td>\n<p>XR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WX0<\/p>\n<p>\u2223<\/p>\n<p>WX1008<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3008<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R34768<\/p>\n<p>\u2223<\/p>\n<p>R34895<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<td>\n<p>16\/32 &#8211; bit +\/\u2212 number<\/p>\n<\/td>\n<td>\n<p>V\u3001Z<\/p>\n<p>P0-P9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>S<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<ul>\n<li>Move (write) the data of S to a specified register D when the move control input &quot;EN&quot; =1 or from 0 to 1 (P Instruction).<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN8 D P<\/p>\n<p>MOV<\/p>\n<\/td>\n<td>\n<p>MOVE<\/p>\n<p>(Moves data from S to D)<\/p>\n<\/td>\n<td>\n<p>FUN8 D P<\/p>\n<p>MOV<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>  Writes a constant data into a 16-bit register.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-044.png\" \/><\/p>\n<\/td>\n<td>\n<p>IF X0 THEN<\/p>\n<p>R0 := 10;<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>S<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<td>\n<p>10<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u21e9X0\uff1d<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>10<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-14  MOVE INVERSE(MOV\/)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN9 D P<\/p>\n<p>MOV\/<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>MOVE INVERSE<\/p>\n<p>(Inverts the data of S and moves the result to a specified device D)<\/p>\n<\/td>\n<td>\n<p>FUN9 D P<\/p>\n<p>MOV\/<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-045.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>S: Source register number<\/p>\n<p>D: Destination register number<\/p>\n<p>S, D may combine with V, Z, P0~P9 to serve indirect addressing<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WX<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>IR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<td>\n<p>XR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WX0<\/p>\n<p>\u2223<\/p>\n<p>WX1008<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R34768<\/p>\n<p>\u2223<\/p>\n<p>R34895<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<td>\n<p>16\/32-bit<\/p>\n<p>+\/-number<\/p>\n<\/td>\n<td>\n<p>V, Z<\/p>\n<p>P0 ~ P9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Cn<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>PV<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<ul>\n<li>Inverts the data of S (changes the status from 0 to 1 and from 1 to 0) and moves the results to a specified register D when the move control input &quot;EN&quot; =1 or from 0 to1 (P Instruction).<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN9 D P<\/p>\n<p>MOV\/<\/p>\n<\/td>\n<td>\n<p>MOVE INVERSE<\/p>\n<p>(Inverts the data of S and moves the result to a specified device D)<\/p>\n<\/td>\n<td>\n<p>FUN9 D P<\/p>\n<p>MOV\/<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Moves the inverted data of a 16-bit register to another 16-bit register.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-046.png\" \/><\/p>\n<\/td>\n<td>\n<p>IF X0 THEN<\/p>\n<p>WY16 := NOT R0;<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\tB15                             B0<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>S<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>5555H<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u21e9X0\uff1d1<\/p>\n<p>\tY31\tY16<\/p>\n<p>\t\u2193\t\u2193<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>WY16<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>AAAAH<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-15  TOGGLE SWITCH(TOGG)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN10<\/p>\n<p>TOGG<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>TOGGLE SWITCH<\/p>\n<p>(Changes the output status when the rising edge of control input occur)<\/p>\n<\/td>\n<td>\n<p>FUN10<\/p>\n<p>TOGG<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-047.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>D: the coil number of the toggle switch<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Ope-rand<\/p>\n<\/td>\n<td>\n<p>Y<\/p>\n<\/td>\n<td>\n<p>M<\/p>\n<\/td>\n<td>\n<p>SM<\/p>\n<\/td>\n<td>\n<p>S<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Y0<\/p>\n<p>\u2223<\/p>\n<p>Y1023<\/p>\n<\/td>\n<td>\n<p>M0<\/p>\n<p>\u2223<\/p>\n<p>M9119<\/p>\n<\/td>\n<td>\n<p>M9120<\/p>\n<p>\u2223<\/p>\n<p>M25599<\/p>\n<\/td>\n<td>\n<p>S0<\/p>\n<p>\u2223<\/p>\n<p>S3104<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<ul>\n<li>The coil D changes its status (from 1 to 0 and from 0 to 1) each time the input &quot;TGU&quot; is triggered from 0 to 1 (rising edge).<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-048.png\" \/><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-049.png\" \/><\/p>\n<\/td>\n<td>\n<p>IF F_TRIG(NOT X0) OR R_TRIG(X0)THEN Y0:=NOT Y0;<\/p>\n<p>END_IF;<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-16  FAST ADDITION F\uff08\uff0b\uff09<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN224 D P<\/p>\n<p>F\uff08\uff0b\uff09<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Fast ADDITION<\/p>\n<p>(Performs addition of the data specified at Sa and Sb and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN224 D P<\/p>\n<p>F\uff08\uff0b\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-050.jpg\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>Sa: Augend<\/p>\n<p>Sb: Addend <\/p>\n<p>D: Destination register to store the results <\/p>\n<p>of the addition<\/p>\n<p>Sa, Sb, D may combine with V, Z, P0~P9 to serve indirect addressing <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WX<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>IR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<td>\n<p>XR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WX0<\/p>\n<p>\u2223<\/p>\n<p>WX1008<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R34768<\/p>\n<p>\u2223<\/p>\n<p>R34895<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<td>\n<p>16\/32 \u2013 bit +\/- number<\/p>\n<\/td>\n<td>\n<p>V, Z<\/p>\n<p>P0 ~ P9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN224 D P<\/p>\n<p>F\uff08\uff0b\uff09<\/p>\n<\/td>\n<td>\n<p>Fast ADDITION<\/p>\n<p>(Performs addition of the data specified at Sa and Sb and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN224 D P<\/p>\n<p>F\uff08\uff0b\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td colspan=\"2\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<ul>\n<li>Performs the fast addition control \u201cEN\u201d=1 or from 0\u21921 (P command) and the command is set to signed (S command), add Sa and Sb with the positive and negative number (Sign) algorithm and write the result into D.<\/li>\n<li>Performs the fast addition control \u201cEN\u201d=1 or from 0\u21921 (P command) and the command is set to unsigned (U command), use the positive integer (Unsigned) algorithm to add Sa and Sb and write the result in D .<\/li>\n<li>Compared with the addition operation of FUN11, the fast addition operation eliminates the overflow and underflow operations and flags, so the program execution time will be faster than the addition operation of FUN11, and the operation result will be the same as those obtained using high-level languages on a PC, such as C language, as shown in the left side of the figure below.<\/li>\n<\/ul>\n<p>In addition, the calculation result of the addition operation of FUN11 will be different at the numerical boundary, for instance, sign arithmetic.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-051.jpg\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN224 D P<\/p>\n<p>F\uff08\uff0b\uff09<\/p>\n<\/td>\n<td>\n<p>Fast ADDITION<\/p>\n<p>(Performs addition of the data specified at Sa and Sb and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN224 D P<\/p>\n<p>F\uff08\uff0b\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example<\/p>\n<\/td>\n<td colspan=\"2\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-052.png\" \/><\/p>\n<\/td>\n<td>\n<p>IF X0 THEN<\/p>\n<p>R2 := R0 + R1;<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>In case of &quot; Signed &quot;\uff1a<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>12345<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>R0\uff0bR1\uff1d32770(32767+3)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td>\n<p>R1<\/p>\n<\/td>\n<td>\n<p>20425<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u21e9X0\uff1d<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R2<\/p>\n<\/td>\n<td>\n<p>-32766<\/p>\n<\/td>\n<td>\n<p>32767+3&gt;&gt;-32768+2&gt;&gt;<\/p>\n<p>-32766<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<p>\u203bWhen adding more than 32767 (0x7FFF), it will become<\/p>\n<p>-32768(0x8000)\u3001-32767(0x8001)\u3001-32766(0x8002)\u3001\u2026<\/p>\n<p>-1(0xFFFF)\u30010(0x0000)<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>In case of &quot; Unsigned &quot;\uff1a<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>12345<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>R0\uff0bR1\uff1d32770<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td>\n<p>R1<\/p>\n<\/td>\n<td>\n<p>20425<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u21e9X0\uff1d<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R2<\/p>\n<\/td>\n<td>\n<p>32770<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-17  FAST SUBTRACTION F\uff08\uff0d\uff09<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN225 D P<\/p>\n<p>F\uff08-\uff09 <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Fast SUBTRACTION<\/p>\n<p>(Performs subtraction of the data specified at Sa and Sb and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN225 D P<\/p>\n<p>F\uff08-\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-053.jpg\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>Sa: minuend<\/p>\n<p>Sb: Subtrahend<\/p>\n<p>D: Destination register to store the results of the subtraction<\/p>\n<p>Sa, Sb, D may combine with V, Z, P0~P9 to serve indirect addressing<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WX<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>IR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<td>\n<p>XR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WX0<\/p>\n<p>\u2223<\/p>\n<p>WX1008<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R34768<\/p>\n<p>\u2223<\/p>\n<p>R34895<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<td>\n<p>16\/32 \u2013 bit +\/- number<\/p>\n<\/td>\n<td>\n<p>V, Z<\/p>\n<p>P0 ~ P9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<ul>\n<li>When the subtraction control \u201cEN\u201d=1 or from 0\u21921 (P command) and the command is set to signed (S command), subtract Sa and Sb with the positive and negative number (Sign) algorithm and write the result into D.<\/li>\n<li>When the subtraction control \u201cEN\u201d=1 or from 0\u21921 (P command) and the command is set to unsigned (U command), subtract Sa and Sb with a positive integer (Unsigned) algorithm and write the result in D.<\/li>\n<li>Compared with the subtraction operation of FUN12, the fast subtraction operation eliminates overflow and underflow operations and flags, so the program execution time is faster than the subtraction operation of FUN12, and the operation result will be the same as those obtained using high-level languages on a PC, such as C language, as shown in the left side of the figure below, and it will also be different from the calculation result of the subtraction operation of FUN12 at the numerical boundary, for instance, sign arithmetic.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN225 D P<\/p>\n<p>F\uff08-\uff09 <\/p>\n<\/td>\n<td>\n<p>Fast SUBTRACTION<\/p>\n<p>(Performs subtraction of the data specified at Sa and Sb and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN225 D P<\/p>\n<p>F\uff08-\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-054.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN225 D P<\/p>\n<p>F\uff08-\uff09 <\/p>\n<\/td>\n<td>\n<p>Fast SUBTRACTION<\/p>\n<p>(Performs subtraction of the data specified at Sa and Sb and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN225 D P<\/p>\n<p>F\uff08-\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example<\/p>\n<\/td>\n<td colspan=\"2\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-055.png\" \/><\/p>\n<\/td>\n<td>\n<p>IF X0 THEN<\/p>\n<p>R2 := R0 &#8211; R1;<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>In case of &quot; Signed &quot;\uff1a<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>-5<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>R0\uff0dR1\uff1d-32772(-32768-4)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td>\n<p>R1<\/p>\n<\/td>\n<td>\n<p>32767<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u21e9X0\uff1d<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R2<\/p>\n<\/td>\n<td>\n<p>32764<\/p>\n<\/td>\n<td>\n<p>-32772&gt;&gt;-32768-4&gt;&gt;32767-3&gt;&gt;32764<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td colspan=\"3\">\n<p>\u203bwhen less than -32768(0x8000) will becomes to 32767(0x7FFF)\u300132766(0x7FFE)\u2026.0(0x000)<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>In case of &quot; Unsigned &quot;\uff1a<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>-5 (65531)<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>R0\uff0dR1\uff1d32764<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td>\n<p>R1<\/p>\n<\/td>\n<td>\n<p>32767<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u21e9X0\uff1d<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R2<\/p>\n<\/td>\n<td>\n<p>32764<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-18  ADDITION\uff08\uff0b\uff09<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"2\">\n<p>FUN11 D P<\/p>\n<p>\uff08\uff0b\uff09<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>ADDITION<\/p>\n<p>(Performs addition of the data specified at Sa and Sb and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN11 D P<\/p>\n<p>\uff08\uff0b\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-056.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>Sa: Augend<\/p>\n<p>Sb: Addend <\/p>\n<p>D: Destination register to store the results<\/p>\n<p>of the addition<\/p>\n<p>Sa, Sb, D may combine with V, Z, P0~P9 to serve indirect addressing <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WX<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>IR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<td>\n<p>XR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WX0<\/p>\n<p>\u2223<\/p>\n<p>WX1008<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R34768<\/p>\n<p>\u2223<\/p>\n<p>R34895<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<td>\n<p>16\/32 \u2013 bit +\/- number<\/p>\n<\/td>\n<td>\n<p>V, Z<\/p>\n<p>P0 ~ P9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td colspan=\"4\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"5\">\n<ul>\n<li>Performs the addition of the data specified at Sa and Sb using signed number and writes the results to a specified register D when the add control input &quot;EN&quot; =1 or from 0 to 1 (P instruction) and &quot;U\/S&quot; = 0. If the result of addition is equal to 0 then set FO0(D = 0) to 1. If carry occurs (the result exceeds 32767 or 2147483647) then set FO1(CY) to 1. If borrow occurs (adding negative numbers resulting in a sum less than -32768 or -2147483648), then set the FO2(BR) to 1. All the FO statuses are retained until this instruction is executed again and overwritten by a new result.<\/li>\n<li>Performs the addition of the data specified at Sa and Sb using unsigned number and writes the results to a specified register D when the add control input &quot;EN&quot; =1 or from 0 to 1 (P instruction) and &quot;U\/S&quot; = 1. If the result of addition is equal to 0 then set FO0(D = 0) to 1. If carry occurs (the result exceeds 65535 or 4294967295) then set FO1(CY) to 1<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN11 D P<\/p>\n<p>\uff08\uff0b\uff09<\/p>\n<\/td>\n<td>\n<p>ADDITION<\/p>\n<p>(Performs addition of the data specified at Sa and Sb and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN11 D P<\/p>\n<p>\uff08\uff0b\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example<\/p>\n<\/td>\n<td colspan=\"2\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-057.png\" \/><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>12345<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>R0\uff0bR1\uff1d32770<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td>\n<p>R1<\/p>\n<\/td>\n<td>\n<p>20425<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u21e9X0\uff1d<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R2<\/p>\n<\/td>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>32768+2=32770<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td colspan=\"3\">\n<p>Y0\uff1d1 (carry 1 represents \uff0b32768)<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-19  SUBTRACTION\uff08\uff0d\uff09<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN12 D P<\/p>\n<p>\uff08-\uff09 <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>SUBTRACTION<\/p>\n<p>(Performs subtraction of the data specified at Sa and Sb and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN12 D P<\/p>\n<p>\uff08-\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-058.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>Sa: Minuend<\/p>\n<p>Sb: Subtrahend<\/p>\n<p>D: Destination register to store the results <\/p>\n<p>of the subtraction<\/p>\n<p>Sa, Sb, D may combine with V, Z, P0~P9 to serve indirect addressing<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WX<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>IR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<td>\n<p>XR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WX0<\/p>\n<p>\u2223<\/p>\n<p>WX1008<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R34768<\/p>\n<p>\u2223<\/p>\n<p>R34895<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<td>\n<p>16\/32 \u2013 bit +\/- number<\/p>\n<\/td>\n<td>\n<p>V, Z<\/p>\n<p>P0 ~ P9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<ul>\n<li>Performs the subtraction of the data specified at Sa and Sb using signed number and writes the results to a specified register D when the subtract control input &quot;EN&quot; =1 or from 0 to 1 (P instruction) and &quot;U\/S&quot; =0\u201d. If the result of subtraction is equal to 0 then set FO0(D=0) to 1. If carry occurs (subtracting a negative number from a positive number and the result exceeds +32767 or +2147483647), then set FO1(CY) to 1. If borrow occurs (subtracting a positive number from a negative number and the resulted difference is less than -32768 or -2147483648), then set FO2(BR) to 1. All the FO statuses are retained until this instruction is executed again and overwritten by a new result.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN12 D P<\/p>\n<p>\uff08-\uff09 <\/p>\n<\/td>\n<td>\n<p>SUBTRACTION<\/p>\n<p>(Performs subtraction of the data specified at Sa and Sb and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN12 D P<\/p>\n<p>\uff08-\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<ul>\n<li>When the subtraction control &quot;EN&quot;=1 or from 0\u21921 (P command) and &quot;U\/S&quot;=1, subtract Sa and Sb with the positive integer (Unsign) algorithm and write the result to D. At the same time, if the difference is 0, FO0 (D=0) is set to 1, and if a borrow occurs (Sa-Sb&lt;0), FO2 (BR) is set to 1.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example<\/p>\n<\/td>\n<td colspan=\"2\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-059.png\" \/><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>\uff0d5<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>R0\uff0dR1\uff1d\uff0d32772<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td>\n<p>R1<\/p>\n<\/td>\n<td>\n<p>32767<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"2\">\n<p>D<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>R2<\/p>\n<\/td>\n<td>\n<p>\uff0d4<\/p>\n<\/td>\n<td>\n<p>\uff0d32768\uff0d4\uff1d\uff0d32772<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><\/td>\n<td colspan=\"4\">\n<p>Y2\uff1d1<\/p>\n<p>\uff08borrow 1 represents\uff0d32768\uff09Please refer to section 5.5<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u21e9X0\uff1d1<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-20  MULTIPLICATION\uff08\uff0a\uff09<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN13 D P<\/p>\n<p>\uff08\uff0a\uff09<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>MULTIPLICATION<\/p>\n<p>(Performs multiplication of the data specified at Sa and Sb and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN13 D P<\/p>\n<p>\uff08\uff0a\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-060.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>Sa: Multiplicand<\/p>\n<p>Sb: Multiplier<\/p>\n<p>D: Destination register to store the results <\/p>\n<p>of the multiplication<\/p>\n<p>Sa, Sb, D may combine with V, Z, P0~P9 to serve indirect addressing <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WX<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>IR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<td>\n<p>XR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WX0<\/p>\n<p>\u2223<\/p>\n<p>WX1008<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R34768<\/p>\n<p>\u2223<\/p>\n<p>R34895<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<td>\n<p>16\/32 \u2013 bit +\/- number<\/p>\n<\/td>\n<td>\n<p>V, Z<\/p>\n<p>P0 ~ P9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<ul>\n<li>Performs the multiplication of the data specified at Sa and Sb using the signed number and writes the results to a specified register D when the multiplication control input &quot;EN&quot; =1 or from 0 to 1 (P instruction) and &quot;U\/S&quot; = 0. If the product of multiplication is equal to 0 then set FO0(D=0) to 1. If the product is a negative number, then set FO1(D&lt;0) to 1.<\/li>\n<li>Performs the multiplication of the data specified at Sa and Sb using the unsigned number and writes the results to a specified register D when the multiplication control input &quot;EN&quot; =1 or from 0 to 1 (P instruction) and &quot;U\/S&quot; =1 . If the product of multiplication is equal to 0 then set FO0(D=0) to 1.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>FUN13 D P<\/p>\n<p>\uff08\uff0a\uff09<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>MULTIPLICATION<\/p>\n<p>(Performs multiplication of the data specified at Sa and Sb and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN13 D P<\/p>\n<p>\uff08\uff0a\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example 1<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>  16-bit multiplication<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-061.png\" \/><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><img decoding=\"async\" alt=\"C:\\Users\\User\\Desktop\\\u8aaa\u660e\u66f8\u7ffb\u8b6f\\\u5716\\16-bit multipliction.png\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-062.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN13 D P<\/p>\n<p>\uff08\uff0a\uff09<\/p>\n<\/td>\n<td>\n<p>MULTIPLICATION<\/p>\n<p>(Performs multiplication of the data specified at Sa and Sb and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN13 D P<\/p>\n<p>\uff08\uff0a\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-063.png\" \/><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-064.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-21  DIVISION\uff08\uff0f\uff09<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN14 D P<\/p>\n<p>\uff08\uff0f\uff09<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>DIVISION<\/p>\n<p>(Performs division of the data specified at Sa and Sb and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN14 D P<\/p>\n<p>\uff08\uff0f\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-065.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>Sa: Dividend<\/p>\n<p>Sb: Divisor<\/p>\n<p>D: Destination register to store the results of the divison<\/p>\n<p>Sa, Sb, D may combine with V, Z, P0~P9 to serve indirect addressing<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WX<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>IR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<td>\n<p>XR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WX0<\/p>\n<p>\u2223<\/p>\n<p>WX1008<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R34768<\/p>\n<p>\u2223<\/p>\n<p>R34895<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<td>\n<p>16\/32 \u2013 bit +\/- number<\/p>\n<\/td>\n<td>\n<p>V, Z<\/p>\n<p>P0 ~ P9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN14 D P<\/p>\n<p>\uff08\uff0f\uff09<\/p>\n<\/td>\n<td>\n<p>DIVISION<\/p>\n<p>(Performs division of the data specified at Sa and Sb and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN14 D P<\/p>\n<p>\uff08\uff0f\uff09<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<ul>\n<li>Performs the division of the data specified at Sa and Sb using the signed number and writes the results to a specified register D when the multiplication control input &quot;EN&quot; =1 or from 0 to 1 (P instruction) and &quot;U\/S&quot; =0. If the quotient of division is equal to 0 then set FO0 to 1. If the divisor Sb=0 then set the error flag FO1 to 1 without executing the instruction.<\/li>\n<li>Performs the division of the data specified at Sa and Sb using the unsigned number and writes the results to a specified register D when the multiplication control input &quot;EN&quot; =1 or from 0 to 1 (P instruction) and &quot;U\/S&quot; =1. If the quotient of division is equal to 0 then set FO0 to 1. If the divisor Sb=0 then set the error flag FO1 to 1 without executing the instruction.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Example 1<\/p>\n<\/td>\n<td>\n<p>16-bit division<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-066.png\" \/><\/p>\n<\/td>\n<td>\n<p>IF X0 THEN<\/p>\n<p>    R2 := R0 \/ R1;<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><img decoding=\"async\" alt=\"C:\\Users\\User\\Desktop\\\u8aaa\u660e\u66f8\u7ffb\u8b6f\\\u5716\\16-bit division.png\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-067.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN14 D P<\/p>\n<p>\uff08\uff0f\uff09<\/p>\n<\/td>\n<td>\n<p>DIVISION<\/p>\n<p>(Performs division of the data specified at Sa and Sb and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN14 D P<\/p>\n<p>\uff08\uff0f\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example 2<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>32-bit division<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-068.png\" \/><\/p>\n<\/td>\n<td>\n<p>IF X0 THEN<\/p>\n<p>    DR4 := DR0 \/ DR2;<\/p>\n<p>END_IF<\/p>\n<p><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><img decoding=\"async\" alt=\"C:\\Users\\User\\Desktop\\\u8aaa\u660e\u66f8\u7ffb\u8b6f\\\u5716\\32-bit division.png\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-069.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-22  INCREMENT\uff08\uff0b1\uff09<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN15 D P<\/p>\n<p>\uff08\uff0b1\uff09<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>INCREMENT<\/p>\n<p>(Adds 1 to the D value)<\/p>\n<\/td>\n<td>\n<p>FUN15 D P<\/p>\n<p>\uff08\uff0b1\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-070.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>D: The register to be increased <\/p>\n<p>D may combine with V, Z, P0~P9 to serve indirect addressing<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>XR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<td>\n<p>V, Z<\/p>\n<p>P0 ~ P9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<ul>\n<li>Adds 1 to the register D when the increment control input &quot;EN&quot; =1 or from 0 to 1 (P instruction). If the value of D is already at the upper limit of positive number 32767 or 2147483647, adding one to this value will change it to the lower limit of negative number -32768 or -2147483648. At the same time, the overflow flag FO0 (OVF) is set to 1.<\/li>\n<li>Please refer to Section 5.4 for details on overflow.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN15 D P<\/p>\n<p>\uff08\uff0b1\uff09<\/p>\n<\/td>\n<td>\n<p>INCREMENT<\/p>\n<p>(Adds 1 to the D value)<\/p>\n<\/td>\n<td>\n<p>FUN15 D P<\/p>\n<p>\uff08\uff0b1\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>16-bit increment register<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-071.png\" \/><\/p>\n<\/td>\n<td>\n<p>IF R_TRIG( S:= X0 ) THEN<\/p>\n<p>R0V++ ;<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>WHEN V\uff1d100\uff0c0+100\uff1d100<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R100<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u21e9X0\uff1d<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R100<\/p>\n<\/td>\n<td>\n<p>2<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-23  DECREMEMT\uff08\uff0d1\uff09<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN16 D P<\/p>\n<p>\uff08\uff0d1\uff09<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>DECREMENT<\/p>\n<p>(Subtracts 1 from the D value)<\/p>\n<\/td>\n<td>\n<p>FUN16 D P<\/p>\n<p>\uff08\uff0d1\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-072.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>D : The register to be decreased <\/p>\n<p>D may combine with V, Z, P0~P9 to serve indirect addressing<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>XR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<td>\n<p>V, Z<\/p>\n<p>P0 ~ P9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<ul>\n<li>Subtracts 1 from the register D when the decrement control input &quot;EN&quot; =1 or from 0 to 1 ( P instruction). If the value of D is already at the lower limit of negative number -32768 or -2147483648, subtracting one from this value will change it to the upper limit of positive number 32767 or 2147483647. At the same time, the underflow flag FO0 (UDF) is set to 1.<\/li>\n<li>Please refer to section 5.4 for detailed description of missing bits.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>16-bit decrement register<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-073.png\" \/><\/p>\n<\/td>\n<td>\n<p>IF R_TRIG( S:= X0 ) THEN<\/p>\n<p>R0&#8211; ;<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>FUN16 D P<\/p>\n<p>\uff08\uff0d1\uff09<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>DECREMENT<\/p>\n<p>(Subtracts 1 from the D value)<\/p>\n<\/td>\n<td>\n<p>FUN16 D P<\/p>\n<p>\uff08\uff0d1\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u21e9X0\uff1d<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>\uff0d1<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-24  COMPARE(CMP)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN17 D P<\/p>\n<p>CMP<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>COMPARE<\/p>\n<p>(Compares the data of Sa and Sb and outputs the results to function Outputs)<\/p>\n<\/td>\n<td>\n<p>FUN17 D P<\/p>\n<p>CMP<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-074.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>Sa: The register to be compared<\/p>\n<p>Sb: The register to be compared<\/p>\n<p>Sa, Sb may combine with V, Z, P0~P9 to serve indirect addressing<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WX<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>IR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<td>\n<p>XR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WX0<\/p>\n<p>\u2223<\/p>\n<p>WX1008<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R34768<\/p>\n<p>\u2223<\/p>\n<p>R34895<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D11999<\/p>\n<\/td>\n<td>\n<p>16\/32 bit<\/p>\n<p>+\/-number<\/p>\n<\/td>\n<td>\n<p>V\u3001Z<\/p>\n<p>P0~P9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<ul>\n<li>Compares the data of Sa and Sb using signed number when the compare control input &quot;EN&quot; =1 or from 0 to 1 (P instruction) and &quot;U\/S&quot; =0. If the data of Sa is equal to Sb, then set FO0 to 1. If the data of Sa&gt;Sb, then set FO1 to 1. If the data of Sa&lt;Sb, then set FO2 to 1. If the data of Sa &lt; Sb, then set the FO2 to 1.<\/li>\n<li>Compares the data of Sa and Sb using unsigned number when the compare control input &quot;EN&quot; =1 or from 0 to 1 (P instruction) and &quot;U\/S&quot; =1. If the data of Sa is equal to Sb, then set FO0 to 1. If the data of Sa&gt;Sb, then set FO1 to 1. If the data of Sa&lt;Sb, then set FO2 to 1. If the data of Sa &lt; Sb, then set the FO2 to 1.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN17 D P<\/p>\n<p>CMP<\/p>\n<\/td>\n<td>\n<p>COMPARE<\/p>\n<p>(Compares the data of Sa and Sb and outputs the results to function Outputs)<\/p>\n<\/td>\n<td>\n<p>FUN17 D P<\/p>\n<p>CMP<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>  Compares the data of 16-bit register<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-075.png\" \/><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<ul>\n<li>From the above example, we first assume the data of R0 is 1 and R1 is 2, and then compare the data by executing the CMP instruction. The FO0 and FO1 are set to 0 and FO2 (a&lt;b) is set to 1 since a&lt;b.<\/li>\n<li>If you want to have the compound results, such as\u2267\u3001\u2266\u3001&lt; &gt; etc., please send =\u3001&lt; and &gt; results to relay first and then combine the result from the relays.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-25  LOGICAL AND(AND)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN18 D P<\/p>\n<p>AND<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>LOGICAL AND<\/p>\n<\/td>\n<td>\n<p>FUN18 D P<\/p>\n<p>AND<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-076.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>Sa: The register to be ANDed<\/p>\n<p>Sb: The register to be ANDed<\/p>\n<p>D: The register to store the result of AND<\/p>\n<p>The Sa, Sb, D may combine with V, Z, P0~P9 to serve indirect addressing application<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WX<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>IR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WX0<\/p>\n<p>\u2223<\/p>\n<p>WX1008<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R34768<\/p>\n<p>\u2223<\/p>\n<p>R34895<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D11999<\/p>\n<\/td>\n<td>\n<p>16\/32 bit<\/p>\n<p>+\/-number<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<ul>\n<li>Performs logical AND operation for the data of Sa and Sb when the operation control input &quot;EN&quot; =1 or from 0 to 1 (P instruction). This operation compares the corresponding bits of Sa and Sb (B0~B15 or B0~B31). The bit in the D is set to 1 if both of the corresponding bit data of Sa and Sb is 1. The bit in the D is set to 0 if one of the corresponding bits is 0.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN18 D P<\/p>\n<p>AND<\/p>\n<\/td>\n<td>\n<p>LOGICAL AND<\/p>\n<\/td>\n<td>\n<p>FUN18 D P<\/p>\n<p>AND<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operation of 16-bit logical AND<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-077.png\" \/><\/p>\n<\/td>\n<td>\n<p>IF X0  THEN<\/p>\n<p>R2 := R0 &amp; R1 ;<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>      B15                    B0<\/p>\n<p>       \u2193    \t         \u2193<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td>\n<p>R1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u21e9X0\uff1d<\/p>\n<p>      B15\t          B0<\/p>\n<p>       \u2193\t          \u2193<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R2<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-26  LOGICAL(OR)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN19 D P<\/p>\n<p>OR<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>LOGICAL OR<\/p>\n<\/td>\n<td>\n<p>FUN19 D P<\/p>\n<p>OR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-078.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>Sa: The register to be ORed<\/p>\n<p>Sb: The register to be ORed<\/p>\n<p>D: The register to store the result of OR<\/p>\n<p>The Sa, Sb, D may combine with V, Z, P0~P9 to serve indirect addressing<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WX<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>IR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<td>\n<p>XR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WX0<\/p>\n<p>\u2223<\/p>\n<p>WX1008<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R34768<\/p>\n<p>\u2223<\/p>\n<p>R34895<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<td>\n<p>16\/32-bit<\/p>\n<p>+\/-number<\/p>\n<\/td>\n<td>\n<p>V, Z<\/p>\n<p>P0 ~ P9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>Operation of 16-bit logical OR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<ul>\n<li>Performs logical OR operation for the data of Sa and Sb when the operation control input &quot;EN&quot; =1 or from 0 to 1 (P instruction). This operation compares the corresponding bits of Sa and Sb (B0~B15 or B0~B31). The bit in the D is set to 1 if one of the corresponding of Sa or Sb is 1. The bit in the D is set to 0 if both of the corresponding bits of Sa and Sb is 0.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN19 D P<\/p>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>LOGICAL OR<\/p>\n<\/td>\n<td>\n<p>FUN19 D P<\/p>\n<p>OR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operation of 16-bit logical OR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-079.png\" \/><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>                   B15                     B0<\/p>\n<p>\t\u2193\t\u2193<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td>\n<p>R1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u21e9X0\uff1d1<\/p>\n<p>\tB15\tB0<\/p>\n<p>\t\u2193\t\u2193<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R2<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-27  BIN\u2192BCD CONVERSION<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN20<strong> <\/strong>D P<\/p>\n<p>\u2192BCD<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>BIN\u2192BCD CONVERSION<\/p>\n<p>(Converts BIN data of the device specified at S into BCD and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN20<strong> <\/strong>D P<\/p>\n<p>\u2192BCD<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-080.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>S: The register to be converted<\/p>\n<p>D: The register to store the converted data (BCD code)<\/p>\n<p>The S, D may combine with V, Z, P0~P9 to serve indirect addressing<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WX<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>IR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<td>\n<p>XR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WX0<\/p>\n<p>\u2223<\/p>\n<p>WX1008<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R34768<\/p>\n<p>\u2223<\/p>\n<p>R34895<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<td>\n<p>16\/32-bit<\/p>\n<p>+\/-number<\/p>\n<\/td>\n<td>\n<p>V, Z<\/p>\n<p>P0 ~ P9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>S<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<ul>\n<li>FB-PLC uses binary code to store and to execute calculations. If want to send the internal PLC data to the external displays such as seven-segment displays, it is more convenient for us to read the result on screen by converting the BIN data to BCD data. For example, it is more clear for us to read the reading &quot;12&quot; instead of the binary code &quot;1100.&quot;<\/li>\n<li>Converts BIN data of the device specified at S into BCD and writes the result in D when the operation control input &quot;EN&quot; =1 or from 0 to 1 (P instruction). If the data in S is not a BCD value (0~9999 or 0~9999999), then the error flag FO0 is set to 1 and the old data of D are retained.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN20<strong> <\/strong>D P<\/p>\n<p>\u2192BCD<\/p>\n<\/td>\n<td>\n<p>BIN\u2192BCD CONVERSION<\/p>\n<p>(Converts BIN data of the device specified at S into BCD and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN20<strong> <\/strong>D P<\/p>\n<p>\u2192BCD<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>16-bit BIN \u2192 BCD conversion<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-081.png\" \/><\/p>\n<\/td>\n<td>\n<p>IF X0 THEN<\/p>\n<p>ToBCD( S:= 9999, D=&gt; R0);<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>         B15                             B0<\/p>\n<p>\t\u2193\t\u2193<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>S<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u21e9X0\uff1d1<\/p>\n<p>\tB15\tB0<\/p>\n<p>\t\u2193\t\u2193<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-29  BCD\u2192BIN CONVERSION<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN21<strong> <\/strong>D P<\/p>\n<p>\u2192BIN<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>BCD\u2192BIN CONVERSION<\/p>\n<p>(Converts BCD data of the device specified at S into BIN and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN21<strong> <\/strong>D P<\/p>\n<p>\u2192BIN<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-082.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>S: The register to be converted<\/p>\n<p>D: The register to store the converted data (BIN code)<\/p>\n<p>The S, D may combine with V, Z, P0~P9 to serve indirect addressing<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WX<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WSM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>IR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<td>\n<p>XR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WX0<\/p>\n<p>\u2223<\/p>\n<p>WX1008<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R34768<\/p>\n<p>\u2223<\/p>\n<p>R34895<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35151<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<td>\n<p>16\/32-bit<\/p>\n<p>+\/-number<\/p>\n<\/td>\n<td>\n<p>V, Z<\/p>\n<p>P0 ~ P9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>S<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<ul>\n<li>The decimal (BCD) data must be converted to binary (BIN) data first in order for PLC to accept the data which is originally in decimal unit (BCD code) inputted from external device such as digital switch because the BCD data can not be accepted by PLC for its operations.<\/li>\n<li>Converts BCD data of the device specified at S into BIN and writes the result in D when the operation control input &quot;EN&quot; =1 or from 0 to 1 (P instruction). If the data in S is not in BCD, then the error flag FO0 is set to 1 and the old data of D are retained.<\/li>\n<li>Constant is converted to BIN automatically when store in program and can not be used as a source operand of this function.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN21<strong> <\/strong>D P<\/p>\n<p>\u2192BIN<\/p>\n<\/td>\n<td>\n<p>BCD TO BIN CONVERSION<\/p>\n<p>(Converts BCD data of the device specified at S into BIN and stores the result in D)<\/p>\n<\/td>\n<td>\n<p>FUN21<strong> <\/strong>D P<\/p>\n<p>\u2192BIN<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>16-bit BCD to BIN conversion<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-083.png\" \/><\/p>\n<\/td>\n<td>\n<p>IF R_TRIG( S:= X0 ) THEN<\/p>\n<p>ToBIN( S:= WX0 , D=&gt; R1);<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>X15\tX0<\/p>\n<p>\t\u2193    1\t2\t3       4\t     H       \u2193<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>S<\/p>\n<\/td>\n<td>\n<p>WX0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u21e9X0\uff1d1<\/p>\n<p>\tB15\tB0<\/p>\n<p>\t\u2193\t\u2193<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>R1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>6-30  Modulo(MOD)<\/h3>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN226<strong> <\/strong>D P<\/p>\n<p>MOD<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Modulo(Remainder)<\/p>\n<\/td>\n<td>\n<p>FUN226<strong> <\/strong>D P<\/p>\n<p>MOD<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Symbol<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-084.png\" \/><\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Operand<\/p>\n<p>Sa: Dividend<\/p>\n<p>Sb: Divisor<\/p>\n<p>D: Destination register to store the results <\/p>\n<p>(remainder) of the divison<\/p>\n<p>Sa, Sb, D may combine with V, Z, P0~P9 to serve indirect addressing<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range<\/p>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>WX<\/p>\n<\/td>\n<td>\n<p>WY<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WM<\/p>\n<\/td>\n<td>\n<p>WS<\/p>\n<\/td>\n<td>\n<p>TMR<\/p>\n<\/td>\n<td>\n<p>CTR<\/p>\n<\/td>\n<td>\n<p>HR<\/p>\n<\/td>\n<td>\n<p>IR<\/p>\n<\/td>\n<td>\n<p>OR<\/p>\n<\/td>\n<td>\n<p>SR<\/p>\n<\/td>\n<td>\n<p>ROR<\/p>\n<\/td>\n<td>\n<p>DR<\/p>\n<\/td>\n<td>\n<p>K<\/p>\n<\/td>\n<td>\n<p>XR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WX0<\/p>\n<p>\u2223<\/p>\n<p>WX1008<\/p>\n<\/td>\n<td>\n<p>WY0<\/p>\n<p>\u2223<\/p>\n<p>WY1008<\/p>\n<\/td>\n<td>\n<p>WM0<\/p>\n<p>\u2223<\/p>\n<p>WM9104<\/p>\n<\/td>\n<td>\n<p>WM9120<\/p>\n<p>\u2223<\/p>\n<p>WM25584<\/p>\n<\/td>\n<td>\n<p>WS0<\/p>\n<p>\u2223<\/p>\n<p>WS3088<\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<p>\u2223<\/p>\n<p>T1023<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<p>\u2223<\/p>\n<p>C1279<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<p>\u2223<\/p>\n<p>R34767<\/p>\n<\/td>\n<td>\n<p>R34768<\/p>\n<p>\u2223<\/p>\n<p>R35023<\/p>\n<\/td>\n<td>\n<p>R35024<\/p>\n<p>\u2223<\/p>\n<p>R35279<\/p>\n<\/td>\n<td>\n<p>R35280<\/p>\n<p>\u2223<\/p>\n<p>R43223<\/p>\n<\/td>\n<td>\n<p>R43224<\/p>\n<p>\u2223<\/p>\n<p>R47319<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<p>\u2223<\/p>\n<p>D7999<\/p>\n<\/td>\n<td>\n<p>16\/32-bit +\/- number<\/p>\n<\/td>\n<td>\n<p>V, Z<\/p>\n<p>P0 ~ P9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb*<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Description<\/p>\n<\/td>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<ul>\n<li>Writes the results to a specified register D when the multiplication control input &quot;EN&quot; =1 or from 0 to 1 (P instruction). <\/li>\n<\/ul>\n<p>\u203bWhen the divisor is 0, it will be regarded as the quotient is 0, and the remainder is equal to the dividend. When using it, please note that the divisor should not be entered as 0, otherwise you will get remainder = dividend<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN226<strong> <\/strong>D P<\/p>\n<p>MOD<\/p>\n<\/td>\n<td>\n<p>Modulo(Remainder)<\/p>\n<\/td>\n<td>\n<p>FUN226<strong> <\/strong>D P<\/p>\n<p>MOD<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Example<\/p>\n<\/td>\n<td colspan=\"2\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Ladder Diagram<\/p>\n<\/td>\n<td>\n<p>ST<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/mplc-m07-en-06\/mplc-m07-en-06-085.png\" \/><\/p>\n<\/td>\n<td>\n<p>IF X0 Then<\/p>\n<p>R2 := R0 MOD R1;<\/p>\n<p>END_IF<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<ul>\n<li>When X0 is ON, Sa will be divided by Sb, and the remainder will be written into D. <\/li>\n<li>For example: If Sa = 5 and Sb = 3, then when X0 is ON, D will be written with 2.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>6-1 TIMER(T) T TIMER T Symbol TB: Time Base (0.001S,0.0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51],"tags":[],"class_list":["post-3272","post","type-post","status-publish","format-standard","hentry","category-en-mplc-m07"],"_links":{"self":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts\/3272","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=3272"}],"version-history":[{"count":0,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts\/3272\/revisions"}],"wp:attachment":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/media?parent=3272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/categories?post=3272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/tags?post=3272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}