Timetosec - Omron NJ501-1500 Reference Manual

Machine automation controller nj-series
Hide thumbs Also See for NJ501-1500:
Table of Contents

Advertisement

2 Instruction Descriptions

TimeToSec

The TimeToSec instruction converts a time to seconds.
Instruction
TimeToSec
Convert Time to
Seconds
Variables
Name
Meaning
In
Time
Out
Seconds
Bit strings
In
Out
Function
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.
LD
T#1d1h1m1.999999999s
In
T#1d1h1m1.999999999s
Additional Information
Use the SecToTime instruction (page 2-586) to convert seconds to a time.
Precautions for Correct Use
In is in nanoseconds. Out is in seconds.
2-584
Name
FB/FUN
FUN
I/O
Description
Input
Time
Output
Seconds
OK
TimeToSec
EN
ENO
In
Seconds
Out=abc
Graphic expression
(@)TimeToSec
EN
ENO
In
Valid range
Depends on data type.
−9223372036 to
9223372036
Integers
ST
abc:=TimeToSec(T#1d1h1m1.999999999s);
abc
LINT#90061 s
[
NJ-series Instructions Reference Manual (W502)
ST expression
Out:=TimeToSec(In);
Out
Unit
Default
ns
T#0s
Seconds
---
Times, durations,
dates, and text strings
OK

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents