JOG operation
Input
Execution condition can be:
with edge trigger
permanent, if change of speed is required.
Movement direction: Forward = FALSE, Reverse = TRUE
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)
Output
TRUE if an applied input value is invalid. Execution of the function block stops.
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:F172_PulseOutput_Jog.Use PulseInfo_IsActive to check if the control flag for the selected channel is FALSE.
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: PulseOutput_Jog_FB;
bExecute: BOOL:=FALSE;
bReverse: BOOL:=FALSE;
ChannelConfiguration_DUT: PulseOutput_Channel_Configuration_DUT;
bError: BOOL:=FALSE;
bConfigureDUT: 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 := 28 ;
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_SignReverse,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_SignForward,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_F,E_MOVE!,,15,20,21,24,,?DEN?D?AENO?C);
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,);
L(6,2,10,2);
L(1,2,4,2);
L(10,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,2,10,22);
L(1,0,1,28);
END_NETWORK_BODY
END_NET_WORK
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 10 ;
NETWORK_BODY
B(B_FB,PulseOutput_Jog_FB!,PulseOutput_Jog,15,1,28,10,,?BbExecute?BbReverse?BdiInitialAndFinalSpeed?BdiTargetSpeed?BdiAccelerationTime?BdiDecelerationTime?BdutChannelConfiguration?AbError);
B(B_VARIN,,bExecute,13,2,15,4,);
B(B_VARIN,,bReverse,13,3,15,5,);
B(B_VARIN,,600,13,4,15,6,);
B(B_VARIN,,12000,13,5,15,7,);
B(B_VARIN,,300,13,6,15,8,);
B(B_VARIN,,600,13,7,15,9,);
B(B_VARIN,,ChannelConfiguration_DUT,13,8,15,10,);
B(B_VAROUT,,bError,28,2,30,4,);
L(1,0,1,10);
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(bExecute := bExecute,
bReverse := bReverse,
diInitialAndFinalSpeed := 600,
diTargetSpeed := 12000,
diAccelerationTime := 300,
diDecelerationTime := 600,
dutChannelConfiguration := ChannelConfiguration_DUT,
bError => bError);