General

The analyzer will check the following rules and errors will be reported if not matched in the application:

  • The EFB must not be used more than once in the whole application.

  • A PCMCIA card of type DATA must be present in right slot.

  • Data size must match the memory borders.

Only 1 SFC_RESTORE

Only 1 SFC_RESTORE function block is used to control SFC save and restore.

NOTE: SFC_RESTORE can only be used once in an application (single control instance).
NOTE: The number of saved SFC-sections is limited to 250.

Location of SFC_RESTORE

It is recommended to locate the usage of SFC_RESTORE in a section executed before the first SFC section.

A change at input(s) will then affect all SFC sections in the same scan.

It is also strongly recommended to not disable this EFB or the section, in which this EFB is located, because otherwise the saved data will be inconsistent to the SFC charts.

SFC_RESTORE Disabled or Deleted

If the SFC_RESTORE function block is disabled or deleted, the SFC interpreter is no more notified.

This will be detected after some scans and the SFC save and restore feature will be shut off. No more saves are done.

The data in the PCMCIA memory card is kept and a warning is registered to the diagnostic buffer.

Currently Active Mode

The currently active mode/action is calculated according to the following table.

Mode/Action

Save Value

Restore Value

Resume Value

idle

0

0

0

save

1

0

0

restore

0 or 1

0 -> 1 (rising edge)

0 or 1

resume

0 or 1

0

0 -> 1 (rising edge)

PCMCIA Memory Card

The SFC_RESTORE function block can only be used in CPUs with a PCMCIA memory card slot.

The presence of a suitable PCMCIA memory card is checked at analyze time in the configuration data.

An error is reported if missing or wrong slot is selected.

If given as constant value, it is checked additionally that the memory area fits into the card memory starting from the given address.

Nevertheless, a run-time error will be shown at the STATUS output if the card is not present (like WRITE_PCMCIA, e.g. 16#0201: no file zone in the memory card).

Estimation of Memory

To estimate the amount of memory needed to save your SFC sections, you can use the following formula:

bytes Σ = 570 + n*210

570

bytes needed for data management

n

number of SFC sections

210

bytes needed per SFC section

NOTE: Values may change in case of OS update.

Memory Area

Starting at the address given by the ADR_W input, the SFC interpreter assumes a memory area of SPACE_KW * 2 Kbytes usable by SFC save and restore feature.

The integrity of this memory is verified by a checksum per block.

If an error is detected (e.g. checksum error), the related block is marked as invalid and an error is reported.

As in the next scan SFC will try to save active steps again, the lack of restore-possibility could be temporary.

NOTE: Take into account that even the READ_PCMCIA and WRITE_PCMCIA blocks can manage the PCMCIA memory card.

Number of Saved SFC Sections

According to the SPACE_KW input, a certain amount of memory is used. There is no check at build time whether this amount of memory is suitable.

If more SFC sections are detected at run time than fit into memory, an error will be reported.

It is still possible to restore SFC charts that have been saved.

If the number of active SFC sections increases (enable sections, add with online modification), this type of error could be detected spontaneously at run time.

To give help on the number of SFC sections in the application, 3 outputs are available:

  • NUMSAVED: number of saved SFC sections

  • NUMFAILED: number of not saved SFC sections

  • NUMPOSBL: maximum number of SFC sections that could be saved in the current scenario

NOTE: If there is no need to economize memory, it is recommended to add some memory space for future expansion. The number of saved SFC-sections is limited to 250.

Memory Not Cleared

New parameters at the EFB, according to an online build/change, will be taken into account.

In case of an address change, the new memory will be used.

NOTE: The old memory will not be cleared.

A change at SPACE_KW will result in an increase or decrease of the used memory.

The presence and exclusive availability of that memory is assumed.

New Save in Case of Build

In case of a build/change of any modified part of the application, the saved data is invalidated.

That is because the application signature, which is used to identify good pairs of application and storage, is changed in any case.

NOTE: To be able to perform a restore again, it is mandatory to save again after a build/change.