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-580
NJ-series Instructions Reference Manual (W502)
SecToDate
The SecToDate instruction converts the number of seconds from 00:00:00 to a date.
The SecToDate instruction converts the number of seconds from 00:00:00 in In to a date. The value is
truncated below date.
The following example is for when In is LINT#86400.
[
Use the DateToSec instruction (page 2-576) to convert a date to the number of seconds from 00:00:00
on January 1,1970.
Instruction Name FB/FUN Graphic expression ST expression
SecToDate Convert Seconds to
Date
FUN Out:=SecToDate(In);
Variables
Name Meaning I/O Description Valid range Unit Default
In Seconds Input Number of seconds from
00:00:00
0 to 18446744073 Seconds 0
Out Date Output Date Depends on data type. Year, month,
day
---
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
Additional Information
(@)SecToDate
EN ENO
In Out
abc:=SecToDate(LINT#86400);
LINT#86400
LD ST
abc
SecToDate
EN ENO
In
+
D#1970-1-1
LINT#86400
D#1970-1-2
s
In
Out=abc

Table of Contents

Related product manuals