Pulse output instructions
1069
Part III FP Instructions
No. IEC address Set If
R9007 %MX0.900.7 permanently
R9008 %MX0.900.8 for an instant
channel number or values of the data table are outside the
permissible range (when executing the instruction for the first
time)
FP0R/FP-X: pulse output has not been set in the system
registers
END_IF;
Error flags
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.
GVL
In the global variable list, you define variables that can be accessed by all POUs in the project.
DUT
The DUT F173_PulseOutput_PWM_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 (X6_bEnablePWM) THEN
dutPWMControl.iPulseWidthModulationDuty:=iPulseWidthModulationDuty;
END_IF;
IF (X6_bEnablePWM) THEN
F173_PulseOutput_PWM(s_dutDataTable := dutPWMControl,
n_iPulseOutputChannel := 2);