2 Instruction Descriptions
2-572
NJ-series Instructions Reference Manual (W502)
GetTime
The GetTime instruction reads the current time.
The GetTime instruction reads the current time. The current time of day is the time for the set time zone
(not Greenwich mean time (GMT)).
The following figure shows a programming example. The current time is assigned to variable abc.
Instruction Name FB/FUN Graphic expression ST expression
GetTime Get Time of Day FUN Out:=GetTime();
Variables
Name Meaning I/O Description Valid range Unit Default
Out Current
time
Output Current time Depends on data type. Year, month,
day, hour,
minutes, sec-
onds
---
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
Out OK
Function
(@)GetTime
EN ENO
Out
abc:=GetTime();
LD ST
GetTime
abc
EN ENO