Pulse output instructions
1031
Part III FP Instructions
other high-speed counter instruction with output control (F166_PulseOutput_Set
or F167_PulseOutput_Reset) using the same channel can be executed as long
as this flag is TRUE.
This instruction is available for all pulse output instructions except
F173_PulseOutput_PWM (see page 1066) and can be executed before or after
executio
n of a pulse output instruction.
The duplicate use of an external output relay in other instructions (OUT, SET,
RST, KEEP and other F instructions) is not verified by FPWIN Pro and will not be
detected.
To cancel execution of a pulse output instruction, set bit 2 of the data register
storing the pulse output control code (sys_wHscOrPulseControlCode) to TRUE.
The pulse output control flag will then change to FALSE. To reenable execution
of the instruction, reset bit 2 to FALSE. However, pulse output will continue.
If both the main program and the interrupt program contain code for the same
channel, make sure both are not executed simultaneously.
We strongly recommend that you incorporate a forced stop (see page 1021)
option in you
r positioning p
rogram.
The status of the high-speed counter control flag or pulse output control flag may
change while a scan is being carried out. For example, if the flag is used more
than once as an input condition, different statuses may exist within one scan. To
ensure proper execution of the program, the status of the special internal relay
should be copied to a variable at the beginning of the program.
PLC types Availability of F167_PulseOutput_Reset (see page 1322)
Variable Data type Function
n_diPulseOutputChannel DINT Pulse output channel:
0–3
s_diTargetValue DINT specify a 32-bit data value for the target value within the following range:
-2147483467–+2147483648
d_Y BOOL output which turns to FALSE when the elapsed value matches the target
value: Y0–Y1F
For Relay T/C Register Constant
n_diPulseOutputChannel - - - - - - - - - dec. or hex.
s_diTargetValue DWX DWY DWR - DSV DEV DDT - - -
d_Y - Y - - - - - - - -
No. IEC address Set If
R9007 %MX0.900.7 ON
R9008 %MX0.900.8 ON
channel number or values of the data table are outside the
permissible range
pulse output has not been set in the system registers
Data types
Operands
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.