Technical data

Table Of Contents
Generating Block-Related Messages
System Software for S7-300/400 System and Standard Functions - Volume 2/2
24-18
A5E00739858-01
24.7 Sending Archive Data with SFB 37 "AR_SEND"
Description
SFB 37 "AR_SEND" sends archive data to operator interface systems logged on
for this purpose. These systems inform the CPU of the relevant archive number in
the logon message. Depending on the memory available on the CPU and the
address area used, the archive data can be up to 65534 bytes long. The defaults of
the operator interface system you are using must be taken into consideration in the
structure of the archive data.
The sending of the data is activated by a positive edge at control input REQ after
the block has been called. The start address of the archive data is specified by
SD_1, the length of the data field by LEN. Data transfer is asynchronous to the
execution of the user program. Successful completion of the transfer is indicated by
the DONE status parameter having the value 1. A rising edge at control input R
aborts the transfer of data.
Parameter Declaration Data Type Memory Area Description
REQ INPUT BOOL I, Q, M, D, L Control parameter request
R INPUT BOOL I, Q, M, D, L,
constant
Control parameter reset: current job
aborted
ID INPUT WORD I, Q, M, D, L,
constant
Data channel for messages: W#16#EEEE
ID is only evaluated at the first call.
AR_ID INPUT DWORD I, Q, M, D, L,
constant
Archive number (0 not permitted)
AR_ID is only evaluated at the first call.
Following this, each time SFB 37 is called
with the corresponding instance DB, the
archive number from the first call is used.
STEP 7 assigns the message number
automatically to ensure consistency of the
message numbers.
DONE OUTPUT BOOL I, Q, M, D, L DONE status parameter: sending
completed
ERROR OUTPUT BOOL I, Q, M, D, L ERROR status parameter
ERROR=TRUE indicates that an error
has occurred during processing. For
details refer to parameter STATUS.
STATUS OUTPUT WORD I, Q, M, D, L STATUS parameter: Displays error
information
SD_1 IN_OUT ANY I, Q, M, D, T, C Pointer to archive data. The length
specification is not evaluated.
Only the following data types are
permissible: BOOL (not allowed: bit field),
CHAR, WORD, INT, DWORD, DINT,
REAL, DATE, TOD, TIME, S5TIME,
DATE_AND_TIME
The archive data have to have a PLC
specific structure.
Note:
If the ANY pointer accesses a DB, the DB
must always be specified (for example:
P# DB10.DBX5.0 Byte 10).
LEN IN_OUT WORD I, Q, M, D, L Length of the data field to be sent in bytes