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
Содержание FM-3
Страница 2: ......
Страница 14: ...xii ...
Страница 16: ...2 FM 3 Programming Module Reference Manual Figure 2 FM 3 Programming Module Features ...
Страница 128: ...114 FM 3 Programming Module Reference Manual ...
Страница 156: ...142 FM 3 Programming Module Reference Manual ...
Страница 196: ...182 FM 3 Programming Module Reference Manual ...
Страница 238: ...224 FM 3 Programming Module Reference Manual ...
Страница 251: ...237 Diagnostics and Troubleshooting Figure 97 Diagnostic Cable DGNE Diagram ...
Страница 262: ...248 FM 3 Programming Module Reference Manual ...
Страница 264: ...250 FM 3 Programming Module Reference Manual AX4 CEN CDRO ...
Страница 265: ...251 Specifications Cable Diagrams ...
Страница 266: ...252 FM 3 Programming Module Reference Manual SNCE XXX Cable SNCDD 001 5 Cable ...
Страница 267: ...253 Specifications SNCO 003 Cable SNCI 003 Cable ...
Страница 268: ...254 FM 3 Programming Module Reference Manual SNCLI 003 Cable ...
Страница 271: ...257 Specifications CDRO XXX Cable 8 9 24 23 38 37 11 12 34 16 14 15 29 4 19 26 40 18 17 31 33 43 44 41 27 ...
Страница 272: ...258 FM 3 Programming Module Reference Manual TIA XXX Cable DDS XXX Cable ...
Страница 274: ...260 FM 3 Programming Module Reference Manual CMDS XXX Cable CMMS XXX Cable ...
Страница 275: ...261 Specifications CFCS XXX Cable ...
Страница 276: ...262 FM 3 Programming Module Reference Manual CFCO XXX Cable ...
Страница 277: ...263 Specifications CFOS XXX Cable ...
Страница 278: ...264 FM 3 Programming Module Reference Manual ...
Страница 286: ...272 FM 3 Programming Module Reference Manual ...
Страница 290: ...276 FM 3 Programming Module Reference Manual ...
Страница 291: ......