High-speed counter instructions
1153
Part IV Tool Instructions
HscControl_Write
ElapsedValue
Writes elapsed value into high-speed counter channel
See also:
Tool instructions: overview of high-speed counter instructions
HscControl_ElapsedValueReset (see page 1145)
HscInfo_Rea
dElapsedValue (see page 1163)
HscInfo_IsElapsedVal
ueReset (see page 1160)
FP instructions
Writing and reading the elapsed value (see page 894)
To add an enable inp
ut and enable output to the instruction, select [With EN/ENO] from the
"Instructions" pane (LD, FBD or IL editor). To reuse an instruction select "Recently used" from the
context menu or press <Ctrl>+<Shift>+<v> in the programming window.
PLC types see page 1327
Variable Data type Function
diElapsedValue DINT Elapsed value to be written into the channel specified by
iChannel
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
Description
This instruction writes an elapsed value into 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
When the variable bWrite changes from FALSE to TRUE, the elapsed value specified by
diElapsedValue is written into the channel specified by iChannel.