Pulse output instructions
1242
Part IV Tool Instructions
Input variable Data type Function
bExecute
BOOL
A rising edge activates the function; evaluate the pulse output
channel control flag using PulseInfo_IsTargetValueMatchActive
(see page 1229)
iChannel INT
FP
: 0, 2
FP-X R: 0, 1
FP-X 16K C14T: 0, 1, 2
FP-X 32K C30T, C60T: 0, 1, 2, 3
FP0R: 0, 1, 2, 3
FP0: 0, 1
FP-e: 0, 1
pYOutput
POINTER
Pointer result obtained by GetPointer from a global variable that
supplies the channel number and output relay
diTargetValue
DINT
Specify a 32-bit data value for the target value within the
following range:
FP0, FP-e: -838808–+8388607
FP
, FP-X, FP0R: -2147483467–+2147483648
Output variable Data type Function
bError BOOL TRUE if the combination of Channel%d and pYOuput.iOffset
does not match a valid combination of channel number and
output relay as determined by the global variable
Data types
Example
In this example the function has been programmed in ladder diagram (LD) and structured text (ST).
(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.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
Body
Use PulseInfo_IsTargetValueMatchActive (see page 1229) to evaluate the channel iChannel1 is
active. If a rising edge is detected at bSet and if bIsActive is not TRUE, the instruction is
executed. The combination of channel number and output contact is validated in the global variable
g_bPulse_TargetValueMatch_Channel1_YA_Horn1_On. When pulse output on channel 1
reaches the target value diTargetValue0, output YA is set to TRUE.
LD