7.8 Data Blocks and Recipes 269
7.7.7 Testing Sequential Function Chart programs
Special features are required to test programs written in SFC. Depending on the
system, the following features are available:
- Setting/ Resetting transitions, to force or prevent a transition to the next step.
- Activation of steps or transitions, to begin execution of a POU at a specific
location.
- Permanent blocking of steps or transitions, to prevent them from being
activated.
- Reading and modifying system data that is relevant to SFC, e.g. step flags, step
timers, etc.
This is the equivalent of forcing at SFC level.
7.8 Data Blocks and Recipes
A recipe, in PLC parlance, is a set of variable values, which can be replaced by a
different one, to make the same PLC program behave differently. For example, in
an automated process, only parameters like length, weight, or temperature need to
be changed to produce a different product. Using recipes, such process data can be
modified during operation.
The replacement of one set of data by another can be performed by the program
itself. In this case, all the possible data sets have to be stored in PLC memory.
Another possibility is to download a new data set to the PLC at a convenient point
during operation, replacing an existing data set.
Some PLC systems use Data Blocks (DB) for this purpose. A data block is
accessible throughout the project (global) and consists of data items of specific
data types.
The data block number gives the program the base address of the data block that
is currently active. The data items are accessed by an index (data word number).
To switch to a different data block, only the base address of the new block has to
be selected in order to activate it.