FB_TempParamLoad_TcPfw()
This function block reads the parameters of a zone from a file. For writing the file a FB_TempParamSave_TcPfw function block must be used.
Syntax
VAR_INPUT
Execute : BOOL;
PathName : STRING(80);
ProductParam :BOOL:=FALSE;
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
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. |
ProductParam | BOOL | If TRUE, the product data will be loaded. |
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. |
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 | DINT | 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 read 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.
Notice | |
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. |
Notice | |
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. |