Trunctod - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

TruncTod

The TruncTod instruction truncates a TOD variable below the specified time unit.
Instruction
TruncTod
Truncate Time of
Day
Variables
Name
Meaning
In
Time of day
to truncate
Accuracy
Smallest
unit after
truncation
Out
Time of day
after
truncation
Bit strings
In
Accuracy
Out
Function
The TruncTod instruction truncates all digits below the smallest unit after truncation that is specified in
Accuracy from the time of day to truncate in In. The resulting time of day after truncation is stored in
time of day after truncation Out.
The data type of Accuracy is enumerated type _eSUBSEC. The meanings of the enumerators are as
follows:
Enumerator
_NANOSEC
_MICROSEC
_MILLISEC
_SEC
NY-series Instructions Reference Manual (W560)
Name
FB/FUN
FUN
I/O
Description
Time of day to truncate
The smallest time unit to
Input
leave after truncation
Output
Time of day after truncation
Refer to Function for the enumerators of enumeration type _eSUBSEC.
Meaning
Nanoseconds
Microseconds
Milliseconds
Seconds
Graphic expression
(@)TruncTod
EN
ENO
In
Accuracy
Valid range
Depends on data type.
_NANOSEC,
_MICROSEC,
_MILLISEC,
_SEC
Depends on data type.
Integers
2 Instruction Descriptions
ST expression
Out:=TruncTod(In,
Accuracy);
Out
Unit
Default
Hour, min-
TOD#0:0
utes, seconds
:0
---
_NANO-
SEC
Hour, min-
---
utes, seconds
Times, durations, dates,
and text strings
OK
OK
2
2-659

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents