MC_AxParamLoad_BkPlcMc (from V3.0)
The function block loads the parameters for an axis from a file. A function block of type MC_AxParamSave_BkPlcMc must be used to generate a compatible parameter file.
This function block is generally not called directly by the application. If possible, a function block of type MC_AxUtiStandardInit_BkPlcMc should be used, which uses a function block of type MC_AxParamLoad_BkPlcMc.
Inputs
VAR_INPUT
Execute: BOOL;
END_VAR
Name | Type | Description |
---|---|---|
Execute | BOOL | The loading process is initiated by a rising edge at this input. |
Inputs/outputs
VAR_INOUT
Axis: Axis_Ref_BkPlcMc;
END_VAR
Name | Type | Description |
---|---|---|
Axis | Axis_Ref_BkPlcMc | Here, the address of a variable of type Axis_Ref_BkPlcMc should be transferred. |
Outputs
VAR_OUTPUT
Done: BOOL;
Error: BOOL;
ErrorID: UDINT;
END_VAR
Name | Type | Description |
---|---|---|
Done | BOOL | Successful loading of the parameters is indicated here. |
Error | BOOL | The occurrence of an error is indicated here. |
ErrorID | UDINT | An encoded indication of the cause of the error is provided here. |
Behavior of the function block
On a rising edge at Execute the function block checks the transferred axis interface. A number of problems can be detected and reported during this process:
- If the file cannot be opened for reading, the system responds with Error and ErrorID:=dwTcHydErrCdPtrPlcMc or dwTcHydErrCdPtrMcPlc.
The loading process begins if these checks are carried out without problems. The file version is determined, and any parameters that are not specified by the file are replaced with neutral default values. If the file contains parameters that are not used or no longer used, these are ignored.
A falling edge at Execute clears all the pending output signals. If Execute is set to FALSE while the loading process is still active, the process that had started continues unaffected. The signals provided at the end of the operation (Error, ErrorID, Done) are made available for one cycle.