69
Setting Up Parameters
User 32-bit Bit Register and User Bit Masking
When using different communications protocols (i.e. DeviceNet, Profibus, Modbus), it is
often desirable to access groups of User Bits in a single parameter, rather than having to
access them individually. In the FM-3 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
below.
Figure 42:
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.
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
0
15
Bit #31
0 1 1 0 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 1 0 1 0 1 1 0
1 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 1 0 1 0 1 1 1 0 1 0 1 0 1 0 0
Original
Value
Value written
over network
32-bit Mask
Result stored
in each bit
Summary of Contents for FM-3
Page 2: ......
Page 14: ...xii ...
Page 16: ...2 FM 3 Programming Module Reference Manual Figure 2 FM 3 Programming Module Features ...
Page 128: ...114 FM 3 Programming Module Reference Manual ...
Page 156: ...142 FM 3 Programming Module Reference Manual ...
Page 196: ...182 FM 3 Programming Module Reference Manual ...
Page 238: ...224 FM 3 Programming Module Reference Manual ...
Page 251: ...237 Diagnostics and Troubleshooting Figure 97 Diagnostic Cable DGNE Diagram ...
Page 262: ...248 FM 3 Programming Module Reference Manual ...
Page 264: ...250 FM 3 Programming Module Reference Manual AX4 CEN CDRO ...
Page 265: ...251 Specifications Cable Diagrams ...
Page 266: ...252 FM 3 Programming Module Reference Manual SNCE XXX Cable SNCDD 001 5 Cable ...
Page 267: ...253 Specifications SNCO 003 Cable SNCI 003 Cable ...
Page 268: ...254 FM 3 Programming Module Reference Manual SNCLI 003 Cable ...
Page 272: ...258 FM 3 Programming Module Reference Manual TIA XXX Cable DDS XXX Cable ...
Page 274: ...260 FM 3 Programming Module Reference Manual CMDS XXX Cable CMMS XXX Cable ...
Page 275: ...261 Specifications CFCS XXX Cable ...
Page 276: ...262 FM 3 Programming Module Reference Manual CFCO XXX Cable ...
Page 277: ...263 Specifications CFOS XXX Cable ...
Page 278: ...264 FM 3 Programming Module Reference Manual ...
Page 286: ...272 FM 3 Programming Module Reference Manual ...
Page 290: ...276 FM 3 Programming Module Reference Manual ...
Page 291: ......