
TU RS485/ETH serie
CD Automation srl
22
And (bit)
Executes the logical operation “AND” between two bits.
Executes the logical operation “AND” (bit to bit) between a Register and a Constant (mask) or between two
Registers. The value will be converted to the format selected for the Register of destination. The address of
the source Register and the address of the Register of destination can be the same (modify the format of the
Register). After the execution of the logical operation only the bits set as 1 in the mask will be forced ; the bits
set as 0 won't be modified. In case of a 32 bit source Register or Constant (long) and a 16 bit Register of
destination (integer), the most significant bits will be ignored.
Variables:
Source A
Constant or Internal Register relative to the first operator.
Mask A
Bits of the first operator
Source B
Constant or Internal Register relative to the second operator.
Mask A
Bits of the second operator
Dest
Internal Register wherein the result is written.
Mask Out
Mask applied to the Register of destination.
Or (bit)
Executes the logical operation “OR” between two bits.
Executes the logical operation “OR” (bit to bit) between a Register and a constant (mask) or between two
Registers. The value will be converted to the format selected for the Register of destination. The address of
the source Register and the address of the Register of destination can be the same (modify the format of the
Register). After the execution of the logical operation only the bits set as 1 in the mask will be forced; the bits
set as 0 won't be modified. In case of a 32 bit source Register or constant (long) and a 16 bit Register of
destination (integer), the most significant bits will be ignored.
Variables:
Source A
Constant or Internal Register relative to the first operator.
Mask A
Bits of the first operator
Source B
Constant or Internal Register relative to the second operator.
Mask A
Bits of the second operator
Dest
Internal Register wherein the result is written.
Mask Out
Mask applied to the Register of destination.
Xor (word)
Executes the logical operation “XOR” (Exclusive Or) between two values.
Executes the logical operation “XOR” between a Register and a constant (mask) or between two Registers.
The value will be converted to the format selected for the Register of destination. The address of the source
Register and the address of the Register of destination can be the same (modify the format of the Register).
After the execution of the logical operation only the bits set as 1 in the mask will be forced ; the bits set as 0
won't be modified. In case of a 32 bit source Register or constant (long) and a 16 bit Register of destination
(integer), the most significant bits will be ignored. It is possible to use this function to invert (NOT) one or more
bits of a Register ( in the mask set as 1 the bits to invert, set as 0 the other bits ).
Variables:
Source A
Constant or Internal Register relative to the first operator.
Source B
Constant or Internal Register relative to the second operator.
Mask Out
Mask applied to the result.
Dest
Internal Register wherein the result is written.