Write Inverter Control Word with LS_InverterControl
LS_InverterControl is used to control an EtherCAT AC drive. See AC Drive Control Word State Machine for the operation state machine of an AC drive using the command bits.
-
LS_Connect must be used before executing this function block.
-
The control word is an object used in the AC drive’s EtherCAT PDO.
-
The following examples can be found in the XMC_ACDrive_FBs.zip downloadable from Example Applications.
Element Name | Element Type | Description |
---|---|---|
Enable | Input | Level detected request to execute the function block. |
Axis | Input/Output | Specify the axis to control. |
SwitchOn | Input | Switch On bit of the control word. |
VoltageEn | Input | Voltage Enable bit of the control word. |
QuickStop | Input | Quick Stop bit of the control word. |
EnableOP | Input | Enable operation bit of the control word. |
EnableRamp | Input | Enable ramp bit of the control word. |
UnlockRamp | Input | Unlock Ramp bit of the control word. |
ReferenceRamp | Input | Reference ramp bit of the control word. |
FaultReset | Input | Fault reset bit of the control word. |
Halt | Input |
Halt bit of the control word. Note: This input is not used. |
Done | Output | Indicates the control word was sent to the AC drive. |
Error | Output | Indicates the function block has an error. |
ErrorID | Output | Error Identification for the function block. |
Note:
-
Bit 0 -> SwitchOn in the Control Word.
-
Bit 1 -> VoltageEn in the Control Word.
-
Bit 2 -> QuickStop in the Control Word.
-
Bit 3 -> EnableOp in the Control Word.
-
Bit 7 -> FaultReset in the ControlWord.
Extra Command Bit Functionality:
Bit | Value | Description |
---|---|---|
4 (Enable Ramp) | 0 | Holding previous operation status. |
1 | Inverter operation by command bit. | |
5 (Unlock Ramp) | 0 | Holding of output frequency. |
1 | Operating to target frequency. | |
6 (Reference Ramp) | 0 | Input target frequency as 0. |
1 | Input target frequency as setting value. | |
8 (Halt) | X | Unusued. |
To enable an AC drive LS_InverterControl must be executed 3 separate times with different command bits set. This is to traverse the EtherCAT AC drive state machine from section 2.
After the AC drive has been enabled, only the EnableOP input needs to be set to ‘0’ to disable the drive.
To stop AC drive motion and leave the drive enabled, Only the QuickStop bit needs to be set to ‘0’. Motion will occur if QuickStop is set back to ‘1’ and executing the LS_InverterControl function block.
To stop AC drive motion and disable the drive, the QuickStop and EnableOP bits need to be set to ‘0’.
LM900