Circular interpolation (center 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 (with permanent trigger)
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)
X-axis target value [pulses]: -8388608–8388607
Y-axis target value [pulses]: -8388608–8388607
X-axis center value [pulses]: -8388608–8388607
Y-axis center 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]
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_Center
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_Center: PulseOutput_Center_FB;
bExecute: BOOL:=FALSE;
bAbsolute: BOOL:=FALSE;
bContinueAfterDone: BOOL:=FALSE;
bCounterclockwise: BOOL:=FALSE;
ChannelConfiguration_X_DUT: PulseOutput_Channel_Configuration_DUT;
bError: BOOL:=FALSE;
diRadius: DINT:=0;
bConfigure: 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 := 25 ;
NETWORK_BODY
B(B_CONTACT,,bConfigure,7,1,9,3,);
B(B_F,E_MOVE!,,19,0,25,4,,?DEN?D?AENO?C);
B(B_VARIN,,1,17,2,19,4,);
B(B_F,E_MOVE!,,19,8,25,12,,?DEN?D?AENO?C);
B(B_VARIN,,FALSE,17,10,19,12,);
B(B_VAROUT,,ChannelConfiguration_X_DUT.bOutput_Pulse_SignReverse,25,10,27,12,);
B(B_F,E_MOVE!,,19,12,25,16,,?DEN?D?AENO?C);
B(B_F,E_MOVE!,,19,4,25,8,,?DEN?D?AENO?C);
B(B_VARIN,,TRUE,17,6,19,8,);
B(B_VAROUT,,ChannelConfiguration_X_DUT.bOutput_Pulse_SignForward,25,6,27,8,);
B(B_VARIN,,TRUE,17,14,19,16,);
B(B_VAROUT,,ChannelConfiguration_X_DUT.iChannel,25,2,27,4,);
B(B_F,E_MOVE!,,19,16,25,20,,?DEN?D?AENO?C);
B(B_VARIN,,FALSE,17,18,19,20,);
B(B_VAROUT,,ChannelConfiguration_X_DUT.bDutyRatio25,25,18,27,20,);
B(B_F,E_MOVE!,,19,20,25,24,,?DEN?D?AENO?C);
B(B_VAROUT,,ChannelConfiguration_X_DUT.bAccelerationSteps60,25,14,27,16,);
B(B_VAROUT,,ChannelConfiguration_X_DUT.bFrequencyRange_191Hz_100kHz,25,22,27,24,);
B(B_VARIN,,TRUE,17,22,19,24,);
L(1,2,7,2);
L(10,2,10,6);
L(10,6,19,6);
L(9,2,10,2);
L(10,2,19,2);
L(10,10,19,10);
L(10,10,10,14);
L(10,6,10,10);
L(10,14,19,14);
L(10,14,10,18);
L(10,18,19,18);
L(10,18,10,22);
L(10,22,19,22);
L(1,0,1,25);
END_NETWORK_BODY
END_NET_WORK
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 13 ;
NETWORK_BODY
B(B_FB,PulseOutput_Center_FB!,PulseOutput_Center,14,1,28,13,,?BbExecute?BbAbsolute?BbContinueAfterDone?BbCounterclockwise?BdiTargetSpeed?BdiTargetValue_X?BdiTargetValue_Y?BdiCenterValue_X?BdiCenterValue_Y?BdutChannelConfiguration_X?AbError?AdiRadius);
B(B_VARIN,,bExecute,12,2,14,4,);
B(B_VARIN,,bAbsolute,12,3,14,5,);
B(B_VARIN,,bContinueAfterDone,12,4,14,6,);
B(B_VARIN,,bCounterclockwise,12,5,14,7,);
B(B_VARIN,,15000,12,6,14,8,);
B(B_VARIN,,7000,12,7,14,9,);
B(B_VARIN,,12000,12,8,14,10,);
B(B_VARIN,,500,12,9,14,11,);
B(B_VARIN,,900,12,10,14,12,);
B(B_VARIN,,ChannelConfiguration_X_DUT,12,11,14,13,);
B(B_VAROUT,,bError,28,2,30,4,);
B(B_VAROUT,,diRadius,28,3,30,5,);
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.bExecuteInInterruptProgram := FALSE;
(* FB *)
PulseOutput_Center(bExecute := bExecute,
bAbsolute := bAbsolute,
bContinueAfterDone := bContinueAfterDone,
bCounterclockwise := bCounterclockwise,
diTargetSpeed := 15000,
diTargetValue_X := 7000,
diTargetValue_Y := 12000,
diCenterValue_X := 500,
diCenterValue_Y := 900,
dutChannelConfiguration_X_Y := ChannelConfiguration_XY_DUT,
bError => bError,
diRadius => diRadius);