[Instruction] Contents
[Instruction] Contents [Instruction] Contents
• The names and functions of the major operands:Abbreviation Name DescriptionsSDSourceDestinationThe data of source (S) operand are only for reading and reference and will not bechanged with the execution of the instruction. If there are more than one sourceoperands, each operand will be identified by the footnote such as Sa and Sb.The destination (D) operand is used to store the result of operation. The original datawill be changed after operation. Only the coils and registers which are not writeprohibited can be the destination operand.L Length Indicates the data size or the length of the table, usually are constants.NPrNumberPointerA constant most often used as numbers and times. If there are more than oneconstant, each constant will be identified by the footnotes such as Na, Nb, Ns etc..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.(R3840~R3847)CV Current value Used in T and C instruction to store the current value of T or CPV Set value Used in T and C instructions for reference and comparisonTMTableMatrixA combination of a set of consecutive registers forms a table. The basic operationunits are word and double word. If there is more than one table, each table will beidentified by footnotes such as Ta, Tb, Ts and Td etc..A combination of a set of consecutive registers forms a matrix. The basic operationunit is bit. If there is more than one matrix, each matrix will be identified by footnotessuch as Ma, Mb, Ms and Md etc..Besides the major operands mentioned above, there are other operands which are used for certain special purposes suchas the operand Fr for frequency, ST for stack, QU for Queue etc.. Please refer to the instruction descriptions for moredetails.• The types of the operand and their range: The types of operand for the function instructions are discrete, registerand constant.a) Discrete operand :There are total five function instructions that reference the discrete operand, namely SET, RST, DIFU, DIFDand TOGG. Those five instructions can only be used for operations of Y△△△(external output), M△△△△(internal and special) and S△△△(step) relays. The table shown below indicates the operands and ranges ofthe five function instructions.RangeOperandY M SM SY0∣Y255M0∣M1911M1912∣M2001S0∣S999D ○ ○ ○* ○Symbol "O" indicates the D (Destination operand) can use this type ofcoils as operands. The "*" sign above the "O" shown in SM columnindicates that should exclude the write prohibited relays as operands.Please refer to page 2-3 for introduction of the special relays.b) Register operand :The major operand for function instructions is register operand. There are two types of register operands: thenative registers which already is of Words or Double Words data such as R, D, T, C. The other is derivativeregisters (WX, WY, WM, WS) which are formed by discrete bits. The types of registers that can be used asinstruction operands and their ranges are all listed in the following table:5-4
RangeOperandWX WY WM WS TMR CTR HR IR OR SR ROR DR K XRWX0∣WX240WY0∣WY240WM0∣WM1896WS0∣WS984T0∣T255C0∣C255R0∣R3839R3840∣R3903R3904∣R3967R3968∣R4167R5000∣R8071D0∣D409516/32-bit+/- numberV、ZP0~P9S ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○* ○ ○ ○D ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ ○•The "○" symbol in the table indicates can apply this kind of data as operand. The "○*" symbol indicates can apply thiskind of data except the write prohibited registers as operand. To learn more about write prohibited registers please referto page 2-8 for introduction of the special register.When R5000~R8071 are not set to be read only registers, can used as normal registers (read, and write)Remark 1: The registers with a prefix W, such as WX, WY, WM and WS are formed by 16 bits. For example, WX0means the register is formed by X0(bit 0)~X15(bit 15). WY144 means the register is formed by Y144(bit0)~Y159(bit 15). Please note that the discrete number must be the multiple of 8 such as 0, 8, 16, 24....Remark 2: The last register (Word) in a table can not be represented as a 32-bit operand in the function because 2Words are required for a 32-bit operand.Remark 3: TMR(T0~T255)and CTR(C0~C255)are the registers of timers and counters respectively. Althoughthey can be used as general registers, they also complicate the systems and make debugging moredifficult. Therefore you should avoid writing anything into the TMR or CTR registers.Remark 4: T0~T255 and C0~C199 are 16-bit register. But C200~C255 are 32-bit register, therefore can’t beused as 16-bit operands.Remark 5: Apart from being directly appointed by register’s number (address) as the foregoing discussions, theregister’s operand in the range of R0~R8071 can be combined with pointer register V、Z or P0~P9 tomake indirect addressing. Please refer to the example in the next section (Section 5.2) for thedescription of using pointer register (XR) to make indirect addressing.c) Constant operands :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. Therange of 16-bit and 32-bit constants are listed in the table shown below.ClassificationRange16-bit signed number -32768~3276716-bit un-signed number0~3276732-bit signed number -2147483648~214748364732-bit un-signed number16/32-bit signed number16/32-bit un-signed number0~2147483647-32768~32767 or-2147483648~21474836470~32767 or0~2147483647It is possible that the length and size of a specific operand, such as L, bit size, N etc.., are different, and thedifferences are all directly marked at the operand column. Please refer to the explanations of functioninstructions.5-5
- Page 8 and 9: Input processing (Reading thestatus
- Page 10 and 11: We must energize the coil of relay
- Page 12 and 13: Network: Network is a circuit repre
- Page 15 and 16: 1.5 The De-Composition of a Network
- Page 18 and 19: • When a single element or a seri
- Page 20 and 21: MEMO
- Page 22 and 23: 2.2 Digital and Register Allocation
- Page 24 and 25: Relay No. Function Description3. Pu
- Page 26 and 27: Relay No. Function DescriptionM1965
- Page 28 and 29: 2.4 Special Registers DetailsRegist
- Page 30 and 31: Register No. Function DescriptionR4
- Page 32 and 33: Register No. Function DescriptionR4
- Page 34 and 35: Register No. Function DescriptionR4
- Page 36 and 37: Register No. Function DescriptionR4
- Page 38 and 39: Register No. Function DescriptionD4
- Page 40 and 41: Instruction Operand Symbol Function
- Page 42 and 43: FUNNo.NameOperandDerivativeInstruct
- Page 44 and 45: FUNNo.NameOperandDerivativeinstruct
- Page 46 and 47: • Ramp Function InstructionsFUNNo
- Page 48 and 49: MEMO
- Page 50 and 51: ※For the relays marked with a ‘
- Page 52 and 53: FUN7 is the UDCTR function. While r
- Page 54 and 55: X0X1Node ANode BIncerseInversediffe
- Page 56 and 57: All input controls of the function
- Page 60 and 61: 5.1.4 Functions Output (FO)The “F
- Page 62 and 63: Indirect addressing program example
- Page 64 and 65: 5.3.2 The Coding of Numeric Numbers
- Page 66 and 67: (2). 0.5 = (-1) 0 * 2 ( 01111110 )
- Page 68 and 69: While all FBs-PLC numerical operati
- Page 70 and 71: Basic Function InstructionT TIMER T
- Page 72 and 73: Basic Function InstructionT TIMER T
- Page 74 and 75: Basic Function InstructionCCOUNTER(
- Page 76 and 77: Basic Function InstructionSET D PSy
- Page 78 and 79: Basic Function InstructionRST D PSy
- Page 80 and 81: Basic Function InstructionFUN 0MCSy
- Page 82 and 83: Basic Function InstructionFUN 1MCES
- Page 84 and 85: Basic Function InstructionFUN 2SKPS
- Page 86 and 87: Basic Function InstructionFUN 4DIFU
- Page 88 and 89: Basic Function InstructionFUN 6 D P
- Page 90 and 91: Basic Function InstructionFUN 7 DUD
- Page 92 and 93: Basic Function InstructionFUN 9 D P
- Page 94 and 95: Basic Function InstructionFUN 11 D
- Page 96 and 97: Basic Function InstructionFUN 13 D
- Page 98 and 99: Basic Function InstructionFUN 14 D
- Page 100 and 101: Basic Function InstructionFUN 15 D
- Page 102 and 103: Basic Function InstructionFUN 17 D
- Page 104 and 105: Basic Function InstructionFUN 19 D
- Page 106 and 107: Basic Function InstructionFUN 21 D
RangeOperandWX WY WM WS TMR CTR HR IR OR SR ROR DR K XRWX0∣WX240WY0∣WY240WM0∣WM1896WS0∣WS984T0∣T255C0∣C255R0∣R3839R3840∣R3903R3904∣R3967R3968∣R4167R5000∣R8071D0∣D409516/32-bit+/- numberV、ZP0~P9S ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○* ○ ○ ○D ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ ○•The "○" symbol in the table indicates can apply this kind of data as operand. The "○*" symbol indicates can apply thiskind of data except the write prohibited registers as operand. To learn more about write prohibited registers please referto page 2-8 for introduction of the special register.When R5000~R8071 are not set to be read only registers, can used as normal registers (read, and write)Remark 1: The registers with a prefix W, such as WX, WY, WM and WS are formed by 16 bits. For example, WX0means the register is formed by X0(bit 0)~X15(bit 15). WY144 means the register is formed by Y144(bit0)~Y159(bit 15). Please note that the discrete number must be the multiple of 8 such as 0, 8, 16, 24....Remark 2: The last register (Word) in a table can not be represented as a 32-bit operand in the function because 2Words are required for a 32-bit operand.Remark 3: TMR(T0~T255)and CTR(C0~C255)are the registers of timers and counters respectively. Althoughthey can be used as general registers, they also complicate the systems and make debugging moredifficult. Therefore you should avoid writing anything into the TMR or CTR registers.Remark 4: T0~T255 and C0~C199 are 16-bit register. But C200~C255 are 32-bit register, therefore can’t beused as 16-bit operands.Remark 5: Apart from being directly appointed by register’s number (address) as the foregoing discussions, theregister’s operand in the range of R0~R8071 can be combined with pointer register V、Z or P0~P9 tomake indirect addressing. Please refer to the example in the next section (Section 5.2) for thedescription of using pointer register (XR) to make indirect addressing.c) Constant operands :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. Therange of 16-bit and 32-bit constants are listed in the table shown below.ClassificationRange16-bit signed number -32768~3276716-bit un-signed number0~3276732-bit signed number -2147483648~214748364732-bit un-signed number16/32-bit signed number16/32-bit un-signed number0~2147483647-32768~32767 or-2147483648~21474836470~32767 or0~2147483647It is possible that the length and size of a specific operand, such as L, bit size, N etc.., are different, and thedifferences are all directly marked at the operand column. Please refer to the explanations of functioninstructions.5-5