-

Signal sequence: Competing file delete and read accesses

The following signal sequence diagram shows the behavior of the recipe FBs SF_RecipeDeleteFile and SF_RecipeRead if they simultaneously access to the same recipe file. Due to the competing operations, only one FB can complete its operation successfully.

Note
1) For reasons of clarity, the duration of one Safety PLC cycle is assumed in the signal sequence for each status transition of the FBs. In reality, several cycles may be necessary for this. The time required to completely write/read recipe data also varies and depends on the amount of data to be written/read.

0After the startup of the Safety PLC, both FBs are deactivated. As a result, the Done output of both FBs is SAFEFALSE, both DiagCode outputs show 0000 (Idle state).
1SF_RecipeDeleteFile is activated by switching its Activate input to TRUE. As a result, the FB runs through the states 8002 (Prepare), 8004 (Wait for Ready) to 8006 in which it waits for the trigger command at input CommandDelete.

SF_RecipeRead remains inactive.
2SF_RecipeDeleteFile remains activated and still waits for a rising edge at the CommandDelete input.

SF_RecipeRead is activated by switching its Activate input to TRUE. As a result, the FB runs through the states 8002 (Prepare), 8004 (Wait for Ready) to 8006 in which it waits for the trigger command at input CommandRead.
3A rising edge at CommandDelete and CommandRead starts the execution of the FBs.

For both function blocks, the same values are applied to the input IDRecipeFile.

SF_RecipeDeleteFile sends a request to the Safety PLC for deleting the file.

SF_RecipeRead reads the data from the addressed data set and then validates the read data.
4SF_RecipeDeleteFile waits for the answer of the Safety PLC after requesting the deletion of the file.

The validation of SF_RecipeRead is not successful as the file has been deleted meanwhile. Output Done remains SAFEFALSE and output DiagCode shows C050.
5SF_RecipeDeleteFile has completed its operation successfully. The file has been deleted, the Done output shows SAFETRUE (8000).

SF_RecipeRead remains in the error state. Output Done remains SAFEFALSE and output DiagCode shows C050.