Configuring an Application www.emersonct.com 51
than having to access them individually. In the
SM-EZMotion module it is possible to access 32 User Bits
in a single parameter. This parameter is named
BitRegister.#.Value. Because some of the 32 User Bits
may be used by the program, and should not be modified
from the network communications, it is possible to "Mask
Off" certain bits. Masking bits prevents them from being
modified in the program when the 32-bit parameter is
written to.
When a User Bit Register (group of 32 User Bits) is written
to, the value is then logic-AND'ed with the mask to
determine the resulting state of each of the 32 individual
bits. If the individual bit value of the 32-bit mask is "1", then
the corresponding bit from the written 32-bit parameter is
passed through, and the resulting value stored in the
specific bit will be the written bit value. If the bit value of the
32-bit mask is "0", then that particular bit is blocked (or
masked), and the resulting bit value does not change,
(Original Value AND NOT 32-Bit Mask) or (Value Written
over Network AND 32-Bit Mask). An example of this is
shown in Figure 84.
Figure 84: Writing to the User Bit Register
The Mask is only used when WRITING to the 32-bit
parameter, BitRegister.#.Value. When reading the 32-bit
value, all bits are read regardless of the mask.
Figure 85: User Bit Read/Write Process
Configuring the User Bit Mask Register
The User Bit Mask is a 32-bit parameter that can be
configured through Power Tools Pro, in the User Program,
or over the communications network. The default value for
the Mask register is 0xFFFFFFFF (HEX), or all bits ON. To
change the Mask value using PowerTools Pro, navigate to
the Mask tab on the User Bits view, see Figure 86.
Figure 86: User Bits View (Mask Tab)
In the User Bits view - Mask Tab, each bit of the Mask can
be set to 0 or 1 individually. ON (or 1) is indicated by a
shaded square, and OFF (or 0) is indicated by an empty
square. Bit 31 is the most significant bit in the word, and bit
0 is the least significant bit. If the bit is shaded, it means
01010101010101010101010101010101
10000001010000001000001000000000
015
Bit #31
01101000011110000111111101010110
11000000010100001101011101010100
Original
Value
Value written
over network
32-bit Mask
Result stored
in each bit
Network
Master
Write
Read
FM-3/4
Written data is AND’ed with the Mask
and then written into 32-bit Value.
Read data is read directly from the
32-bit Value and bypasses the Mask.
Mask
Value
AND