Technical data

Table Of Contents
S7 Communication
System Software for S7-300/400 System and Standard Functions - Volume 2/2
A5E00739858-01
21-45
21.15 Receiving the Status Change of a Remote Device with
SFB 23 "USTATUS"
Description
SFB 23 "USTATUS" receives the device status change of a remote communication
partner. The partner sends its status unsolicited when a change occurs if this is
configured in STEP 7.
If the value 1 is applied to the control input EN_R when the CFB is called and there
is a frame from the partner, the status information is entered in the variables PHYS,
LOG and LOCAL the next time the SFB is called. Completion of this job is indicated
by the status parameter NDR having the value 1.
The transfer of the operating status messages must be enabled on the connection
used by USTATUS.
Note
You can only use one instance of SFB 23 per connection.
Parameter Declaration Data Type Memory Area Description
EN_R INPUT BOOL I, Q, M, D, L The enabled to receive control parameter
signalizes that the unit is ready to receive
when the input is set.
ID INPUT WORD I, Q, M, D,
constant
Addressing parameter ID, refer to Common
Parameters of the SFBs/FBs and SFCs/FCs
for S7 Communication
NDR OUTPUT BOOL I, Q, M, D, L NDR status parameter:
0: Job not started or still running
1: Job has been executed error-free
ERROR
STATUS
OUTPUT
OUTPUT
BOOL
WORD
I, Q, M, D, L ERROR and STATUS state parameters,
error display:
ERROR=0 and STATUS has the value:
0000H: neither warning nor error
<> 0000H: Warning, STATUS supplies
detailed information.
ERROR=1
There is an error. STATUS supplies
detailed information on the type of
error.
PHYS IN_OUT ANY I, Q, M, D Physical status (minimum length: one
byte).
Possible values:
10H functional
13H service required
LOG IN_OUT ANY I, Q, M, D Logical status (minimum length: one byte)
Possible value:
00H status change permitted
LOCAL IN_OUT ANY I, Q, M, D Status if the partner device is an S7 CPU
(minimum length: one byte)