Pulse output instructions
1051
Part III FP Instructions
Example
In this example the function has been programmed in ladder diagram (LD) and structured text (ST).
The same POU header is used for all programming languages.
DUT
The DUT F171_PulseOutput_Trapezoidal_DUT is predefined in the FP Library.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
LD
ST
When programming with structured text, enter the following:
IF DF(bMotorSwitch) THEN
dutTrapez.diInitialAndFinalSpeed:=diInitialSpeed;
dutTrapez.diTargetSpeed:=diTargetSpeed;
dutTrapez.diAccelerationDecelerationTime:=diAccelerationTime;
dutTrapez.diDeviationCounterClearSignalOutputTime:=10;
END_IF;
IF DF(bMotorSwitch) THEN
F171_PulseOutput_Trapezoidal(s_dutDataTable := dutTrapez,
n_iPulseOutputChannel := 0);
END_IF;