11 - 46 11 - 46
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
DATE$
Function
DATE $
• Sets year, month, and day to the PLC CPU.
• Reads year, month, and day from the PLC CPU.
DATE$=” <year> / <month> / <day> [/ <day of the week> ]”
DATE$
year
• • • •
Specify a character string that represents the year
“1990” to “2089.”
month
• • • •
Specify a character string that represents the month
“01” to “12.”
day
• • • •
Specify a character string that represents the day
“01” to “31.”
Syntax
day of the week
• • • •
Specify a character string that represents the day of
the week.
DATE$=”1990/07/30/MON”
• • • •
Sets Monday July 30, 1990.
Examples
A$=DATE$
• • • •
Reads year, month, and day, then assigns them to
A$.
Description
• The DATE$ function sets or reads the date of the PLC CPU in which the communication
module is installed.
• Be sure to set the correct time by the TIME$ function before setting the year, month, and
day. The year, month, and day may not be set correctly depending on the time.
• Set the date using the following format:
DATE$=”year/month/date[/ the day of the week]”
1) Use ‘/’ (slash) to separate the year and month, month and day.
2) Specify the year by a four-digit Christian Era.
3) Attach 0 front of the numbers 1 through 9 (01 through 09) for the month and day
specifications.
4) Specify the day of the week as follows:
Monday: MON
Tuesday: TUE
Wednesday: WED
Thursday: THU
Friday: FRI
Saturday: SAT
Sunday: SUN
The day of the week may be omitted.
5) Year, month, and day cannot be set partially.
• When the date is read out, it is provided in the same format as that for setting the year,
month, and day.
• The DATE$ function is valid only when the PLC CPU has the clock function.
The PLC CPU without the clock function (A , A3H, A0J2(H)CPU) cannot
execute the DATE$ function.
• If the year's character string is not within the range of 1990 to 2089,
the normal processing is not performed.