IC-Module for EtherNet/IP
31 / 137
Writing 1 byte
This access type is used if 1 byte is written to a memory register of
the module by the Master.
The Master first sends a transmission block with a fixed length of 5
bytes, which have the following content:
Transmission block with fixed length
Command
code
(1 byte)
Address area
(2 bytes)
Data area
(1 byte)
Mask area
(1 byte)
Description
0x01
0x0000-0xFFFF 0x00-0xFF
0x00-0xFF
WRITE_LOW_BYTE
0x02
0x0000-0xFFFF 0x00-0xFF
0x00-0xFF
WRITE_HIGH_BYTE
0x00
0xXXXX
0xXX
0xXX
NO_OPERATION*
Theoretically, you could use all memory register addresses between
0 and 0xFFFF. In practice, however, the write access is limited to
registers that are enabled for this purpose. The byte can be written to
the high or low byte position of the 16-bit wide register by selecting
the associated command code. The mask byte makes it possible to
write single bits to the target register. Thereby, only bits that are set
to "1" in the mask are transferred from the data byte (i.e. these bits
are set to the value as found in the data byte). All other bits are left
unchanged in the register.
During transmission of this first block, the module sends the status of
the previous data transmission. The module first returns the status
for the previous access when sending the next transmission block. If,
however, no further write or read operation should follow the write
access, then the Master must send another transmission block with
the command code 0 ("NO_OPERATION") for retrieving the status,
in which the module returns the status for the last write access
operation.
The status response from the module is structured as follows for all
write access types:
Transmission block with fixed length
Status code
(1 byte)
Error code
(2 bytes)
Not used
(2 bytes)
Description
0x00
0xXXXX
0xXXXX
NO_PREVIOUS_OPERA-
TION
0x01
0x0000
0xXXXX
WRITE_SUCCESS
0x02
ERROR_CODE
1
0xXXXX
WRITE_FAILURE
1 See Table "ErrorCode"
Components