FC_SysSaveParByLogAddr - General Information

Overview

Type:

Function

Available as of:

SystemInterface_1.34.1.0

Support for:

-

Versions:

Current version

Task

Save the value of one input parameter (types ED, EF, ER, ES) in a file and use this value as initialization value for the input parameter during controller start-up.

Description

This function saves the value of one input parameter in a file. The file is named IoConfig.par and located in directory ESystem on the mass storage device (CF card or SD card). The input parameter is addressed by its logical address in i_stLogAdr. During every call-up of the FC_SysSaveParByLogAddr function for a new input parameter, the file IoConfig.par is extended by one parameter. If the FC_SysSaveParByLogAddr function is executed for three input parameters, three input parameters are saved in the file IoConfig.par. The file IoConfig.par is used for the initialization of the input parameters during system start-up. The input parameters are initialized with the values saved in the file IoConfig.par.

The FC_SysSaveParByLogAddr function interacts with the FC_SysSaveParameter function, refer to the description of FC_SysSaveParameter.

NOTE: Processing this function takes several 100 ms. This is why there must be a one-time increase in the times for the cycle check of the task in which this function is executed. For example CycleCheckTimeSet(500, 1000).
NOTE: A Login with download deletes the parameter file IoConfig.par.

Interface

Input

Data type

Description

i_stLogAdr

ST_LogicalAddress

Logical address of the parameter

Return Value

Data type

Description

DINT

0: OK

-1: Logical address invalid

Example


VAR
   diSuccess :DINT;
   stController :ST_LogicalAddress;
END_VAR 
   stController:=PacDriveIII.   stLogicalAddress;
   stController.udiParameterId := 16#02; // Language
   diSuccess:=Systeminterface.FC_SysSaveParByLogAddr(stController);