{"id":3432,"date":"2026-11-17T21:35:07","date_gmt":"2026-11-17T13:35:07","guid":{"rendered":"https:\/\/resource.fatek.com\/index.php\/2026\/11\/17\/fbs-ins-en-005\/"},"modified":"2026-11-17T21:35:07","modified_gmt":"2026-11-17T13:35:07","slug":"fbs-ins-en-005","status":"publish","type":"post","link":"https:\/\/resource.fatek.com\/index.php\/2026\/11\/17\/fbs-ins-en-005\/","title":{"rendered":"Chapter 5 Description of Function Instructions"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-001.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-002.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-003.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-004.png\" \/><\/p>\n<p>5.1The Format of Function Instructions<\/p>\n<p>In this chapter we will introduce the function instructions of FBs-PLC in details. All the explanations for each function will be divided into four parts including input control, instruction number\/name, operand and function output. If use the FP-08 to input the mnemonic instruction, except for the T, C, SET, RST and SFC instructions that can be entered directly by pressing a single key stroke on FP-08, other function instructions must be entered by key in the instruction number rather than the instruction name. An example is shown in below. <\/p>\n<p>Ladder Diagram \tFP-08 Mnemonic code <\/p>\n<p>Example 1: Single input instruction <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"3\">\n<p>Operation control<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>EN<\/p>\n<\/td>\n<td>\n<p>15<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>R<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>0<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>CY<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>Carry(FO0)<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>FUN    15 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>(+1)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D: R  0 <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>Example 2: Multiple input instruction <\/p>\n<p>7.UDCTR<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Counter Pulse<\/p>\n<\/td>\n<td>\n<p>PSU<\/p>\n<\/td>\n<td>\n<p>CV :<\/p>\n<\/td>\n<td>\n<p>R<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>CUP<\/p>\n<\/td>\n<td>\n<p>Count-Up(FO0)<\/p>\n<\/td>\n<td>\n<p>FUN    7 <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>CV:R  0 <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Remark\uff1aThe words inside the hollow box in mnemonic code field are the prompting message from FP-08 such as D:, \tCV:, and Pr: and are not entered by the user. <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Up\/Down count<\/p>\n<\/td>\n<td>\n<p>U\/D<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>PV :<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>10<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>PV:  10 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Clear control<\/p>\n<p>5.1.1Input Control <\/p>\n<\/td>\n<td>\n<p>CLR<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>Except for the seven function instructions that do not have input control, the number of the input control of other FBs-PLC function instructions can be ranged from one to four. Execution of the instructions and operations is dependent on the input control signal or the combinations of the several input control signals. The ladder programming software for FACON PLC &#8211; WinProladder can help user to complete the complex design and document works. In the ladder program window we can see all the function instructions were displayed by blocks surrounded with abbreviated words for ease of comprehension, include inputs, outs, function name, and parameter names. As shown in example 2 above, the first input mark &quot;PSU&quot; indicates when the &quot;PSU&quot; input changes from 0 to 1 (rising edge) the counter will be increased or decreased by 1 (depending on the &quot;U\/D&quot; status). The second input mark &quot;U\/D&quot; with a status of 1 represents the word above slash (&quot;U&quot;) and the status 0 represents the word under slash (&quot;D&quot;), that is second input &quot;U\/D&quot; states =1, the counter will be increased by 1 when &quot;PSU&quot; input from 0 to 1, and when &quot;U\/D&quot;=0, the counter will be decreased by 1. The third input mark &quot;CLR&quot; indicates when this input is 1, the counter will be cleared to 0. Chapter 7 give the descriptions of input control of each function instruction. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Remark: There are total of seven instructions whose input control should be directly connected to the origin-line those are MCE, SKPE, LBL, RTS, RTI, FOR, and NEXT. Please refer to chapter 6 and 7 for more detailed explanations. <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-005.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-006.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-007.png\" \/><\/p>\n<p>All input controls of the function instructions should be connected by the corresponding elements, otherwise a syntax error will occur. As shown in example 3 below, the function instruction FUN7 has three inputs and three elements before FUN7. ORG X0, LD X1 and LD X2 corresponds to the first input PSU, second input U\/D and third input CLR. <\/p>\n<p>Example 3: <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"4\">\n<p>X0<\/p>\n<\/td>\n<td colspan=\"4\">\n<p>Ladder Diagram <\/p>\n<\/td>\n<td rowspan=\"8\">\n<p>CUP<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>FP-08 Mnemonic code <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<p>7.UDCTR<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>ORG <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>X0 <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>FUN7 need three <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>PSU<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>CV :<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>R<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>LD <\/p>\n<\/td>\n<td>\n<p>X1 <\/p>\n<\/td>\n<td>\n<p>elements because <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>X1<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>U\/D<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>PV :<\/p>\n<\/td>\n<td colspan=\"2\" rowspan=\"2\">\n<p>10<\/p>\n<\/td>\n<td>\n<p>LD <\/p>\n<\/td>\n<td>\n<p>X2<\/p>\n<\/td>\n<td>\n<p>it has three inputs <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p>FUN  7 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>X2<\/p>\n<\/td>\n<td colspan=\"4\" rowspan=\"2\">\n<p>CLR<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>CV :R 0 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p>PV :10 <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h4>5.1.2 Instruction Number and Derivative Instructions<\/h4>\n<p>As mentioned before, except for the nine instructions that can be entered using the dedicated keys on the keyboard, other <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"3\"><\/td>\n<\/tr>\n<tr>\n<td>\n<p>P, DP can be added which can derive three addi<\/p>\n<p>and C (except C200~C255) registers are 16-b combine two consecutive 16-bit registers toge prefix a D letter before register name such as DWY8 in the monitor mode of FP-08, then a 3<\/p>\n<p>DWY8 = WY24\u2212WY8 <\/p>\n<\/td>\n<td>\n<p>tional function instructions. <\/p>\n<p>it. If a register with 32-bit data le ther such as R1-R0, R3-R2 etc. DR0 represents R1-R0 and DR 2-bit long value (R1-R0 or WY24-<\/p>\n<p>WY24 <\/p>\n<\/td>\n<td>\n<p>e ngth is required, then it is necessary to and those registers are represented b 2 represents R3-R2. If you enter DR0 o WY8) will be displayed. <\/p>\n<p>WY8 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>= Y39\uff5eY8 <\/p>\n<\/td>\n<td>\n<p>\u2191<\/p>\n<\/td>\n<td>\n<p>\u2191<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>High Word register <\/p>\n<\/td>\n<td>\n<p>Low Word register <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"5\">\n<p>DR0 = R1\u2212R0 <\/p>\n<\/td>\n<td>\n<p>B31 <\/p>\n<\/td>\n<td>\n<p>B16<\/p>\n<\/td>\n<td>\n<p>B15 <\/p>\n<\/td>\n<td>\n<p>B0 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>R1 <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>R0 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u2191<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>\u2191<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>High Word register <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Low Word register <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>B31 <\/p>\n<\/td>\n<td>\n<p>B16<\/p>\n<\/td>\n<td>\n<p>B15 <\/p>\n<\/td>\n<td>\n<p>B0 <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>function instructions must be entered using the &quot;instruction number\u201d. Follow the instruction number there are postfixes D, <\/p>\n<p>D: Indicates a Double Word (32-bit). The 16-bit word is the basic unit of the registers in FBs-PLC. The data length of R, T <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-008.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-009.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-010.png\" \/><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Remark: In order to differentiate between 16-bit and 32-bit instructions while using the ladder diagram and mnemonic code, we add the postfix letter D after the &quot;Instruction number&quot; to represent 32-bit instructions and the size of their operand are 32-bit as shown in example 4 on P.6-6. The instruction FUN 11D has a postfix letter D, therefore the source and destination operands need to prefix a letter D as well, such as the augend Sa : R0 is actually Sa=DR0=R1-R0 and Sb=DR2=R3-R2. Please also pay special attention to the length of the other operands except source and destination are only one word whether 16-bit or 32-bit instructions are used. <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>P: indicates the pulse mode instruction. The instruction will be executed when the status of input control changes from 0 to1 (rising edge). As shown in example 1, if a postfix letter P is added to the instruction (FUN 15P), the instruction FUN 15P will only be executed when the status of input control signal changes from 0 to 1. The execution of the instruction is in level mode if it does not have a P postfix, this means the instruction will be executed for every scan until the status of input control changes from 1 to 0. In this operation manual, an example of the operation statement of a function instruction is shown below. <\/p>\n<p>The first one indicates the execution requirement for non-P instruction (level mode) and the second one indicates the execution requirement for P instruction (pulse mode). The following waveform shows the result (R0) of FUN15 and FUN15P under the same input condition. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>t is the scan time <\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>t<\/p>\n<p>1<\/p>\n<\/td>\n<td rowspan=\"6\">\n<p>t<\/p>\n<p>0001H<\/p>\n<\/td>\n<td rowspan=\"8\">\n<p>0002H<\/p>\n<\/td>\n<td rowspan=\"8\">\n<p>t t<\/p>\n<p>0003H<\/p>\n<\/td>\n<td rowspan=\"8\">\n<p>0004H<\/p>\n<\/td>\n<td rowspan=\"8\">\n<p>t<\/p>\n<\/td>\n<td rowspan=\"8\">\n<p>t<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>t<\/p>\n<\/td>\n<td rowspan=\"8\">\n<p>t<\/p>\n<\/td>\n<td rowspan=\"8\">\n<p>0006H<\/p>\n<\/td>\n<td rowspan=\"8\">\n<p>t<\/p>\n<\/td>\n<td rowspan=\"8\">\n<p>t<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Input control<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>Executes the FUN15P<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>0002H<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>(R0 initial is 0)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>Executes the FUN15<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>3<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>0005H<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>0001H<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>(R0 initial is 0)<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>DP: Indicates the instruction is a 32-bit instruction operating with pulse mode. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Remark: P instruction is much more time saving than level instruction in program scanning, So user should use P<img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-011.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>instruction as much as possible. <\/p>\n<h4>5.1.3Operand <\/h4>\n<p>The operand is used for data reference and storage. The data of source (S) operand are only for reference and will not be changed with the execution of the instruction. The destination (D) operand is used to store the result of operation and its data may be changed after the execution of the instruction. The following table illustrates the names and functions of FATEK PLC function instruction&#8217;s operands and types of contacts, coils, or registers that can be used as an operand. <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-012.png\" \/><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>\u0084<\/p>\n<\/td>\n<td>\n<p>The names and functions of the major operands: <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Abbreviation <\/p>\n<\/td>\n<td>\n<p>Name <\/p>\n<\/td>\n<td>\n<p>Descriptions <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>S <\/p>\n<\/td>\n<td>\n<p>Source <\/p>\n<\/td>\n<td>\n<p>The data of source (S) operand are only for reading and reference and will not be changed with the execution of the instruction. If there are more than one source operands, each operand will be identified by the footnote such as Sa and Sb. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D <\/p>\n<\/td>\n<td>\n<p>Destination <\/p>\n<\/td>\n<td>\n<p>The destination (D) operand is used to store the result of operation. The original data will be changed after operation. Only the coils and registers which are not write prohibited can be the destination operand. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>L <\/p>\n<\/td>\n<td>\n<p>Length <\/p>\n<\/td>\n<td>\n<p>Indicates the data size or the length of the table, usually are constants. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>N <\/p>\n<\/td>\n<td>\n<p>Number <\/p>\n<\/td>\n<td>\n<p>A constant most often used as numbers and times. If there are more than one constant, each constant will be identified by the footnotes such as Na, Nb, Ns, Nd, etc.. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Pr <\/p>\n<\/td>\n<td>\n<p>Pointer <\/p>\n<\/td>\n<td>\n<p>Used to point to a specific a block of data or a specific data or register in a table. Generally the Pr value can be varied, therefore cannot be constant or input register. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>CV <\/p>\n<\/td>\n<td>\n<p>Current value <\/p>\n<\/td>\n<td>\n<p>Used in T and C instruction to store the current value of T or C <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>PV <\/p>\n<\/td>\n<td>\n<p>Set value <\/p>\n<\/td>\n<td>\n<p>Used in T and C instructions for reference and comparison <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>T <\/p>\n<\/td>\n<td>\n<p>Table <\/p>\n<\/td>\n<td>\n<p>A combination of a set of consecutive registers forms a table. The basic operation units are word and double word. If there is more than one table, each table will be identified by footnotes such as Ta, Tb, Ts and Td etc.. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>M <\/p>\n<\/td>\n<td>\n<p>Matrix <\/p>\n<\/td>\n<td>\n<p>A combination of a set of consecutive registers forms a matrix. The basic operation unit is bit. If there is more than one matrix, each matrix will be identified by footnotes such as Ma, Mb, Ms and Md etc.. <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>Besides the major operands mentioned above, there are other operands which are used for certain special purposes such as the operand Fr for frequency, ST for stack, QU for Queue etc.. Please refer to the instruction descriptions for more details. <\/p>\n<p>\u0084The types of the operand and their range: The types of operand for the function instructions are discrete, register \tand constant. <\/p>\n<p>a) Discrete operand : <\/p>\n<p>There are total five function instructions that reference the discrete operand, namely SET, RST, DIFU, DIFD and TOGG. Those five instructions can only be used for operations of Y\u25b3\u25b3\u25b3(external output), M\u25b3\u25b3\u25b3\u25b3(internal and special) and S\u25b3\u25b3\u25b3(step) relays. The table shown below indicates the operands and ranges of the five function instructions. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"2\">\n<p>Range <\/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>Symbol &quot;O&quot; indicates the D (Destination operand) can use this type of <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p>Y0 <\/p>\n<\/td>\n<td>\n<p>M0 <\/p>\n<\/td>\n<td>\n<p>M1912 <\/p>\n<\/td>\n<td>\n<p>S0 <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>coils as operands. The &quot;*&quot; sign above the &quot;O&quot; shown in SM column <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Ope- <\/p>\n<\/td>\n<td>\n<p>\u2223<\/p>\n<\/td>\n<td>\n<p>\u2223<\/p>\n<\/td>\n<td>\n<p>\u2223<\/p>\n<\/td>\n<td>\n<p>\u2223<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>rand <\/p>\n<\/td>\n<td>\n<p>Y255 <\/p>\n<\/td>\n<td>\n<p>M1911 <\/p>\n<\/td>\n<td>\n<p>M2001 <\/p>\n<\/td>\n<td>\n<p>S999 <\/p>\n<\/td>\n<td>\n<p>indicates that should exclude the write prohibited relays as operands. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\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 rowspan=\"2\">\n<p>\u25cb<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>Please refer to page 2-3 for introduction of the special relays. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>b) <\/p>\n<\/td>\n<td colspan=\"4\">\n<p>Register operand : <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>The major operand for function instructions is register operand. There are two types of register operands: the native registers which already is of Words or Double Words data such as R, T, C. The other is derivative registers (WX, WY, WM, WS) which are formed by discrete bits. The types of registers that can be used as <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-013.png\" \/><\/p>\n<p>instruction operands and their ranges are all listed in the following table: <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Range <\/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>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 rowspan=\"3\">\n<p>Ope- <\/p>\n<\/td>\n<td>\n<p>WX0 <\/p>\n<\/td>\n<td>\n<p>WY0 <\/p>\n<\/td>\n<td>\n<p>WM0 <\/p>\n<\/td>\n<td>\n<p>WS0 <\/p>\n<\/td>\n<td>\n<p>T0<\/p>\n<\/td>\n<td>\n<p>C0<\/p>\n<\/td>\n<td>\n<p>R0<\/p>\n<\/td>\n<td>\n<p>R3840<\/p>\n<\/td>\n<td>\n<p>R3904<\/p>\n<\/td>\n<td>\n<p>R3968<\/p>\n<\/td>\n<td>\n<p>R5000<\/p>\n<\/td>\n<td>\n<p>D0<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>16\/32-bit <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>V\u3001Z<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p>\u2223<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>\u2223<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>\u2223<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>\u2223<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>\u2223<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>\u2223<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>\u2223<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>\u2223<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>\u2223<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>\u2223<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>\u2223<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>\u2223<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p>P0~P9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>rand <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>+\/- number <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>WX240 <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>WY240<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>WM1896 <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>WS984 <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>T255<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>C255<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>R3839<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>R3903<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>R3967<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>R4167<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>R8071<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>D4095 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>S <\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>\u25cb<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<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 rowspan=\"2\">\n<p>\u25cb<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u25cb<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u25cb<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u25cb<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u25cb<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u25cb<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u25cb<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u25cb*<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u25cb*<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u25cb<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u2027<br \/>\u2027\u2027<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>The &quot;\u25cb&quot; symbol in the table indicates can apply this kind of data as operand. The &quot;\u25cb*&quot; symbol indicates can apply this kind of data except the write prohibited registers as operand. To learn more about write prohibited registers please refer to page 2-8 for introduction of the special register. <\/p>\n<p>When R5000\uff5eR8071 are not set to be read only registers, can used as normal registers (read, and write) <\/p>\n<p>Remark 1: The registers with a prefix W, such as WX, WY, WM and WS are formed by 16 bits. For example, WX0 means the register is formed by X0(bit 0)~X15(bit 15). WY144 means the register is formed by Y144(bit 0)~Y159(bit 15). Please note that the discrete number must be the multiple of 8 such as 0, 8, 16, 24&#8230;. <\/p>\n<p>Remark 2: The last register (Word) in a table can not be represented as a 32-bit operand in the function because 2 \tWords are required for a 32-bit operand. <\/p>\n<p>Remark 3: TMR\uff08T0\uff5eT255\uff09and CTR\uff08C0\uff5eC255\uff09are the registers of timers and counters respectively. Although they can be used as general registers, they also complicate the systems and make debugging more difficult. Therefore you should avoid writing anything into the TMR or CTR registers. <\/p>\n<p>Remark 4: T0\uff5eT255 and C0\uff5eC199 are 16-bit register. But C200~C255 are 32-bit register, therefore can\u2019t be \tused as 16-bit operands. <\/p>\n<p>Remark 5: Apart from being directly appointed by register\u2019s number (address) as the foregoing discussions, the register\u2019s operand in the range of R0\uff5eR8071 can be combined with pointer register V\u3001Z or P0~P9 to make indirect addressing. Please refer to the example in the next section (Section 5.2) for the description of using pointer register (XR) to make indirect addressing. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>c) <\/p>\n<\/td>\n<td>\n<p>Constant operands : <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>The range of 16-bit constant is between -32768~32767. The range of 32-bit constant is between -2147483648~2147483647. The constant for several function instructions can only be a positive constant. The range of 16-bit and 32-bit constants are listed in the table shown below. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Classification <\/p>\n<\/td>\n<td>\n<p>Range <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>16-bit signed number <\/p>\n<\/td>\n<td>\n<p>-32768\uff5e32767 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>16-bit un-signed number <\/p>\n<\/td>\n<td>\n<p>0\uff5e32767 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>32-bit signed number <\/p>\n<\/td>\n<td>\n<p>-2147483648\uff5e2147483647 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>32-bit un-signed number <\/p>\n<\/td>\n<td>\n<p>0\uff5e2147483647 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>16\/32-bit signed number <\/p>\n<\/td>\n<td>\n<p>-32768\uff5e32767 or <br \/>-2147483648\uff5e2147483647 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>16\/32-bit un-signed number <\/p>\n<\/td>\n<td>\n<p>0\uff5e32767 or <br \/>0\uff5e2147483647 <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>It is possible that the length and size of a specific operand, such as L, bit size, N etc.., are different, and the differences are all directly marked at the operand column. Please refer to the explanations of function instructions.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-014.png\" \/><\/p>\n<h4>5.1.4Functions Output (FO) <\/h4>\n<p>The \u201cFunction Output\u201d (FO) is used to indicate the operation result of the function instruction. Like control input, each function outputs shown in the screen of programming software are all attached with a word which comes from the abbreviation of the output functionality. Such as CY derived from CarrY. The maximum number of function outputs is 4 and those are denoted as FO0, FO1, FO2, FO3 respectively. The FO status must be taken out by FO instruction (there is a FO special key on FP-08 program writing device). The unused FO may be left without connecting to any elements, such as FO1 (CY) shown in Example 4 below. <\/p>\n<p>Example 4 : <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"12\">\n<p>X0<\/p>\n<\/td>\n<td rowspan=\"5\">\n<p>EN<\/p>\n<\/td>\n<td colspan=\"4\">\n<p>Ladder Diagram <\/p>\n<\/td>\n<td rowspan=\"5\">\n<p>D=0<\/p>\n<\/td>\n<td rowspan=\"5\">\n<p>Y0<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Mnemonic Codes <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\" rowspan=\"2\">\n<p>11D.(+)<\/p>\n<\/td>\n<td>\n<p>ORG     X <\/p>\n<\/td>\n<td>\n<p>0 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\" rowspan=\"2\">\n<p>FUN    11D <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>Sa :<\/p>\n<\/td>\n<td colspan=\"2\" rowspan=\"2\">\n<p>R<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p> Sa:   R <\/p>\n<\/td>\n<td>\n<p>0 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"7\">\n<p>U\/S<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Sb :<\/p>\n<\/td>\n<td>\n<p>R<\/p>\n<\/td>\n<td>\n<p>2<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>CY<\/p>\n<\/td>\n<td rowspan=\"7\">\n<p>Y1<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p> Sb:  R <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>2 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"6\">\n<p>D  :<\/p>\n<\/td>\n<td colspan=\"2\" rowspan=\"6\">\n<p>R<\/p>\n<\/td>\n<td rowspan=\"6\">\n<p>4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p> D :   R <\/p>\n<\/td>\n<td>\n<p>4 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>FO           0 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p>BR<\/p>\n<\/td>\n<td>\n<p>OUT     Y <\/p>\n<\/td>\n<td>\n<p>0 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>FO <\/p>\n<\/td>\n<td>\n<p>2 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>OUT     Y <\/p>\n<\/td>\n<td>\n<p>1 <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>When M1919=0, the FO status will only be updated if the instruction is executed. It will keep the same status until \ta new FO status is generated after the instruction is executed again (memory keeping). <\/p>\n<p>When M1919=1, the FO status will be reset to 0 (no memory keeping) if the instruction is not executed. <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>5.2Use Index Register(XR) for Indirect Addressing<\/p>\n<p>In the FBs-PLC function instructions, there are some operands that can be combined with pointer register (V\u3001Z\u3001P0~P9) to make indirect addressing (will be shown in the operand table if it applicable). However, only the registers in the range R0\uff5eR8071 can be combined with an pointer register to perform indirect addressing (other operands such as discrete, constant and D0\uff5eD3071 cannot be used for indirect addressing). <\/p>\n<p>There are twelve pointer registers XR (V\u3001Z\u3001P0~P9). The V register in fact is the R4164 of special registers (R3840\uff5eR4167) , the Z register is the R4165 and the P0~P9 register is the (D4080~D4089). The actual addressed register by index addressing is just offset the original operand with the content of the index register. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Original <\/p>\n<\/td>\n<td>\n<p>Pointer <\/p>\n<\/td>\n<td>\n<p>Actual<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Operand<\/p>\n<\/td>\n<td>\n<p>Register <\/p>\n<\/td>\n<td>\n<p>Operand<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u2193<\/p>\n<\/td>\n<td>\n<p>\u2193<\/p>\n<\/td>\n<td>\n<p>\u2193<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>R100 <\/p>\n<\/td>\n<td>\n<p>V (If V=50) <\/p>\n<\/td>\n<td>\n<p>= R150 <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-015.png\" \/><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"6\">\n<p>100 <\/p>\n<\/td>\n<td rowspan=\"6\">\n<p>+<\/p>\n<\/td>\n<td>\n<p>50 <\/p>\n<\/td>\n<td colspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-016.png\" \/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p> (If V=100) <\/p>\n<\/td>\n<td>\n<p>= R200 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u2027<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>\u2027<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u2027<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>\u2027<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u2027<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>\u2027<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u2027<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>\u2027<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-017.png\" \/><\/p>\n<p>As shown in the above diagram, you only need to change the V value to change the operand address. After combining the index addressing with the FBs-PLC function instructions, a powerful and highly efficient control application can be achieved by using very simple instructions. Using the program shown in the diagram below as an example, you only need to use a block move instruction (BT_M) to achieve a dynamic block data display, such as a parking management system. <\/p>\n<p>Index Register(P0~P9) Introduction <\/p>\n<p>In indirect addressing application, Rxxxx register can combine V\u3001Z &amp; P0\uff5eP9 for index addressing; Dxxxx register can&#8217;t combine V\u3001Z for index addressing, but P0\uff5eP9 are allowed. <\/p>\n<p>When V\u3001Z index register being combined with the Rxxxx register, <br \/>for example, R0 with V\u3001Z, the instruction format is R0V(where V=100, it means R100) or R0Z(where Z=500, it means R500); when P0\uff5eP9 index register being combined with the Rxxxx register, the instruction format is RPn (n=0\uff5e9) or RPmPn (m,n=0\uff5e9), for example RP5 (where P5=100, it means R100) or RP0P1(where P0= 100, P1=50, it means150). <\/p>\n<p>When P0\uff5eP9 index register being combined with the Dxxxx register, the instruction format is DPn (n=0\uff5e9) or DPmPn (m,n=0\uff5e9), for example DP3 (where P3=10, it means D10) or DP4P5 (where P4=100, P5=1, it means D101). <\/p>\n<p>It can combine both P0\uff5eP9 index register, for example P2=20, P3=30, when Rxxxx or Dxxxx register combines both index register, RP2P3 will point to R50, DP2P3 will point to D50, it means the summation of both index register for indirect addressing. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"3\">\n<p>M1924<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>EN<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>08.MOV<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>1. <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>Index register P2=100 while power up or first run. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>S :<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>100<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>D :<\/p>\n<\/td>\n<td>\n<p>P2<\/p>\n<\/td>\n<td>\n<p>2. <\/p>\n<\/td>\n<td>\n<p>When X23 changes from 0\u00c61, FUN103 will perform the <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>table movement, the source starts from R100 (P2=100), <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"4\">\n<p>X23<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>EN<\/p>\n<\/td>\n<td colspan=\"3\" rowspan=\"2\">\n<p>103P.BT_M<\/p>\n<\/td>\n<td rowspan=\"9\">\n<p>D=0<\/p>\n<\/td>\n<td rowspan=\"11\">\n<p>3. <\/p>\n<\/td>\n<td>\n<p>the destination starts from R2000, the amount is 4. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>Coping the content of R100~R103 for R2000~R2003 at <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>Ts :<\/p>\n<\/td>\n<td colspan=\"2\" rowspan=\"2\">\n<p>RP2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>first execution, coping the content of R104~R107 for <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"7\">\n<p>X23<\/p>\n<\/td>\n<td rowspan=\"5\">\n<p>EN<\/p>\n<\/td>\n<td>\n<p>Td :<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>R2000<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>R2000~R2003 at second execution\u2026 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>L   :<\/p>\n<\/td>\n<td colspan=\"2\" rowspan=\"2\">\n<p>4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"5\">\n<p>Increasing the P2 index register by 4 to point to next 4 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p>11P.(+)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sa :<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>U\/S<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Sb :<\/p>\n<\/td>\n<td>\n<p>P2<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>CY<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>D   :<\/p>\n<\/td>\n<td>\n<p>P2<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>BR<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-018.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-019.png\" \/><\/p>\n<p> Indirect addressing program example <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"3\">\n<p>Ladder Diagram <\/p>\n<p>103.BT_M<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>Mnemonic Codes <\/p>\n<p>ORG SHORT <br \/>FUN 103 <br \/>\t Ts\uff1aR100V <br \/>\t Td\uff1a  R2000 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>EN<\/p>\n<\/td>\n<td>\n<p>Ts :<\/p>\n<\/td>\n<td>\n<p>R100   V<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Td :<\/p>\n<\/td>\n<td>\n<p>R2000<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>L  :<\/p>\n<\/td>\n<td>\n<p>4<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p> L\uff1a        4 <\/p>\n<p>resident \tPointer Register<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"5\">\n<p>data base in PLC<\/p>\n<\/td>\n<td colspan=\"4\">\n<p>V <\/p>\n<\/td>\n<td colspan=\"4\">\n<p>Resident 2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\" rowspan=\"2\">\n<p>R100<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>Name <\/p>\n<\/td>\n<td colspan=\"4\" rowspan=\"2\">\n<p>4 <\/p>\n<\/td>\n<td colspan=\"4\">\n<p>Sensor <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<p>Station <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>(V=0) <\/p>\n<\/td>\n<td colspan=\"2\" rowspan=\"2\">\n<p>Resident 1<\/p>\n<\/td>\n<td>\n<p>R101<\/p>\n<\/td>\n<td colspan=\"9\">\n<p>Tel. No. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>R102<\/p>\n<\/td>\n<td colspan=\"9\">\n<p>Car plate No.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u2024<\/p>\n<\/td>\n<td colspan=\"2\" rowspan=\"2\">\n<p>R103<\/p>\n<\/td>\n<td colspan=\"9\" rowspan=\"2\">\n<p>Parking No. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u2024<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u2024<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>R104<\/p>\n<\/td>\n<td colspan=\"9\">\n<p>Name <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>(V=4) <\/p>\n<\/td>\n<td colspan=\"2\" rowspan=\"2\">\n<p>Resident 2<\/p>\n<\/td>\n<td>\n<p>R105<\/p>\n<\/td>\n<td colspan=\"9\">\n<p>Tel. No. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>R106<\/p>\n<\/td>\n<td colspan=\"9\">\n<p>Car plate No.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u2024<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>R107<\/p>\n<\/td>\n<td>\n<p>Parking No. <\/p>\n<\/td>\n<td colspan=\"8\">\n<p>Temporary <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<p>\u2024<\/p>\n<\/td>\n<td>\n<p>\u2024<\/p>\n<\/td>\n<td rowspan=\"5\">\n<p>{<\/p>\n<\/td>\n<td rowspan=\"5\">\n<p>R2000<\/p>\n<\/td>\n<td colspan=\"2\" rowspan=\"2\">\n<p>Display <\/p>\n<\/td>\n<td colspan=\"4\" rowspan=\"2\">\n<p>Monitor <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<p>\u2024<\/p>\n<\/td>\n<td>\n<p>\u2024<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<p>\u2024<\/p>\n<\/td>\n<td>\n<p>\u2024<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Storage Area<\/p>\n<\/td>\n<td colspan=\"4\">\n<p>\u00d7\u00d7Community Resident <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<p>\u2024<\/p>\n<\/td>\n<td>\n<p>\u2024<\/p>\n<\/td>\n<td colspan=\"2\" rowspan=\"2\">\n<p>Name <\/p>\n<\/td>\n<td colspan=\"4\" rowspan=\"2\">\n<p>Parking System <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<p>\u2024<\/p>\n<\/td>\n<td>\n<p>\u2024<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<p>\u2024<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u2024<\/p>\n<\/td>\n<td colspan=\"3\" rowspan=\"2\">\n<p>R2001<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>Tel. No. <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>Name: <\/p>\n<\/td>\n<td colspan=\"3\" rowspan=\"2\">\n<p>(R2000)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<p>\u2024<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<p>\u2024<\/p>\n<\/td>\n<td>\n<p>Name <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>R2002<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Car plate No.<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Tel. No. <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>(R2001)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\" rowspan=\"2\">\n<p>(V=396)Resident 100 <\/p>\n<\/td>\n<td>\n<p>Tel. No. <\/p>\n<\/td>\n<td colspan=\"2\" rowspan=\"2\">\n<p>R2003<\/p>\n<\/td>\n<td colspan=\"2\" rowspan=\"2\">\n<p>Parking No.<\/p>\n<\/td>\n<td colspan=\"4\">\n<p>Car plate No. (R2002)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Car plate No.<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>Parking No. <\/p>\n<\/td>\n<td>\n<p>(R2003)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"4\">\n<p>Rnnn<\/p>\n<\/td>\n<td colspan=\"9\">\n<p>Parking No. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"13\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>Description  Suppose that there are 100 resident parking spaces available in a parking management system for <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>community residents. Each resident has a set of basic information including name, telephone number, number plate and parking number, that occupy four consecutive PLC registers as shown in the above diagram. A total of 400 registers (R100\uff5eR499) are occupied. Each resident is given a card with a unique card number (the number is 0 for resident 1, 4 for resident 2 etc.. ) for the sensing pass of the main entrance and parking lot. The card number will be sensed by the PLC and stored into the pointer register \u201cV\u201d. The attendant\u2019s monitor (LCD or CRT) will only display the data grasped by R2001\uff5eR2003 in the PLC. For example, the card of residence 2 with the card number 4 is sensed, then the register V=4 and the PLC will immediately move the data in R104\uff5eR107 to the temporary display storage area (R2000\uff5eR2003). Hence, the attendant\u2019s monitor can display the data of residence 2 as soon as its card is sensed.<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>\u2022Warning<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1. Although using pointer register for indirect addressing application is powerful and flexible, but changing the V and Z values freely and carelessly may cause great damages with erroneous writing to the normal data areas. The user should take special caution during operation. <\/p>\n<p>2. In the data register range that can be used for indirect addressing application (R0\uff5eR8071), the 328 registers R3840\uff5eR4167 (i.e. IR, OR and SR) are important registers reserved for system or I\/O usage. Writing at-will to these registers may cause system or I\/O errors and may result in a major disaster. Due to the fact that users may not easily detect or control the flexible register address changes made by the V and Z values, FBs-PLC will automatically check if the destination address is in the R3840\uff5eR4067 range. If it is, the write operation will not be executed and the M1969 flag \u201cIllegal write of Indirect addressing\u201d will be set as 1. In case it is necessary to write to the registers R3840\uff5eR4067, please use the direct addressing. <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>5.3Numbering System <\/p>\n<h4>5.3.1Binary Code and Related Terminologies<\/h4>\n<p>Binary is the basic numbering system of digital computer. Since the PLC operates with discrete ON\/OFF values, it is natural to use binary codes. The following terminologies should be fully understood before go to further topic of numbering system. <\/p>\n<p>\u25cfBit: (Abbreviated as B, such as B0, B1, and so on) It is the most basic unit of binary value. The status of bit is either \t\u201c1\u201d or \u201c0\u201d. <\/p>\n<p>\u25cfNibble: (Abbreviated as NB, such as NB0, NB1, and so on\uff09It is formed by four consecutive bits (e.g. B3\uff5eB0) and \tcan be used to represent a decimal number 0\uff5e9 or a hexadecimal number 0\uff5eF. <\/p>\n<p>\u25cfByte: (Abbreviated as BY, such as BY0, BY1, and so on) It is formed by two consecutive nibbles (or 8 bits, such as \tB7\uff5eB0) and can be used to represent a 2-digit hexadecimal number 00\uff5eFF. <\/p>\n<p>\u25cfWord: (Abbreviated as W, such as W0, W1, and so on) It is formed by two consecutive bytes (or 16 bits, such as B15\t\uff5eB0) and can be used to represent a 4-digit hexadecimal number 0000\uff5eFFFF. <\/p>\n<p>\u25cfDouble Word: (Abbreviated as DW, such as DW0, DW1, and so on) It is formed by two consecutive words (or 32 bits, \tsuch as B31\uff5eB0) and can be used to represent an 8-digit hexadecimal number 00000000\uff5eFFFFFFFF. <\/p>\n<p>DW \t\u2190Double Word<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-020.png\" \/><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"2\">\n<p>W1 <\/p>\n<\/td>\n<td colspan=\"4\">\n<p>W0 <\/p>\n<\/td>\n<td colspan=\"4\">\n<p>\u2190Word <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>BY3 <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>BY2 <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>BY1 <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>BY0 <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>\u2190Byte <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>NB7 <\/p>\n<\/td>\n<td>\n<p>NB6 <\/p>\n<\/td>\n<td>\n<p>NB5 <\/p>\n<\/td>\n<td>\n<p>NB4 <\/p>\n<\/td>\n<td>\n<p>NB3 <\/p>\n<\/td>\n<td>\n<p>NB2 <\/p>\n<\/td>\n<td>\n<p>NB1 <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>NB0 <\/p>\n<\/td>\n<td>\n<p>\u2190Nibble <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"10\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\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><\/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><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>B31 B30 B29 B28 B27 B26 B25 B24 B23 B22 B21 B20 B19 B18 B17B16 B15B14B13 B12B11B10B9B8B7B6B5B4 B3 B2 B1 B0 \u2190Bit <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u25cfFloating Point Number: It is also formed by two consecutive words. The Floating Point Number can expressed the \tmaximum range is \u00b1(1.8*10-38\uff5e3.4*1038). For the details, Please refer to section 5.3.6 for explanation. <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-021.png\" \/><\/p>\n<h4>5.3.2 The Coding of Numeric Numbers for FBs-PLC<\/h4>\n<p>FBs-PLC use the binary numbering system for its internal operations that is the data of external BCD inputs must be converted to binary number before the PLC can process. As we know the binary code is very difficult to read and input to the PLC for human, therefore FP-08 and WinProladder use the decimal unit or hexadecimal unit to input or to display the data. But in reality, all the operations taking place in the PLC are performed with binary code. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Remark: If you input or display the data without going through the FP-08 or WinProladder (For instance, input data into or take out data from PLC through the I\/O terminals using thumb wheel switch or seven segment display), then you have to use the Ladder program to perform the Decimal to Binary conversion. This enables you to input and display data without using the FP-08 and WinProladder. Please refer to FUN20(BIN\u2192BCD) and FUN21(BCD\u2192BIN). <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h4>5.3.3 Range of Numeric Value <\/h4>\n<p>As we have mentioned before that FBs-PLC uses binary numbers for its internal operations. 16-bit,32-bit and Floating Point Number are three different numeric data of FBs-PLC. The ranges of the three numeric values are shown below. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>16-bit <\/p>\n<\/td>\n<td>\n<p>\u221232768\uff5e32767 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>32-bit <\/p>\n<\/td>\n<td>\n<p>\u22122147483648\uff5e2147483647 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Floating point number<\/p>\n<\/td>\n<td>\n<p>\u00b1(1.8*10-38\uff5e3.4*1038) <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>5.3.4Representation of Numeric Value(Beginners can skip this section) <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>The representation and specification of 16-bit and 32-bit numeric values are provided below to enable the user to further understand the numeric value operation for more complicated applications. <\/p>\n<p>The most significant bits MSB of 16-bits and 32-bits (B15 for 16-bit and B31 for 32-bit) are used to identify positive and negative numbers (0: positive and 1: negative). The remaining bits (B14~B0 or B30~B0) represent the magnitude of the number. The following example uses 16-bit for further explanations. Please note that everything also applies to 32-bit numbers and the only difference is the length. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"2\">\n<p>0: Positive Number <\/p>\n<\/td>\n<td>\n<p>16384 <\/p>\n<\/td>\n<td>\n<p>8192 <\/p>\n<\/td>\n<td>\n<p>4096 <\/p>\n<\/td>\n<td>\n<p>2048 <\/p>\n<\/td>\n<td>\n<p>1024 <\/p>\n<\/td>\n<td>\n<p>512 <\/p>\n<\/td>\n<td>\n<p>256 <\/p>\n<\/td>\n<td>\n<p>128 <\/p>\n<\/td>\n<td>\n<p>64 <\/p>\n<\/td>\n<td>\n<p>32 <\/p>\n<\/td>\n<td>\n<p>16 <\/p>\n<\/td>\n<td>\n<p>8 <\/p>\n<\/td>\n<td>\n<p>4 <\/p>\n<\/td>\n<td>\n<p>2 <\/p>\n<\/td>\n<td>\n<p>1 <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>3039H <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>12345 <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u00d6<\/p>\n<\/td>\n<td colspan=\"15\" rowspan=\"2\">\n<p>0 0 1 1000000111001\u00d6<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>(Hexadecimal) <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>(Decimal) <\/p>\n<\/td>\n<td>\n<p>B15<\/p>\n<\/td>\n<td colspan=\"14\">\n<p>B0<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>8192+4096+32+16+8+1=12345 <\/p>\n<p>In the above example, regardless of its size (16-bit or 32-bit), and starting with the least significant bit LSB (B0). B0 is 1, B1 is 2, B2 is 4, B3 is 8, and so on. The number represented by the neighboring left bit will double its value (1, 2, 4, 8, 16, and so on) and the value is the sum of the numbers represented by the bits that are equal to 1. <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-022.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-023.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-024.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-025.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-026.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-027.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-028.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-029.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-030.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-031.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-032.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-033.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-034.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-035.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-036.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-037.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-038.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-039.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-040.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-041.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-042.png\" \/><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>5.3.5 Representation of Negative Number (Beginners should skip this section) <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>As prior discussion, when the MSB is 1, the number will be a negative number. The FBs-PLC negative numbers are represented by 2\u2019S Complement, i.e. to invert all the bits (B15\uff5eB0 or B31\uff5eB0) of its equivalent positive number (The so-called 1\u2019S Complement is to change the bits equal 1 to 0 and the bits equal 0 to 1) then add 1. In the above example, the positive number is 12345. The calculation of its 2\u2019S Complement (i.e. \u201312345) is described below: <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>12345 <\/p>\n<\/td>\n<td>\n<p>\u00d60 0 11000000111001\u00d6<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>3039H <\/p>\n<p>CFC6H <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Complement \u00d61 1 00111111000110\u00d6<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\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><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>1&#8217;S <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>of 12345 <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p><strong>+ <\/strong><\/p>\n<\/td>\n<td>\n<p><strong>1 <\/strong><\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>2&#8217;S Complement \u00d61 1 00111111000111\u00d6<\/p>\n<\/td>\n<td>\n<p>CFC7H <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>of 12345 <br \/>(\u221212345) <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>5.3.6 Representation of Floating Point Number (Beginners should skip this section) <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>The format of floating point number of FATEK-PLC follows the IEEE-754 standard, which use a double word for storage and can be expressed as follow: <\/p>\n<p>floating point number = sign + Exponent + Mantissa <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"2\">\n<p>Sign<\/p>\n<\/td>\n<td>\n<p>Exponent<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>23<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Mantissa<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>b<\/p>\n<\/td>\n<td>\n<p>31<\/p>\n<\/td>\n<td>\n<p>b     \uff5e    b<\/p>\n<\/td>\n<td>\n<p>b    \uff5e  b<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>1 bit<\/p>\n<\/td>\n<td>\n<p>8 bits<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>23 bits<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>32 bits<\/p>\n<p>\u25b2 If the sign bit is 0 the number is positive, if the sign bit is 1 the number is negative. <\/p>\n<p>\u25b2 The exponent is denoted as 8-bit excess 127. <\/p>\n<p>\u25b2 The mantissa is 23-bit with radix 2. A normalized mantissa always starts with a bit 1, followed by the radix point, followed by the rest of the mantissa. The leading bit 1, which is always present in a normalized mantissa, is implicit and is not represented. <\/p>\n<p>\u25cf The Conversion rule of Integer to floating is : <\/p>\n<p>N = ( -1) S * 2 (E -127) * ( 1.M ) 0 &lt; E &lt; 255<\/p>\n<p>Code( 1 ) = <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-043.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-044.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-045.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-046.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-047.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-048.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-049.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-050.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-051.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-052.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-053.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-054.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-055.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-056.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-057.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-058.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-059.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-060.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-061.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-062.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-063.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-064.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-065.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-066.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-067.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-068.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-069.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-070.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-071.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-072.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-073.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-074.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-075.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-076.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-077.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-078.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-079.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-080.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-081.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-082.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-083.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-084.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-085.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-086.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-087.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-088.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-089.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-090.png\" \/><\/p>\n<p>The sign is represented by 0, the exponent&#8217;s code in excess 127 is 126 &#8211; 127 = 01111110, and the significant bit is 1, resulting in the mantissa being all O&#8217;s. The simple precision IEEE 754 representation of 0.5, is thus : <\/p>\n<p>Code( 0.5 ) = <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p> = 3F000000H <\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-091.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-092.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p> (3). -500.125 = ( -1 ) 1 * 2 ( 10000111 ) * ( 1. 11110100001000000000000) <br \/>The sign is represented by 1, the exponent&#8217;s code in excess 127 is 135 &#8211; 127 = 10000111, and the significant bit is 1, resulting in the mantissa is 11110100001000000000000. The simple precision IEEE 754 representation of -500.125, is thus : <\/p>\n<p>Code( -500.125 ) = <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p> = C3FA1000H <\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-093.png\" \/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>5.4 Overflow and Underflow of Increment (+1) or Decrement (-1) (Beginners should skip this section)<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>The maximum positive value that can be represented by 16-bit and 32-bit operands are 32767 and 2147483647, respectively. While the minimum negative values that can be represented by 16-bit and 32-bit operands are \u201332768 and \u20132147483648, respectively. When increase or decrease an operand (e.g. when Up\/Down Count of a counter or the register value is +1 or \u22121), and the result exceeds the value of the positive limit of the operand, then \u201cOverflow\u201d (OVF) occurs. This will cause the value to cycle to its negative limit (e.g. add 1 to the 16-bit positive limit 32767 will change it to \u201332768). If the result is smaller than the negative limit of the operand, then \u201cUnderflow\u201d (UDF) occurs. This will cause the value to cycle to its positive limit (e.g. deducting 1 from the negative limit \u201332768 will change it to 32767) as shown in the table below. The flag output of overflow or underflow exists in the FO of FBs-PLC and can be used in cascaded instructions to obtain over 16-bit or 32-bit operation results. <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-094.png\" \/><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>\t Increase (Decrease)\t\t Result Overflow\/ <br \/>Underflow <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>16-bit Operand <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>32-bit Operand <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"6\">\n<p>Increase <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>\u221232767 <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>\u22122147483646 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u221232768 <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>\u22122147483647 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>OVF=1 <\/p>\n<\/td>\n<td>\n<p>32767 <\/p>\n<\/td>\n<td>\n<p>OVF=1 <\/p>\n<\/td>\n<td>\n<p>\u22122147483648 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>32766 <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>2147483647 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>32765 <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>2147483646 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u221232767 <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>\u22122147483647 <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"4\">\n<p>Decrease <\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>UDF=1 <\/p>\n<\/td>\n<td>\n<p>\u221232768 <\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>UDF=1 <\/p>\n<\/td>\n<td>\n<p>\u22122147483648 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>32767 <\/p>\n<\/td>\n<td>\n<p>2147483647 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>32766 <\/p>\n<\/td>\n<td>\n<p>2147483646 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>32765 <\/p>\n<\/td>\n<td>\n<p>2147483645 <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>5.5 Carry and Borrow in Addition\/Subtraction<\/h3>\n<p>Overflow\/Underflow takes place when the operation of increment\/decrement causes the value of the operand to exceed the positive\/negative limit that can be represented in the PLC, consequently a flag of overflow\/underflow is introduced. Carry\/Borrow flag is different from overflow\/underflow. At first, there must be two operands making addition (subtraction) where a sum (difference) and a flag of carry\/borrow will be obtained. Since the number of bits of the numbers to be added (subtracted), to add (subtract) and of sum (difference) are the same (either 16-bit or 32-bit), the result of addition (subtraction) may cause the value of sum (difference) to exceed 16-bit or 32-bit. Therefore, it is necessary to use carry\/borrow flag to be in coordination with the sum (difference) operand to represent the actual value. The carry flag is set when the addition (subtraction) result exceeds the positive limit (32767 or 2147483647) of the sum (difference) operand. The borrow flag is set when addition (subtraction) result exceeds the negative limit (\u221232768 or \u22122147483648) of the sum (difference) operand. Hence, the actual result after addition (subtraction) is equal to the carry\/borrow plus the value of the sum (difference) operand. The FO of FBs-PLC addition\/subtraction instruction has both carry and borrow flag outputs for obtaining the actual result. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"5\">\n<p>+(\u2212) <\/p>\n<\/td>\n<td rowspan=\"5\"><\/td>\n<td>\n<p>MSB <\/p>\n<\/td>\n<td>\n<p>LSB<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>To Be Added (Subtracted) Operand<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u2193<\/p>\n<\/td>\n<td>\n<p>\u2193<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\" rowspan=\"2\">\n<p>16-bit\uff0f32-bit <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>Addition (Subtraction) Operand <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>16-bit\uff0f32-bit <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1-bit <\/p>\n<\/td>\n<td>\n<p>Carry\/Borrow <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>16-bit or 32-bit <\/p>\n<\/td>\n<td>\n<p>Sum (Difference) Operand <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-095.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-096.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-097.png\" \/><\/p>\n<p>While all FBs-PLC numerical operations use 2\u2019S Complement, the representation of the negative value of the sum (difference) obtained from addition (subtraction) is different from the usual negative number representation. When the operation result is a negative value, 0 can never appear in the MSB of the sum (difference) operand. The carry flag represents the positive value 32768 (2147483648) and the borrow flag represents the negative value \u221232768 (\u22122147483648). <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-098.png\" \/><\/p>\n<\/td>\n<td>\n<p>Negative Value <\/p>\n<\/td>\n<td>\n<p>Positive Value <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-099.png\" \/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>(MSB=1) <\/p>\n<\/td>\n<td>\n<p>(MSB=0) <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>0 Flag <br \/>=1 <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"2\">\n<p>xxx\uff0c\u22122\uff0c\u22121\uff0c\u221232768\uff0c<\/p>\n<\/td>\n<td colspan=\"7\">\n<p>\uff0c\u22122\uff0c\u22121\uff0c0\uff0c1\uff0c2\uff0c<\/p>\n<\/td>\n<td rowspan=\"7\">\n<p>0<\/p>\n<\/td>\n<td rowspan=\"7\">\n<p>0<\/p>\n<\/td>\n<td rowspan=\"7\">\n<p>0<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>LSB<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>\uff0c32767\uff0c0\uff0c1\uff0cxxx<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>(\u22122147483648) <\/p>\n<\/td>\n<td colspan=\"7\" rowspan=\"3\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-100.png\" \/><\/p>\n<p>x<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>(2147483647) <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>Borrow Flag=1 <\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Carry Flag=1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-101.png\" \/><\/p>\n<p>x<\/p>\n<\/td>\n<td>\n<p>MSB <\/p>\n<\/td>\n<td rowspan=\"5\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-102.png\" \/><\/p>\n<p>x<\/p>\n<p>x<\/p>\n<p>32769 <\/p>\n<p>32768 <\/p>\n<\/td>\n<td rowspan=\"5\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-103.png\" \/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>x<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u2193<\/p>\n<\/td>\n<td colspan=\"7\" rowspan=\"2\">\n<p>x<\/p>\n<\/td>\n<td>\n<p>\u2193<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>C=1B=0Z=0 <\/p>\n<\/td>\n<td>\n<p>0 0 0 0 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<tr>\n<td>\n<p>C=1B=0Z=0 <\/p>\n<\/td>\n<td>\n<p>0 0 0 0 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<tr>\n<td>\n<p>C=0B=0Z=0 <\/p>\n<\/td>\n<td>\n<p>0 1 1 1 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 colspan=\"2\">\n<p>32767 <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>C=0B=0Z=0 <\/p>\n<\/td>\n<td>\n<p>0 1 1 1 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 rowspan=\"3\">\n<p>x<\/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>32766 <\/p>\n<\/td>\n<td rowspan=\"8\"><\/td>\n<\/tr>\n<tr>\n<td rowspan=\"4\">\n<p>C=0B=0Z=0 <\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>0 1 1 1 1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>0<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td>\n<p>32765 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>x<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>x<\/p>\n<\/td>\n<td>\n<p>x<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>x<\/p>\n<\/td>\n<td>\n<p>x<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\"><\/td>\n<td rowspan=\"3\"><\/td>\n<td rowspan=\"3\"><\/td>\n<td rowspan=\"3\"><\/td>\n<td rowspan=\"3\"><\/td>\n<td>\n<p>x<\/p>\n<\/td>\n<td rowspan=\"3\"><\/td>\n<td rowspan=\"3\"><\/td>\n<td rowspan=\"3\"><\/td>\n<td rowspan=\"3\"><\/td>\n<td rowspan=\"3\"><\/td>\n<td rowspan=\"3\"><\/td>\n<td rowspan=\"3\"><\/td>\n<td rowspan=\"3\"><\/td>\n<td>\n<p>x<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>x<\/p>\n<\/td>\n<td>\n<p>x<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<\/tr>\n<tr>\n<td>\n<p>C=0B=0Z=0 <\/p>\n<\/td>\n<td>\n<p>0 0 0 0 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 rowspan=\"6\">\n<p>x<\/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>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>2 <\/p>\n<\/td>\n<td rowspan=\"11\"><\/td>\n<\/tr>\n<tr>\n<td>\n<p>C=0B=0Z=0 <\/p>\n<\/td>\n<td>\n<p>0 0 0 0 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>1<\/p>\n<\/td>\n<td>\n<p>1 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>C=0B=0Z=1 <\/p>\n<\/td>\n<td>\n<p>0 0 0 0 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<tr>\n<td>\n<p>C=0B=0Z=0 <\/p>\n<\/td>\n<td>\n<p>1 1 1 1 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>\u22121 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p>C=0B=0Z=0 <\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>1 1 1 1 1<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>0<\/p>\n<\/td>\n<td>\n<p>\u22122 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>x<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>x<\/p>\n<\/td>\n<td>\n<p>x<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"4\">\n<p>C=0B=0Z=0 <\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1 0 0 0 0<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>0<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>0<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>0<\/p>\n<\/td>\n<td>\n<p>x<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>0<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>0<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>0<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>0<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>0<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>0<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>0<\/p>\n<\/td>\n<td>\n<p>x<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>x<\/p>\n<\/td>\n<td>\n<p>x<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>x<\/p>\n<\/td>\n<td>\n<p>x<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>32766 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td rowspan=\"6\">\n<p>x<\/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 rowspan=\"8\">\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-104.png\" \/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>C=0B=0Z=0 <\/p>\n<\/td>\n<td>\n<p>1 0 0 0 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>1<\/p>\n<\/td>\n<td>\n<p>\u221232767 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>C=0B=0Z=0 <\/p>\n<\/td>\n<td>\n<p>1 0 0 0 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>\u221232768 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>C=0B=1Z=0 <\/p>\n<\/td>\n<td>\n<p>1 1 1 1 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>\u221232769 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>C=0B=1Z=0 <\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1 1 1 1 1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>1<\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>0<\/p>\n<\/td>\n<td>\n<p>\u221232770 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>x<\/p>\n<\/td>\n<td>\n<p>x<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>x<\/p>\n<\/td>\n<td>\n<p>x<\/p>\n<\/td>\n<td>\n<p>x<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-105.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-106.png\" \/><\/p>\n<\/td>\n<td>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-ins-en-005\/fbs-ins-en-005-107.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>C = CarryB = BorrowZ = Zero <\/p>\n","protected":false},"excerpt":{"rendered":"<p>5.1The Format of Function Instructions In this chapter  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-3432","post","type-post","status-publish","format-standard","hentry","category-en-fbs-ins"],"_links":{"self":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts\/3432","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=3432"}],"version-history":[{"count":0,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts\/3432\/revisions"}],"wp:attachment":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/media?parent=3432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/categories?post=3432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/tags?post=3432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}