High-speed counter instructions
1164
Part IV Tool Instructions
HscInfo_ReadElapsed
Value
Reads elapsed value from high-speed counter channel
See also:
Tool instructions: overview of high-speed counter instructions
HscControl_WriteElapsedValue (see page 1152)
HscControl_ElapsedValu
eReset (see page 1145)
HscControl_ElapsedValueCo
ntinue (see page 1143)
FP instructions
Writing and reading the elapsed value (see page 894)
PLC types see page 1327
Variable Data type Function
iChannel INT High-speed counter 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 high-speed counter channel specified by
iChannel.
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 (bReadElapsedValue) then
diElapsedValue := HscInfo_ReadElapsedValue(iChannel := iChannel);
end_if;