SF_FLASH_DELPermalink

This is the web edition of the original ‎⮫ AC500-S safety user manual, version 1.3.2. This web edition is provided for quick reference only. The original safety user manual must be used to meet functional safety application requirements.

04.06.069_SF_FLASH_DEL

Delete a selected segment from the flash memory

This function block deletes a selected segment with user data from the flash memory.

Input SEG defines the data segment within the flash memory. In the safety CPU, two segments numbered 1 and 2 (each providing 64 kB incl. CRC, flag and alignment) are reserved for the user. Deleting a data segment within the flash memory may take several safety PLC cycles.

Deletion of the data segment is triggered once by a FALSE/TRUE edge at input EN. Input EN will not be evaluated again until the delete operation is completed (DONE = TRUE).

After the deletion procedure is finished, all function block outputs are updated. The deletion was successful if DONE = TRUE and ERR = FALSE. If the outputs show DONE = TRUE and ERR = TRUE, the data segment could not be deleted.

NOTICE

NOTICE
NOTICE
NOTICE

NOTICE

NOTICE

This function block is activated by a positive edge of the input variable EN. During the cycle where the function block notices that the operation is finished (output DONE = TRUE) it will set the output variables only for one cycle. When the function block is called again it will reset the output variables immediately.

Table 1149: FB name: SF_FLASH_DEL

Name

Data type

Initial value

Description, parameter values

VAR_INPUT

EN

BOOL

FALSE

Activation of the FB using a positive edge

Deletion of the data segment is started once. Input EN will not be evaluated again until the delete operation is finished (DONE = TRUE).

EN = TRUE:

The function block is not processed, i.e. it does not change its outputs anymore. This is not valid during a delete operation.

SEG

BYTE

16#00

ID number of the data segment (16#01 or 16#02)

VAR_OUTPUT

DONE

BOOL

FALSE

Delete procedure is completed (DONE = TRUE)

Output DONE indicates that deletion of the data segment is completed. This output always has to be considered together with output ERR.

The following applies:

  • DONE = TRUE and ERR = FALSE: Deletion completed. The data segment has been deleted successfully.

  • DONE = TRUE and ERR = TRUE: An error occurred while deleting the data segment. The data segment could not be deleted successfully.

ERR

BOOL

FALSE

Error occurred (data segment could not be deleted)

Output ERR indicates whether an error occurred during deletion. This output always has to be considered together with output DONE. The following applies if the data segment could not be deleted: DONE = TRUE and ERR = TRUE. Output ERNO indicates the error number.

ERNO

WORD

16#0000

Error number⮫ [3].

Output ERNO indicates an error number. This output always has to be considered together with the outputs DONE and ERR.

The SF_FLASH_DEL operation may take quite a long time since the safety CPU user program is processed with higher priority. Output ERNO indicates that the function block has started the execution (0x0FFF = BUSY).

During this phase, the outputs ERR and DONE are set to FALSE.

Call in ST

DEL_FLASH(EN := EN_FLASH_DEL,
SEG := SEG_FLASH_DEL,
DONE => DONE_FLASH_DEL,
ERR => ERR_FLASH_DEL,
ERNO => ERNO_FLASH_DEL);