MC_WriteNcIoOutput
The MC_WriteNcIoOutput function block can be used to write to unused I/O outputs of the axis.
Inputs
VAR_INPUT
Execute : BOOL;
Device : E_NcIoDevice := E_NcIoDevice.NcIoDeviceDrive;
NcIoOutput : E_NcIoOutput := E_NcIoOutput.NcIoOutputnCtrl1;
BitSelectMask : DWORD := 16#0;
BitValues : DWORD;
END_VAR
Name | Type | Description |
|---|---|---|
Execute | BOOL | The command is executed with a rising edge. |
Device | Selection of the Nc axis component whose I/O object is to be modified (encoder or drive). | |
NcIoOutput | Selection of the subobject whose value is to be modified (e.g. nCtrl1) | |
BitSelectMask | DWORD | Mask for selecting which bits are to be modified |
BitValues | DWORD | Values of the corresponding bits to be modified. |
Inputs/outputs
VAR_IN_OUT
Axis : AXIS_REF;
END_VARName | Type | Description |
|---|---|---|
Axis | Axis data structure that unambiguously addresses an axis in the system. Among other parameters it contains the current axis status, including position, velocity or error state. |
Outputs
VAR_OUTPUT
Done : BOOL;
Busy : BOOL;
Error : BOOL;
ErrorID : UDINT;
END_VARName | Type | Description |
|---|---|---|
Done | BOOL | TRUE if the command was executed without errors. |
Busy | BOOL | TRUE as soon as the command is started with Execute and as long as the command is processed. If "Busy" is FALSE, the function block is ready for a new order. |
Error | BOOL | TRUE, if an error occurs. |
ErrorID | UDINT | If the error output is set, this parameter supplies the error number. |
Requirements
Development Environment | Target platform | PLC library to include |
|---|---|---|
TwinCAT v3.1.4024 | PC or CX (x86) | Tc2_MC2 |