Siemens SIMATIC S7 System Manual page 486

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Libraries
9.3 Modbus RTU library
The CPU reads and writes the bit data
(addresses 0xxxx and 1xxxx) areas as
packed bytes; that is, each byte consists
of 8 bits of data. The least significant bit of
the first data byte is the addressed bit
number (the parameter Addr). If you in-
tend to write only a single bit then you
must set the bit in the least significant bit
(Vx.0) of the byte pointed to by DataPtr.
For bit data addresses that do not start on
a byte boundary, you must set the bit cor-
responding to the starting address in the
least significant bit of the byte. See the
example of the packed byte format for 3
bits starting at Modbus address 10004.
When writing to the discrete output data type (coils), you must place the bits in the correct bit
positions within the packed byte before passing the data to the MBUS_MSG / MB_MSG2
instruction by means of the DataPtr.
Outputs
The Done output is FALSE after the program has sent a request and is receiving a response.
The Done output is TRUE when the response is complete or when the MBUS_MSG /
MB_MSG2 instruction aborts because of an error.
The Error output (Page 487) is valid only when the Done output is TRUE.
486
Format for Packed Bytes (Discrete Input Ad-
dresses)
Format for Packed Bytes (Discrete input starting
at address 10004)
System Manual, V2.3, 07/2017, A5E03822230-AF
S7-200 SMART

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents