|
Topic: DMD0017 DECODE - Decode to Set Bit |
|
|
|
|
|
The Decode to Set Bit instruction (DECO) will set the bit at the specified Bit Position Value ON, and all of the other bits will be set OFF.
|
|
|
For example, for a Bit Position Value of 12, the Decode to Set Bit instruction would output the following bit string: 0000 0000 0000 0000 0001 0000 0000 0000.
Note: Decode to Set Bit can only operate on Bit Position Values in the range of 0-31 (0-0x1F). If the Bit Position Value is greater than 31, the Output Bit Pattern will be 0 and the $OutOfRange (ST132) will be ON.
|
|
Parameters:Note: Use the F9 key (Element Browser) or Down-Arrow key (Auto-Complete) at any time to see a complete list of the memory locations that are valid in the current field of the instruction.
Bit Position Value - specifies the position value of the bit to turn ON. This can be any constant value in the range of 0-31 (0x0 -0x1F) or any readable numeric location containing a value in that range.
Output Bit Pattern - designates a memory location to store the result. This can be any writable numeric location.
|
|
|
|
|
See Also:
|
|
|
|
|
Related Topics: |
|
|
|
|
Rung Example:
|
|
|
|
|