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_PlcStopWithRamp1_INST_0 |
MW_PlcStopWithRamp1 |
Instance of access to block structure |
Operation
When the EN input changes from FALSE to TRUE (rising edge), the block starts a deceleration ramp for the pulse generation of the stepper motor on the selected axis.
The deceleration ramp follows the configuration used in the ramp configuration block (MW_PlcChangeRamp1).
|
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 on the pulse output of axis 1 with an initial frequency of 0 Hz and a duty cycle of 50%. The direction output of axis 1 is set to a low level (considering that the direction has not been inverted via parameters). The frequency will be incremented and decremented according to the default ramp.
In parallel, the "start" contact starts a 3-second timer which, at the end of the time, will initiate a deceleration ramp for the pulses on axis 1 and the move block will 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_PlcStopWithRamp1_INST_0 : FB_MW_PlcStopWithRamp1; 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(PT:=3, TIMEBASE:=1000);
MW_PlcStopWithRamp1_INST_0.EN := TON_INST_0.Q; MW_PlcStopWithRamp1_INST_0(AxisNumber:=1, ENO=>stopped);
|
|---|