Siemens SIMATIC PCS 7 Function Manual page 215

Process control system, advanced process functions apf
Hide thumbs Also See for SIMATIC PCS 7:
Table of Contents

Advertisement

The value "REC_ID" must be unique for each archive for its entire life cycle.
In "Insert" mode, a new unique data record number REC_ID (REC_ID_MAX + 1) is
automatically generated on the OS. This number is returned to the requesting block at the end
of the write job by "FB_UA_WM" feedback messages. The data record number "REC_ID" is
output at the "QREC_ID" block output for further processing. This "REC_ID" is needed for
deleting and updating the archive data record.
The newly generated "REC_ID" is written to the value in the "REC_ID_MAX" column of the
"FB_ARCHGROUP" archive once the new archive data record has been successfully created.
Updating data
Upon a request by a positive edge at the "WREC_UPD" input, the values of the relevant block
inputs for archiving are written to the user archive on the basis of the archive data record ID
(REC_ID), archive name, archive number, etc. The values are simultaneously copied to the
corresponding block outputs to save the written values on the clipboard until the next write
operation.
Deleting data
The options for deleting data are as follows:
● With MES and "MES_READ = 1"
Following a request by a positive edge at the "WREC_DEL" input, the system uses the
archive data record ID (REC_ID), archive name, archive number, etc. to set the
"REC_PREPARED := 2" column in the relevant archive data record of the user archive and
thus select it for an MES. The values of the corresponding outputs at the function block are
deleted.
If the MES evaluates this information, it sets the value "REC_READ := 1". A global time-
triggered C function (FB_DeleteMarkedRecordsTrigger.pas) in WinCC checks all data
records in the user archive with the filter condition "(REC_EXPORTED = 1) AND
(REC_PREPARED = 2) AND (REC_READ = 1)" and deletes these records.
● Without MES and "MES_READ = 0"
Following a request by a positive edge at the "WREC_DEL" input, the system uses the
archive data record ID (REC_ID), archive name, archive number, etc. to delete the
corresponding archive data record from the user archive. The values of the corresponding
outputs at the function block are deleted.
Duration of request
The request inputs WREC_INS, WREC_UPD and WREC_DEL must remain set until the
request has been processed in full, which means until the feedback message WR_OK for
successful processing has been set or QGR_ERR if an error occurs. Resetting the input sooner
aborts the request.
Repetition of jobs
The "COUNT" input value defines how often a job is to be repeated if an error occurs (COUNT
= 0 -> no repetition). Until the specified number of job repetitions has been reached, the job is
reactivated after a wait cycle.
Advanced Process Functions (APF)
Function Manual, 07/2016, A5E38719883-AA
Archive management
8.1 FB_XXXA (FB_XXXAI, FB_XXXAR)
215

Advertisement

Table of Contents
loading

Table of Contents