Pulse output instructions
1234
Part IV Tool Instructions
PulseInfo_ReadElapsed
Value
Reads elapsed value from pulse output channel
See also:
Pulse output tool instructions in the online help
PulseInfo_IsElapsedValueReset (see page 1226)
PulseCo
ntrol_ElapsedValueContinue (see page 1204)
PulseCo
ntrol_WriteElapsedValue (see page 1216)
PLC types see page 1329
Variable Data type Function
iChannel INT Pulse output channel:
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
Output variable DINT Stores the elapsed value from the channel specified by iChannel
Description
This instruction reads the elapsed value from the pulse output channel specified by iChannel. Use
PulseControl_WriteElapsedValue (see page 1216) to modify the elapsed value and
PulseCon
trol_ElapsedValueReset (see page 1206) to set the elapsed value to 0.
Data types
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.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
Body
LD
ST
When programming with structured text, enter the following:
if (bRead) then
diElapsedValue := PulseInfo_ReadElapsedValue(iChannel := iChannel);
end_if;