2 Instruction Descriptions
2-570
NJ-series Instructions Reference Manual (W502)
SetTime
The SetTime instruction sets the system time.
The SetTime instruction sets the system time to date and time In.
The following programming example is for when In is DT#1970-1-7:23:59:59.999999999.
Instruction Name FB/FUN Graphic expression ST expression
SetTime Set Time FUN SetTime(In);
Variables
Name Meaning I/O Description Valid range Unit Default
In Time data Input Current time to set system
time
Depends on data type. Year, month,
day, hour,
minutes, sec-
onds
DT#197
0-1-1-
0:0:0
Out Return
value
Output Always TRUE TRUE only
--- ---
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
(@)SetTime
EN ENO
In Out
SetTime(DT#1970-1-7-23:59:59.999999999);
LD
ST
DT#1970-1-7-23:59:59.999999999
SetTime
EN ENO
In