Circular interpolation (pass position)
Pulses are output from two channels in accordance with the parameters in the function block and in the specified DUT, so that the path to the target position forms an arc. The radius of the circle is calculated by specifying the center position and the end position. Pulses are output from the specified channel when the control flag for this channel is FALSE and the execution condition is TRUE.
Input
Activates the function block
Absolute value control = TRUE, Relative value control = FALSE
TRUE=Rotation direction: reverse
FALSE=Rotation direction: forward
Target speed: Composite speed of both axes = 100–20000 (100Hz–20kHz)
Target value [pulses]: -8388608–8388607
Target value [pulses]: -8388608–8388607
Target value [pulses]: -8388608–8388607
Target value [pulses]: -8388608–8388607
Predefined system DUT for channel configuration: PulseOutput_Channel_Configuration_DUT
Channel: 0, 2
Output
TRUE if an applied input value is invalid. Execution of the function block stops.
Radius [pulses]
X-axis center value [pulses] = -8388608–8388607
Y-axis center value [pulses] = -8388608–8388607
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: F176_PulseOutput_Pass
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_Pass: PulseOutput_Pass_FB;
bExecute: BOOL:=FALSE;
bAbsolute: BOOL:=FALSE;
bContinueAfterDone: BOOL:=FALSE;
bCounterclockwise: BOOL:=FALSE;
ChannelConfiguration_XY_DUT: PulseOutput_Channel_Configuration_DUT;
bError: BOOL:=FALSE;
diRadius: DINT:=0;
diCenterValue_X: DINT:=0;
diCenterValue_Y: DINT:=0;
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,6,1,8,3,);
B(B_F,E_MOVE!,,17,0,23,4,,?DEN?D?AENO?C);
B(B_VARIN,,1,15,2,17,4,);
B(B_F,E_MOVE!,,17,8,23,12,,?DEN?D?AENO?C);
B(B_VARIN,,FALSE,15,10,17,12,);
B(B_VAROUT,,ChannelConfiguration_XY_DUT.bOutput_Pulse_ForwardFalse,23,10,25,12,);
B(B_F,E_MOVE!,,17,12,23,16,,?DEN?D?AENO?C);
B(B_F,E_MOVE!,,17,4,23,8,,?DEN?D?AENO?C);
B(B_VARIN,,TRUE,15,6,17,8,);
B(B_VAROUT,,ChannelConfiguration_XY_DUT.bOutput_Pulse_ForwardTrue,23,6,25,8,);
B(B_VARIN,,TRUE,15,14,17,16,);
B(B_VAROUT,,ChannelConfiguration_XY_DUT.iChannel,23,2,25,4,);
B(B_F,E_MOVE!,,17,16,23,20,,?DEN?D?AENO?C);
B(B_VARIN,,FALSE,15,18,17,20,);
B(B_VAROUT,,ChannelConfiguration_XY_DUT.bDutyRatio25,23,18,25,20,);
B(B_VAROUT,,ChannelConfiguration_XY_DUT.bAccelerationSteps60,23,14,25,16,);
B(B_VAROUT,,ChannelConfiguration_XY_DUT.bFrequencyRange_191Hz_100kHz,23,22,25,24,);
B(B_VARIN,,TRUE,15,22,17,24,);
B(B_F,E_MOVE!,,17,20,23,24,,?DEN?D?AENO?C);
B(B_F,E_MOVE!,,17,24,23,28,,?DEN?D?AENO?C);
B(B_VARIN,,TRUE,15,26,17,28,);
B(B_VAROUT,,ChannelConfiguration_XY_DUT.bExecuteInInterrupt,23,26,25,28,);
L(8,2,17,2);
L(12,18,17,18);
L(12,14,17,14);
L(12,10,17,10);
L(12,6,17,6);
L(12,2,12,18);
L(12,18,12,22);
L(12,22,17,22);
L(12,22,12,26);
L(12,26,17,26);
L(1,2,6,2);
L(1,0,1,28);
END_NETWORK_BODY
END_NET_WORK
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 13 ;
NETWORK_BODY
B(B_VARIN,,bCounterclockwise,12,5,14,7,);
B(B_VARIN,,10000,12,6,14,8,);
B(B_VARIN,,6000,12,7,14,9,);
B(B_VARIN,,5000,12,8,14,10,);
B(B_VARIN,,500,12,9,14,11,);
B(B_VARIN,,500,12,10,14,12,);
B(B_VARIN,,ChannelConfiguration_XY_DUT,12,11,14,13,);
B(B_VAROUT,,diCenterValue_Y,29,5,31,7,);
B(B_VARIN,,bExecute,12,3,14,5,);
B(B_VARIN,,bAbsolute,12,4,14,6,);
B(B_VAROUT,,bError,29,3,31,5,);
B(B_VAROUT,,diRadius,29,4,31,6,);
B(B_FB,PulseOutput_Pass_FB!,PulseOutput_Pass,14,2,29,13,,?BbExecute?BbAbsolute?BbReverse?BdiTargetSpeed?BdiTargetValue_X?BdiTargetValue_Y?BdiPassValue_X?BdiPassValue_Y?BdutChannelConfiguration_X_Y?AbError?AdiRadius?AdiCenterValue_X?AdiCenterValue_Y);
L(1,0,1,13);
END_NETWORK_BODY
END_NET_WORK
END_BODY
(* Used DUT parameters *)
ChannelConfiguration_XY_DUT.iChannel := 1;
ChannelConfiguration_XY_DUT.bOutput_Pulse_ForwardTrue := TRUE;
ChannelConfiguration_XY_DUT.bOutput_Pulse_ForwardFalse := FALSE;
ChannelConfiguration_XY_DUT.bAccelerationSteps60 := FALSE;
ChannelConfiguration_XY_DUT.bDutyRatio25 := TRUE;
ChannelConfiguration_XY_DUT.bFrequencyRange_191Hz_100kHz := TRUE;
ChannelConfiguration_XY_DUT.Jog_bNoCountingInCWCCWNoTargetValueMatch := FALSE;
ChannelConfiguration_XY_DUT.bExecuteInInterruptProgram := FALSE;
(* FB *)
PulseOutput_Pass(bExecute := bExecute,
bAbsolute := bAbsolute,
bContinueAfterDone := bContinueAfterDone,
bCounterclockwise := bCounterclockwise,
diTargetSpeed := 10000,
diTargetValue_X := 6000,
diTargetValue_Y := 5000,
diPassValue_X := 500,
diPassValue_Y := 500,
dutChannelConfiguration_X_Y := ChannelConfiguration_XY_DUT,
bError => bError,
diRadius => diRadius,
diCenterValue_X => diCenterValue_X,
diCenterValue_Y => diCenterValue_Y);