PulseOutput_Jog_TargetValue_FB

JOG operation with target value

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.Pulses are output from the specified channel when the control flag for this channel is FALSE and the execution condition is TRUE. Pulse output stops when the target value is reached.

Parameters

Input

bExecute (BOOL)

Execution condition can be:

  • with edge trigger

  • permanent, if change of speed is required.

bAbsolute (BOOL)

F171_PulseOutput_Trapezoidal: Absolute value control = TRUE, Relative value control = FALSE

diInitialAndFinalSpeed (BOOL)

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

diTargetSpeed (DINT)

Target speed: Set this value according to the frequency range selected in PulseOutput_Channel_Configuration_DUT:

FPS, FP-X: 1–9800 (1.5Hz–9.8kHz)

48–100000 (48Hz–100kHz)

191–100000 (191–100kHz)

F171_PulseOutput_Trapezoidal: 1–50000 (1Hz–50kHz)

FP0, F168_PulseOutput_Trapezoidal: 40–5000 (40Hz–5kHz)

diAccelerationTime (DINT)

Acceleration time (F171_PulseOutput_Trapezoidal): 1ms–32760ms (up to the maximum speed)

diDecelerationTime (DINT)

Deceleration time (F171_PulseOutput_Trapezoidal): 1ms–32760ms (from the maximum speed)

diTargetValue (DINT)

Target value[pulses]: -2147483648–2147483647

dutChannelConfigurationPredefined system DUT for channel configuration: PulseOutput_Channel_Configuration_DUT

Output

bError (BOOL)

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

Additional error condition for FPS, FP-X:

TRUE if the applied channel is not enabled in the system registers or if bAbsolute is TRUE

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:F172_PulseOutput_Jog. 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.

POU body

	VAR
		PulseOutput_Jog_TargetValue: PulseOutput_Jog_TargetValue_FB;
		bExecute: BOOL:=FALSE;
		bAbsolute: BOOL:=FALSE;
		ChannelConfiguration_DUT: PulseOutput_Channel_Configuration_DUT;
		bError: BOOL:=FALSE;
		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 := 28 ;
        NETWORK_BODY
B(B_CONTACT,,bConfigureDUT,3,1,5,3,);
B(B_F,E_MOVE!,,14,0,20,4,,?DEN?D?AENO?C);
B(B_VARIN,,1,12,2,14,4,);
B(B_F,E_MOVE!,,14,8,20,12,,?DEN?D?AENO?C);
B(B_VARIN,,FALSE,12,10,14,12,);
B(B_VAROUT,,ChannelConfiguration_DUT.bOutput_Pulse_SignReverse,20,10,22,12,);
B(B_F,E_MOVE!,,14,12,20,16,,?DEN?D?AENO?C);
B(B_F,E_MOVE!,,14,4,20,8,,?DEN?D?AENO?C);
B(B_VARIN,,TRUE,12,6,14,8,);
B(B_VAROUT,,ChannelConfiguration_DUT.bOutput_Pulse_SignForward,20,6,22,8,);
B(B_VARIN,,TRUE,12,14,14,16,);
B(B_VAROUT,,ChannelConfiguration_DUT.iChannel,20,2,22,4,);
B(B_F,E_MOVE!,,14,16,20,20,,?DEN?D?AENO?C);
B(B_VARIN,,FALSE,12,18,14,20,);
B(B_VAROUT,,ChannelConfiguration_DUT.bDutyRatio25,20,18,22,20,);
B(B_VAROUT,,ChannelConfiguration_DUT.bAccelerationSteps60,20,14,22,16,);
B(B_VAROUT,,ChannelConfiguration_DUT.bFrequencyRange_191Hz_100kHz,20,22,22,24,);
B(B_VARIN,,TRUE,12,22,14,24,);
B(B_F,E_MOVE!,,14,20,20,24,,?DEN?D?AENO?C);
B(B_F,E_MOVE!,,14,24,20,28,,?DEN?D?AENO?C);
B(B_VARIN,,TRUE,12,26,14,28,);
B(B_VAROUT,,ChannelConfiguration_DUT.Jog_bNoCountingInCWCCWNoTargetValueMatch,20,26,22,28,);
L(5,2,14,2);
L(9,18,14,18);
L(9,14,14,14);
L(9,10,14,10);
L(9,6,14,6);
L(9,2,9,18);
L(9,18,9,22);
L(9,22,14,22);
L(9,22,9,26);
L(9,26,14,26);
L(1,2,3,2);
L(1,0,1,28);
        END_NETWORK_BODY
    END_NET_WORK
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 11 ;
        NETWORK_BODY
B(B_FB,PulseOutput_Jog_TargetValue_FB!,PulseOutput_Jog_TargetValue,13,1,29,11,,?BbExecute?BbAbsolute?BdiInitialAndFinalSpeed?BdiTargetSpeed?BdiAccelerationTime?BdiDecelerationTime?BdiTargetValue?BdutChannelConfiguration?AbError);
B(B_VARIN,,bExecute,11,2,13,4,);
B(B_VARIN,,bAbsolute,11,3,13,5,);
B(B_VARIN,,600,11,4,13,6,);
B(B_VARIN,,12000,11,5,13,7,);
B(B_VARIN,,300,11,6,13,8,);
B(B_VARIN,,600,11,7,13,9,);
B(B_VARIN,,50000,11,8,13,10,);
B(B_VARIN,,ChannelConfiguration_DUT,11,9,13,11,);
B(B_VAROUT,,bError,29,2,31,4,);
L(1,0,1,11);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST 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.Jog_bNoCountingInCWCCWNoTargetValueMatch := FALSE;
ChannelConfiguration_DUT.bExecuteInInterrupt := FALSE;
(* FB *)
PulseOutput_Jog_TargetValue(bExecute := bExecute,
            bAbsolute := bAbsolute,
            diInitialAndFinalSpeed := 600,
            diTargetSpeed := 12000,
            diAccelerationTime := 300,
            diDecelerationTime := 600,
            diTargetValue := 50000,
            dutChannelConfiguration := ChannelConfiguration_DUT,
            bError => bError);

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