Block to interrupt pulse generation when controlling stepper motors.
Ladder Representation

Block Structure
Variable Type |
Name |
Data Type |
Description |
VAR_INPUT |
EN |
BOOL |
Block enabling |
AxisNumber |
CONST |
Selected axis |
|
VAR_OUTPUT |
ENO |
BOOL |
Output enabling |
VAR |
MW_PlcStop1_INST_0 |
MW_PlcStop1 |
Instance of access to block structure |
Operation
When the EN input changes from FALSE to TRUE (rising edge), the block immediately stops generating pulses for the stepper motor of the selected axis.
|
NOTE! Stepper motor control must be enabled for the selected axis. Look at the user manual and parameter manual. |
Example in Ladder

In the example above, the "start" contact enables a PWM signal at the pulse output of axis 1 with an initial frequency of 0 Hz and duty cycle of 50%. The direction output of axis 1 is set to a low level (considering that the direction was not reversed via parameters). The frequency will be increased and decreased according to the standard ramp.
In parallel, the "start" contact begins a 3-second counter which, at the end of the time, will cause the DO1 PWM signal to end immediately and the move block to be completed, regardless of the number of pulses generated.
Example in ST
The example below displays instructions for applying the functional example in ST language.
VAR start : BOOL := 0 ; finished : BOOL; stopped : BOOL; pos : DINT := 1000000; MW_PlcMoveRelative1_INST_0 : FB_MW_PlcMoveRelative1; MW_PlcStop1_INST_0 : FB_MW_PlcStop1; TON_INST_0 : FB_TON; END_VAR
MW_PlcMoveRelative1_INST_0.EN := start; MW_PlcMoveRelative1_INST_0( AxisNumber:=1, Position:=pos); finished := MW_PlcMoveRelative1_INST_0.DONE;
TON_INST_0.EN := start; TON_INST_0(EN:=3, TIMEBASE:=1000);
MW_PlcStop1_INST_0.EN := TON_INST_0.Q; MW_PlcStop1_INST_0(AxisNumber:=1, ENO=>stopped);
|
|---|