EasyManua.ls Logo

Omron NJ501-1500

Omron NJ501-1500
990 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
2 Instruction Descriptions
2-574
NJ-series Instructions Reference Manual (W502)
DtToSec
The DtToSec instruction converts a date and time to the number of seconds from 00:00:00 on January
1, 1970.
The DtToSec instruction converts the date and time in In to the number of seconds from 00:00:00 on
January 1, 1970. The converted value is in seconds. The value is truncated below the seconds.
The following example is for when In is DT#1970-1-2-0:0:0.999999999.
[
Instruction Name FB/FUN Graphic expression ST expression
DtToSec Convert Date and
Time to Seconds
FUN Out:=DtToSec(In);
Variables
Name Meaning I/O Description Valid range Unit Default
In Date and
time
Input Date and time Depends on data type. Year, month,
day, hour,
minutes, sec-
onds
DT#197
0-1-1-
0:0:0
Out Seconds Output Number of seconds from
00:00:00 on January 1, 1970
0 to 18446744073 Seconds
---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In OK
Out OK
Function
(@)DtToSec
EN ENO
In Out
abc:=DtToSec(DT#1970-1-2-0:0:0.999999999);
DT#1970-1-2-0:0:0.999999999
LD
ST
abc
DtToSec
EN ENO
In
DT#1970-1-2-0:0:0.999999999
DT#1970-1-1-0:0:0.000000000
LINT#86400
In
Out=abc
s

Table of Contents

Related product manuals