Chapter 6 Applied Instructions Symbol S : Source device D : Device where the decoded values are stored n : Number of bits whose values are decoded Explanation 6_ 1. This instruction decodes the values of the lower n bits in the source device specified by S as the values of the lower 2 n bits in D . 2. The instruction decodes the values of the consecutive n bits in the source device specified by S as the values of the lower 2 n bits in D . 3. When the source device specified by S is a timer or counter, the instruction treats the device as a word device. 4. When D is a bit device, n between1 – 8. When n is 8, the instruction decodes the values of the eight bits as the values of the 256 bits.
Please note that the devices in which the decoded values are stored cannot be used repeatedly. 5. When D is a word device, n between 1 – 4. When n is 4, the instruction decodes the values of the four bits as the values of the 16 bits. 6. In general, the DECOP pulse instruction is used. 6-347 API Instruction code Operand Function 1202 DECO P S, D, n Decoding bits Device X Y M S T C HC D FR SM SR E K 16# “$” F S D n BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S D n Pulse instruction 16-bit instruction 32-bit instruction ES3 ES3 -