PulseOutput_Linear_FB

Linear interpolation

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 a straight line. Pulses are output from the specified channel when the control flag for this channel is FALSE and the execution condition is TRUE.

Parameters

Input

bExecute (BOOL)

Execution condition can be:

  • with edge trigger

  • permanent, if change of speed is required.

bAbsolute (BOOL)

Absolute value control = TRUE, Relative value control = FALSE

diInitialAndFinalSpeed (DINT)

Initial and final speed: Composite speed = 1–50000 (1Hz–50kHz)

diTargetSpeed (DINT)

Target speed: Composite speed = 1–50000 (1Hz–50kHz)

diAccelerationTime (DINT)

Acceleration/deceleration time (FPS, FP-X): 0ms–32767ms

Acceleration time (F171_PulseOutput_Trapezoidal): 0ms–32767ms

diDecelerationTime (DINT)

Deceleration time (F171_PulseOutput_Trapezoidal): 0ms–32767ms

diTargetValue_X (DINT)

X-axis target value[pulses]-8388608–8388607

diTargetValue_Y (DINT)

Y-axis target value[pulses]-8388608–8388607

dutChannelConfiguration_X_YPredefined system DUT for channel configuration: PulseOutput_Channel_Configuration_DUTFor interpolation, channel 0 and 1 or channel 2 and 3 are used as pairs. You may only specify 0 or 2 (for C14T: 0 only).

Output

bError (BOOL)

TRUE if an applied input value is invalid. Execution of the function block stops.

Is set only if global constant MC_PulseOutput_Library_Basic_bCheckInputs is set to TRUE.

riInitialAndFinalSpeed_X (REAL)

X-axis initial and final speed[Hz]

riTargetSpeed_X (REAL)

X-axis target speed[Hz]

riInitialAndFinalSpeed_Y (REAL)

Y-axis initial and final speed[Hz]

riTargetSpeed_Y (REAL)

Y-axis target speed[Hz]

dutAdditionalOutputsFPS, FP-X: PulseOutput_Linear_AdditionalOutputs_DUT

Remarks

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:F175_PulseOutput_Linear

Use PulseInfo_IsActive to check if the control flag for the selected channel is FALSE.

Example

DUT

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.

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_Linear: PulseOutput_Linear_FB;
		bExecute: BOOL:=FALSE;
		bAbsolute: BOOL:=FALSE;
		ChannelConfiguration_XY_DUT: PulseOutput_Channel_Configuration_DUT;
		bError: BOOL:=FALSE;
		rInitialAndFinalSpeed_X: REAL:=0;
		rTargetSpeed_X: REAL:=0;
		rInitialAndFinalSpeed_Y: REAL:=0;
		rTargetSpeed_Y: REAL:=0;
		AdditionalOutputs_DUT: PulseOutput_Linear_AdditionalOutputs_DUT;
		bConfigureDUT: BOOL:=FALSE;
		@'': @'';
	END_VAR

LD body

BODY
    WORKSPACE
        NETWORK_LIST_TYPE := NWTYPELD ;
        ACTIVE_NETWORK := 0 ;
    END_WORKSPACE
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 31 ;
        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,31);
        END_NETWORK_BODY
    END_NET_WORK
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 12 ;
        NETWORK_BODY
B(B_FB,PulseOutput_Linear_FB!,PulseOutput_Linear,15,1,33,12,,?BbExecute?BbAbsolute?BdiInitialAndFinalSpeed?BdiTargetSpeed?BdiAccelerationTime?BdiDecelerationTime?BdiTargetValue_X?BdiTargetValue_Y?BdutChannelConfiguration_X_Y?AbError?ArInitialAndFinalSpeed_X?ArTargetSpeed_X?ArInitialAndFinalSpeed_Y?ArTargetSpeed_Y?AdutAdditionalOutputs);
B(B_VARIN,,bExecute,13,2,15,4,);
B(B_VARIN,,bAbsolute,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,,1000,13,8,15,10,);
B(B_VARIN,,2000,13,9,15,11,);
B(B_VARIN,,ChannelConfiguration_XY_DUT,13,10,15,12,);
B(B_VAROUT,,bError,33,2,35,4,);
B(B_VAROUT,,rInitialAndFinalSpeed_X,33,3,35,5,);
B(B_VAROUT,,rTargetSpeed_X,33,4,35,6,);
B(B_VAROUT,,rInitialAndFinalSpeed_Y,33,5,35,7,);
B(B_VAROUT,,rTargetSpeed_Y,33,6,35,8,);
B(B_VAROUT,,AdditionalOutputs_DUT,33,7,35,9,);
L(1,0,1,12);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST 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.bExecuteInInterrupt := FALSE;
(* FB *)
PulseOutput_Linear(bExecute := bExecute,
           bAbsolute := bAbsolute,
           diInitialAndFinalSpeed := 600,
           diTargetSpeed := 12000,
           diAccelerationTime := 300,
           diDecelerationTime := 600,
           diTargetValue_X := 150000,
           diTargetValue_Y := 10000,
           dutChannelConfiguration_X_Y := ChannelConfiguration_XY_DUT,
           bError => bError,
           diInitialAndFinalSpeed_X => diInitialAndFinalSpeed_X,
           diTargetSpeed_X => diTargetSpeed_X,
           diInitialAndFinalSpeed_Y => diInitialAndFinalSpeed_Y,
           diTargetSpeed_Y => diTargetSpeed_Y,
           dutAdditionalOutputs => AdditionalOutputs_DUT);

Modified on: 2019-01-25Feedback on this pagePanasonic hotline