FB_TempParamSaveP_TcPfw()

FB_TempParamSaveP_TcPfw() 1:

This function block writes the product parameters of a zone into a file. A FB_TempParamLoad_TcPfw function block must be used to read the file.

Syntax

VAR_INPUT
    Execute : BOOL;
    PathName: STRING(80);
END_VAR
VAR_IN_OUT
    Mparam  : ST_TcPfw_TempMparamFromHmi_Itf;
    Pparam  : ST_TcPfw_TempPparamFromHmi_Itf;
END_VAR
VAR_OUT
    Done    : BOOL;
    Error   : BOOL;
    ErrorId : DINT;
END_VAR

FB_TempParamSaveP_TcPfw() 2: Inputs

Name

Type

Description

Execute

BOOL

The process is initiated by a rising edge at this input.

With a FALSE at Execute all outputs are deleted. This ensures that they are present for at least one cycle.

PathName

STRING

The path name to be used must be provided here.

FB_TempParamSaveP_TcPfw() 3: Inputs/outputs

Name

Type

Description

Mparam

ST_TcPfw_TempMparamFromHmi_Itf

A reference to the machine parameters of the zone must be provided here.

Pparam

ST_TcPfw_TempPparamFromHmi_Itf

A reference to the product parameters of the zone must be provided here.

FB_TempParamSaveP_TcPfw() 4: Outputs

Name

Type

Description

Done

BOOL

A TRUE indicates here the successful processing of the command.

Error

BOOL

A TRUE indicates here the occurrence of a problem during the processing of the command.

ErrorId

BOOL

If an error has occurred, coded information about the nature of the problem is provided here.

Behavior of the function block:

On a rising edge at Execute, the function block forms a filename from PathName, the textual name of the zone and STRING constants.

Example:

'C:\Parameter\Tctrl_Zone1.par' is formed from PathName:='C:\Parameter\' and Mparam.ZoneName:='Zone1'.

The parameters are written in an encoded binary format that cannot be edited with a text editor. The coding makes the format largely insensitive to version differences. As a rule, files are readable even if they were written by older or younger versions of the library.

Note

If the product parameters are to be saved independently of the machine data of the zone, one FB_TempParamSave_TcPfw() function block and one FB_TempParamSaveP_TcPfw() function block must be used. To avoid mutual overwriting of files with the same name, the path names must be chosen differently. At system startup first the machine data and then the product parameters are to be loaded with FB_TempParamLoad_TcPfw() function blocks.

Note

New parameters may be added when the version of the library is changed. These are filled with default values whose effect does not always produce the desired behavior.