Block conducting the Iq control programmed.
Ladder Representation

Execution Features
Program Memory Size |
78 Bytes |
Data Memory Size |
32 Bytes |
Block Structure
Variable Type |
Name |
Data Type |
Description |
VAR_IN_OUT |
Axis |
BYTE |
Selection of operation axis (0 - Real axis) |
VAR_INPUT |
Execute |
BOOL |
Block enabling |
ContinuousUpdate |
BYTE |
Automatic update mode (0 – Leading edge) (1 – Real time) |
|
Iq |
REAL |
lq Value |
|
IqRamp |
REAL |
Iq ramp value |
|
BufferMode |
BYTE |
Execution start mode (0 - Starts block immediately, if there is another block in the execution it will be aborted) (1 - When another block is in execution, the block in execution will continue its motion until the end and this new block will wait to be executed.) (6 – If another block is in execution, this block will go into error 52 and will not be executed. The HMI will show the alarm A00052.) |
|
VAR_OUTPUT |
InIq |
BOOL |
Output enabling |
Busy |
BOOL |
Flag indicating the block has not yet been ended |
|
Active |
BOOL |
Block flag with control on the axis |
|
CommandAborted |
BOOL |
Flag of aborted command |
|
Error |
BOOL |
Error in the execution flag |
|
ErrorID |
WORD |
Identifier of the occurred error |
|
VAR |
MW_IQCONTROL_INST_0 |
MW_IQCONTROL |
Instance of access to block structure |
Operation
When this block detects a leading edge on Execute, it sends an execution command of the lq control according to the programmed parameters.
In the execution of the block the axis status will change to Continuous Motion. It order to finish the block, it is necessary to execute another block or the changing of the drive to the Disable or Errorstop status.
When Execute has FALSE value, Done remains FALSE. The Done output is activated when the block finishes the execution successfully, remaining at TRUE level until Execute receives FALSE.
If there is any error in the execution, the Error output is enabled and ErrorID displays an error code according to the table below.
Code |
Description |
52 |
Attempt to execute block with BufferMode in Single when another block is active. |
67 |
Drive in the "Disabled" or "Errorstop" status. |
69 |
Drive in the "Stopping" status. |
70 |
Attempt to execute block with BufferMode in Buffered when another block is active and another block is waiting. |
71 |
P202 different from 4. |
74 |
Drive in the "Homing" status. |
78 |
MC block not executed – Internal fault. |
80 |
Iq programmed above the maximum allowed. |
81 |
IqRamp programmed below the minimum allowed. |
82 |
IqRamp programmed above the maximum allowed. |
Example in Ladder

In the up transition of IQCONTROL_EXECUTE, the MW_IqControl block is executed. With this, the Busy and Active signals of this block are set and starts the execution of Iq control according to parameters set. When the process finishes, the Done output of the block is set and remains TRUE while the Execute input is set.
Example in ST
The example below displays the instructions for applying the example above in the ST language.
VAR IQCONTROL_EXECUTE, DONE : BOOL; IQ, IQ_RAMP : REAL; MW_IQCONTROL_INST_0 : FB_MW_IqControl; END_VAR
IQCONTROL_EXECUTE := MW_IQCONTROL_INST_0.Execute; MW_IQCONTROL_INST_0( Axis:=0, ContinuousUpdate:=1, Iq:=IQ, IqRamp:=IQ_RAMP, BufferMode:=0); DONE := MW_IQCONTROL_INST_0.InIq;
|
|---|