Rockwell Automation 1770-KF2 Data Highway or Highway Plus Interface Module User Manual User Manual

Page 96

Advertising
background image

Message Packet Formats

Chapter 5

5-17

Protected Bit Write

This command sets or resets individual bits within limited areas of the PC
data table memory. Its access is limited by memory access rungs in the
communication zone of the PC’s ladder diagram program.

The data field in this packet consists of 4-byte blocks, each of which
contains a 16-bit address field, a set mask, and a reset mask. Use the
ADDR field to specify the address of the byte to be modified in the PC
data table memory. Put the low byte (least significant bits) of the PC
address value into the first byte of the ADDR field. Refer to Chapter 6 for
more details on how to specify an address value.

Use the SET mask to specify which bits to set to 1 in the addressed PC
byte. A 1 in a bit position of the SET mask means to set the
corresponding bit in the addressed PC byte to 1; a 0 in a bit position of the
SET mask means to leave the corresponding bit in the PC byte
unchanged.

Use the RESET mask to specify which bits to reset to 0 in the addressed
PC byte. A 1 in a bit position of the RESET mask means to reset the
corresponding bit in the addressed PC byte to 0; a 0 in a bit position of the
reset mask means to leave the corresponding bit in the PC byte
unchanged.

Note that the interface module at the receiving PC station executes this
command by first making a copy of the addressed PC byte. It then sets or
resets the appropriate bits and writes the byte back into PC memory. At
the same time, the PC processor can be changing the states of the original
bits in memory. Because of this, some data bits may unintentionally be
overwritten.

Command Format:

Reply Format:

TNS

STS

CMD

02

SRC

DST

TNS

STS

CMD

42

SRC

DST

ADDR

Up to 60 Masks of This Format

SET

ADDR SET

RESET

RESET

Advertising