TectRecipe (FB)

FUNCTION_BLOCK TectRecipe EXTENDS AbbETrig3

The function block can save/write the necessary control settings to a CSV file. It also can load/read the settings from the CSV file.

This block will read/write from a file system, e.g. memory card. The files can be accessed via an FTP client connected to AC500 FTP server. A backup copy of the CSV file will be created with the same file name but with suffix .cpy after a WRITE operation and before a READ operation. In case of file corruption, the CPY file can be renamed into CSV file manually.

This function block can be used to save the dedicated control settings and settings for a temperature control system. Furthermore, it can also be used to manage recipes (multiple sets of control settings).

InOut:

Scope

Name

Type

Initial

Comment

Inherited from

Input

Execute

BOOL

FALSE

A rising edge starts a single operation, the output Busy goes to TRUE. In the first cycle all other inputs are read and stored, afterwards they are ignored. A falling edge does not stop the operation. After Done = TRUE or Error = TRUE and Execute = FALSE all outputs will be reset. For executing another operation the Execute input needs to be retriggered by another rising edge!

AbbETrig3

Output

Done

BOOL

FALSE

Operation is completed without error (while outputs Busy and Error are FALSE). This output is TRUE for at least one cycle or until Execute is set to FALSE

AbbETrig3

Busy

BOOL

FALSE

Operation is running (while outputs Done and Error are FALSE)

AbbETrig3

Error

BOOL

FALSE

Operation is stopped with error (while outputs Busy and Done are FALSE). This output is TRUE for at least one cycle or until Execute is set to FALSE. The output ErrorID gives more details about the error.

AbbETrig3

Input

Operation

TECT_OPERATION_ENUM

2: Operation type. Default: Read Operation. Range:1,2.
  • 1: Read - To read the values from the CSV

  • 2: Write - To write the values to the CSV

SetNumber

WORD

0

3: Recipe set number. This number will be used in the recipe CSV file name. See description of FilePath

FilePath

STRING

4: There are two possibilities to define FilePath, thus two methods to define the recipe file name:

  • Default recipe file name: define a folder for saving recipe file (followed with or without “\"). The recipe file will be saved under FilePath with a default name TZD*.csv, where “*” stands for SetNumber. For example, if the folder name is “Recipe”stored in the sdcard folder ,SetNumber = 3, then FilePath = ‘sdcard\Recipe’, then a recipe file TZD3.csv will be created (Operation = Write) or read (Operation = Read) under sdcard\Recipe.TDZ0 is the default file name.

  • User defined recipe file name: define folder with CSV file name. In this case SetNumber has no meaning. For example, if FilePath = ‘sdcard\Recipe\MyRecipe.csv’, then a recipe file MyRecipe.csv will be created using (Operation = Write), once its is created write (Operation= Write) or read (Operation = Read) can be used under sdcard\Recipe. The recipe file and the last level of the folder can be created by the function block, but the parent folder must already exist. For example, if FilePath = sdcard\Level1\Level2 \Level3 or FilePath = ‘sdcard\Level1\Level2\Level3\myRecipe.csv, then sdcard\Level1\Level2 must already exist but \Level3 can be created by the function block.

NumberOfZone

WORD

1

5: Number of zones in the system to be operated. Range 1 to 255.

Note

The Number of Zones must be configured accurately based on the actual number of zones configured in the system

Inout

FirstZoneData

TectTempZoneDataType

6: The first Zone Data

Output

ErrorID

ERROR_ID

4: Error code in case of error in the function block execution

Status

TECT_RECIPE_STATUS

5: Status of the recipe block

Methods:

D_ResetAction

C_CleaningAction

B_CyclicAction

A_StartAction

Structure: