EasyManuals Logo

Omron NJ501-1500 User Manual

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

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ501-1500 and is the answer not in the manual?

Omron NJ501-1500 Specifications

General IconGeneral
BrandOmron
ModelNJ501-1500
CategoryController
LanguageEnglish

Related product manuals