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 target speed can be changed once when the position control trigger input turns to TRUE.
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 = 1–50000 (1Hz–50kHz)
Target speed = 1–50000 (1Hz–50kHz)
Acceleration time= 1ms–32760ms
Target speed = 1–50000 (1Hz–50kHz)
Change time = 1–32760ms
Deceleration time = 1–32760ms
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_Positioning1: PulseOutput_Jog_Positioning1_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,18,15,18);
L(10,14,15,14);
L(10,10,15,10);
L(10,6,15,6);
L(10,2,10,18);
L(10,18,10,22);
L(10,22,15,22);
L(1,0,1,24);
END_NETWORK_BODY
END_NET_WORK
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 13 ;
NETWORK_BODY
B(B_VARIN,,600,10,4,12,6,);
B(B_VARIN,,10000,10,5,12,7,);
B(B_VARIN,,300,10,6,12,8,);
B(B_VARIN,,25000,10,7,12,9,);
B(B_VARIN,,1200,10,8,12,10,);
B(B_VARIN,,600,10,9,12,11,);
B(B_VARIN,,90000,10,10,12,12,);
B(B_VARIN,,ChannelConfiguration_DUT,10,11,12,13,);
B(B_VARIN,,bExecute,10,2,12,4,);
B(B_VAROUT,,bError,28,2,30,4,);
B(B_FB,PulseOutput_Jog_Positioning1_FB!,PulseOutput_Jog_Positioning1,12,1,28,13,,?BbExecute?BbAbsolute?BdiInitialAndFinalSpeed?BdiTargetSpeed1?BdiAccelerationTime?BdiTargetSpeed2?BdiChangeTime?BdiDecelerationTime?BdiTargetValue?BdutChannelConfiguration?AbError);
B(B_VARIN,,bAbsolute,10,3,12,5,);
L(1,0,1,13);
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_Positioning1(bExecute := bExecute,
bAbsolute := bAbsolute
diInitialAndFinalSpeed := 600,
diTargetSpeed1 := 10000,
diAccelerationTime := 300,
diTargetSpeed2 := 25000,
diChangeTime := 1200,
diDecelerationTime := 600,
diTargetValue := 90000,
dutChannelConfiguration := ChannelConfiguration_DUT,
bError => bError);