MC_WriteParameter_BkPlcMc (from V3.0)
This function block writes the non-boolean parameters of an axis. The function block MC_WriteBoolParameter_BkPlcMc is available for boolean parameters.
Inputs
VAR_INPUT
Enable: BOOL;
ParameterNumber: INT;
Value: LREAL;
END_VAR
Name | Type | Description |
---|---|---|
Enable | BOOL | A write process is initiated by a rising edge at this input. |
ParameterNumber | INT | This code number specifies the parameter that is to be read. Only named constants from E_TcMCParameter should be used. |
Value | LREAL | The value of the parameter is to be provided here. |
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
Busy: BOOL;
Done: BOOL;
Error: BOOL;
ErrorID: UDINT;
END_VAR
Name | Type | Description |
---|---|---|
Busy | BOOL | Indicates that a command is being processed. |
Done | BOOL | Successful execution of the writing process 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 Enable the function block checks the transferred axis interface. A number of problems can be detected and reported during this process:
- If an unsupported value is given to ParameterNumber the system responds with Error and ErrorID:=dwTcHydErrCdNotSupport.
If these checks could be performed without problems Value is entered into the desired parameter value and Done is reported. If the parameter is changed recognizably in the process Axis_Ref_BkPlcMc.ST_TcHydAxRtData.bParamsUnsave is set.
A falling edge at Enable clears all the pending output signals.
This function block requires no time for executing its tasks. The output Busy will never assume the value TRUE and only exists for compatibility reasons. |