JOG operation and positioning
This instruction is used for JOG operation.The specified number of pulses is output after the position control trigger input has turned to TRUE. A deceleration is performed before the target value is reached and pulse output stops.Pulses are output from the specified channel when the control flag for this channel is FALSE and the execution condition is TRUE.The speed can be changed within the range of the specified target speed.
Input
Execution condition can be:
with edge trigger
permanent, if change of speed is required.
Only relative value control is supported; must always be FALSE, otherwise an error is output.
Initial and final speed (F171_PulseOutput_Trapezoidal): 1 to 50000 (1Hz–50kHz)
Target speed: Set this value according to the frequency range selected in PulseOutput_Channel_Configuration_DUT:
FPS, FP-X: 1 to 9800 (1.5Hz–9.8kHz)
48 to 100000 (48Hz–100kHz)
191 to 100000 (191–100kHz)
F171_PulseOutput_Trapezoidal: 1 to 50000 (1Hz–50kHz)
FP0, F168_PulseOutput_Trapezoidal: 40 to 5000 (40Hz–5kHz)
Acceleration time (F171_PulseOutput_Trapezoidal): 1ms–32760ms (up to the maximum speed)
Deceleration time (F171_PulseOutput_Trapezoidal): 1ms–32760ms (from the maximum speed)
Target value[pulses]: -2147483648–2147483647
Output
TRUE if an applied input value is invalid. Execution of the function block stops.
TRUE if the applied channel is not enabled in the system registers or if bAbsolute is TRUE
This non-inline instruction is part of the tool instructions for pulse output. For a detailed description of the instruction(s) used internally, please refer to:F171_PulseOutput_Jog_Positioning. Use PulseInfo_IsActive to check if the control flag for the selected channel is FALSE.Use PulseControl_PulseOutputStop to stop pulse output on a specified channel. Use PulseControl_DeceleratedStop to perform a decelerated stop.
With a Data Unit Type (DUT) you can define a data unit type that is composed of other data types. A DUT is first defined in the DUT pool and then processed like the standard data types (BOOL, INT, etc.) in the list of global variables or the POU header.
All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.
VAR
PulseOutput_Jog_Positioning0: PulseOutput_Jog_Positioning0_FB;
bExecute: BOOL:=FALSE;
ChannelConfiguration_DUT: PulseOutput_Channel_Configuration_DUT;
bError: BOOL:=FALSE;
bConfigureDUT: BOOL:=FALSE;
bAbsolute: BOOL:=FALSE;
@'': @'';
END_VAR
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 24 ;
NETWORK_BODY
B(B_CONTACT,,bConfigureDUT,4,1,6,3,);
B(B_F,E_MOVE!,,15,0,21,4,,?DEN?D?AENO?C);
B(B_VARIN,,1,13,2,15,4,);
B(B_F,E_MOVE!,,15,8,21,12,,?DEN?D?AENO?C);
B(B_VARIN,,FALSE,13,10,15,12,);
B(B_VAROUT,,ChannelConfiguration_DUT.bOutput_Pulse_ForwardFalse,21,10,23,12,);
B(B_F,E_MOVE!,,15,12,21,16,,?DEN?D?AENO?C);
B(B_F,E_MOVE!,,15,4,21,8,,?DEN?D?AENO?C);
B(B_VARIN,,TRUE,13,6,15,8,);
B(B_VAROUT,,ChannelConfiguration_DUT.bOutput_Pulse_ForwardTrue,21,6,23,8,);
B(B_VARIN,,TRUE,13,14,15,16,);
B(B_VAROUT,,ChannelConfiguration_DUT.iChannel,21,2,23,4,);
B(B_F,E_MOVE!,,15,16,21,20,,?DEN?D?AENO?C);
B(B_VARIN,,FALSE,13,18,15,20,);
B(B_VAROUT,,ChannelConfiguration_DUT.bDutyRatio25,21,18,23,20,);
B(B_VAROUT,,ChannelConfiguration_DUT.bAccelerationSteps60,21,14,23,16,);
B(B_VAROUT,,ChannelConfiguration_DUT.bFrequencyRange_191Hz_100kHz,21,22,23,24,);
B(B_VARIN,,TRUE,13,22,15,24,);
B(B_F,E_MOVE!,,15,20,21,24,,?DEN?D?AENO?C);
L(1,2,4,2);
L(6,2,15,2);
L(10,22,15,22);
L(10,18,15,18);
L(10,14,15,14);
L(10,10,15,10);
L(10,6,15,6);
L(10,18,10,22);
L(10,2,10,18);
L(1,0,1,24);
END_NETWORK_BODY
END_NET_WORK
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 11 ;
NETWORK_BODY
B(B_VARIN,,600,10,4,12,6,);
B(B_VARIN,,12000,10,5,12,7,);
B(B_VARIN,,300,10,6,12,8,);
B(B_VARIN,,600,10,7,12,9,);
B(B_VARIN,,50000,10,8,12,10,);
B(B_VARIN,,ChannelConfiguration_DUT,10,9,12,11,);
B(B_VARIN,,bExecute,10,2,12,4,);
B(B_VAROUT,,bError,28,2,30,4,);
B(B_FB,PulseOutput_Jog_Positioning0_FB!,PulseOutput_Jog_Positioning0,12,1,28,11,,?BbExecute?BbAbsolute?BdiInitialAndFinalSpeed?BdiTargetSpeed?BdiAccelerationTime?BdiDecelerationTime?BdiTargetValue?BdutChannelConfiguration?AbError);
B(B_VARIN,,bAbsolute,10,3,12,5,);
L(1,0,1,11);
END_NETWORK_BODY
END_NET_WORK
END_BODY
(* Used DUT parameters *)
ChannelConfiguration_DUT.iChannel := 1;
ChannelConfiguration_DUT.bOutput_Pulse_ForwardTrue := TRUE;
ChannelConfiguration_DUT.bOutput_Pulse_ForwardFalse := FALSE;
ChannelConfiguration_DUT.bAccelerationSteps60 := FALSE;
ChannelConfiguration_DUT.bDutyRatio25 := TRUE;
ChannelConfiguration_DUT.bFrequencyRange_191Hz_100kHz := TRUE;
ChannelConfiguration_DUT.bExecuteInInterrupt := FALSE;
(* FB *)
PulseOutput_Jog_Positioning0(bExecute := bExecute,
bAbsolute := bAbsolute
diInitialAndFinalSpeed := 600,
diTargetSpeed := 12000,
diAccelerationTime := 300,
diDecelerationTime := 600,
diTargetValue := 50000,
dutChannelConfiguration := ChannelConfiguration_DUT,
bError => bError);