Functional description
The safety-related SF_RecipeRead function block is part of a safety library which provides function blocks for the applicative recipe handling of the Safety PLC.
The SF_RecipeRead FB can read values from the specified data set (file section) in the specified recipe file.
One function block instance reads one data set in a recipe file. A data set contains 16 SAFEDWORD values (64 bytes of data). See topic "Recipe Files: Background Information and File Structure" for details.
This file is stored in the remanent memory area of the higher-level standard controller (e.g., SD card). It has been created using a SF_RecipeWrite function block (in the same or another safety application).
After completing the file read operation (including validation of the read data - see below), the Done output is set to SAFETRUE and the read values are present at the PayloadRead** outputs (with ** = 00 to 15) of the function block.
Recognition of corrupt data or a wrong data set
Before reading data, the FB always checks the file/data set consistency by recalculating and comparing the file/data set CRC. This consistency check is done independently of the user-configurable CRC checks described below.
In addition to these default validations, you can activate further CRC checks by applying the SAFETRUE value to the respective Check**CRC inputs of the FB. If activated, the FB validates the file (data set) to be read by comparing the checksum(s) stored in the recipe file with the expected values applied to the corresponding CRC input of the FB. The read data is only considered as valid if the validation is successful, i.e., if the checksums are identical with the CRCs expected.
Further Info
Refer to the help topic "Fault avoidance" for further details. In particular you must observe the hazard messages noted there, when deactivating the configurable data validations. |
- Applying an invalid file or data set ID to an FB input.
- Simultaneous write accesses to the same recipe data set within one Safety PLC cycle.
- Simultaneous read and write operations on the same recipe file/data set within one Safety PLC cycle.
Allowed but potentially unwanted multiple accesses
Other simultaneous accesses by several recipe function blocks may be not considered as an error but should nevertheless either be prevented by structuring the safety application accordingly or, if they are necessary, verified carefully by means of a function test.Examples for such generally allowed but potentially critical simultaneous accesses are:
- Multiple read accesses to the same data set within one cycle.
- Simultaneous read and "delete" operations within one cycle.
Further Info
Refer to the help topic "Fault avoidance" for further details. |