PulseOutput_Linear_FB

线性插补

根据功能块和指定DUT中的参数从两个通道输出脉冲,从而使目标位置路径形成直线。当指定通道的控制标志为FALSE且执行条件为TRUE时,从该通道输出脉冲。

参数

输入

bExecute (BOOL)

执行条件可以是:

  • 通过边沿触发器

  • 永久,如果需要改变速度。

bAbsolute (BOOL)

绝对值控制 = TRUE相对值控制 = FALSE

diInitialAndFinalSpeed (DINT)

初始和最终速度合成速度 = 1~50000 (1Hz~50kHz)

diTargetSpeed (DINT)

目标速度合成速度 = 1~50000 (1Hz~50kHz)

diAccelerationTime (DINT)

加速/减速时间 (FPS, FP-X): 0ms~32767ms

加速时间 (F171_PulseOutput_Trapezoidal): 0ms~32767ms

diDecelerationTime (DINT)

减速时间 (F171_PulseOutput_Trapezoidal): 0ms~32767ms

diTargetValue_X (DINT)

X轴目标值[脉冲]-8388608~8388607

diTargetValue_Y (DINT)

Y轴目标值[脉冲]-8388608~8388607

dutChannelConfiguration_X_Y用于通道配置的预定义系统DUT:PulseOutput_Channel_Configuration_DUT对于插补,通道0和1或通道2和3成对使用。只能指定0或2(对于C14T:仅限0)。

输出

bError (BOOL)

如果应用的输入值无效,则为TRUE。功能块停止执行。

仅当全局常量MC_PulseOutput_Library_Basic_bCheckInputs设置为TRUE时进行设置。

riInitialAndFinalSpeed_X (REAL)

X轴初始和最终速度[Hz]

riTargetSpeed_X (REAL)

X轴目标速度[Hz]

riInitialAndFinalSpeed_Y (REAL)

Y轴初始和最终速度[Hz]

riTargetSpeed_Y (REAL)

Y轴目标速度[Hz]

dutAdditionalOutputsFPS, FP-X: PulseOutput_Linear_AdditionalOutputs_DUT

标注

这种非内联指令是脉冲输出工具指令的一部分。有关内部使用指令的详细描述,请参阅:F175_PulseOutput_Linear

使用PulseInfo_IsActive检查所选通道的控制标志是否为FALSE

示例

DUT

使用数据单元类型(DUT),可以定义由其他数据类型组成的数据单元类型。DUT首先在DUT池中定义,然后像全局变量列表或POU头中的标准数据类型(BOOLINT等)一样进行处理。

POU头

所有用于编程此函数的输入和输出变量已在POU头中声明。所有编程语言使用相同的POU头。

	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
    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本体

(* 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);

最后更新日期: 此页面上的反馈松下热线