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-584
NJ-series Instructions Reference Manual (W502)
TimeToSec
The TimeToSec instruction converts a time to seconds.
The TimeToSec instruction converts the time in In to seconds. The value is truncated below the sec-
onds.
The following example is for when In is T#1d1h1m1.999999999s.
[
Use the SecToTime instruction (page 2-586) to convert seconds to a time.
In is in nanoseconds. Out is in seconds.
Instruction Name FB/FUN Graphic expression ST expression
TimeToSec Convert Time to
Seconds
FUN Out:=TimeToSec(In);
Variables
Name Meaning I/O Description Valid range Unit Default
In Time Input Time Depends on data type. ns T#0s
Out Seconds Output Seconds 9223372036 to
9223372036
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
Precautions for Correct Use
(@)TimeToSec
EN ENO
In Out
abc:=TimeToSec(T#1d1h1m1.999999999s);
T#1d1h1m1.999999999s
LD
ST
abc
TimeToSec
EN ENO
In
Out=abc
In
Seconds
LINT#90061
s
T#1d1h1m1.999999999s

Table of Contents

Related product manuals