MC_WriteParam
Description
Figure 7-129: The MC_WriteParam function block
-
- This function or function block returns cached data. See Programming a Dual Core Controller for more information.
Arguments
For more detail on how inputs and outputs work, refer to PLCopen Function Blocks - General Rules
Input
Execute |
Description |
Requests to write the axis parameter |
Data type |
BOOL |
|
Range |
0, 1 |
|
Unit |
n/a |
|
Default |
— |
|
Axis |
Description |
Name of a declared instance of the AXIS_REF library function. For more details, About Axis Name and Number |
Data type |
||
Range |
[1,256] |
|
Unit |
n/a |
|
Default |
— |
|
ParameterNumber |
Description |
Parameter number, see table in Axis Parameters |
Data type |
INT |
|
Range |
— |
|
Unit |
n/a |
|
Default |
— |
|
Value |
Description |
Value to write |
Data type |
LREAL |
|
Range |
— |
|
Unit |
n/a |
|
Default |
— |
Output
Done |
Description |
Indicates the parameter has been written |
Data type |
BOOL |
|
Busy |
Description |
Indicates this function block is executing |
Data type |
BOOL |
|
Error |
Description |
Indicates an invalid input |
Data type |
BOOL |
|
ErrorID |
Description |
Indicates the error if Error output is set to TRUE
|
Data type |
INT |
Example
Structured Text
(* MC_WriteParam ST example *)
MasterOffset := 12.34;
Inst_MC_WriteParam( EnableWrite, Axis1, MC_AXIS_PARAM_MASTER_OFFSET, MasterOffset);
Ladder Diagram