
13. Program Support Functions
13.5 User Macro Specifications
352
Examples of using time reading variable
(Example 1)
To read the current date (February 14, 2001) in common variable #100
#100 = #3011 ; (20010214 is inserted in #100)
(Example 2)
To write current time (18 hours, 13 minutes, 6 seconds) into system variable #3012
#3012 = 181306 ; (The command value cumulative time #2: time is set to 18:13:06.)
(Example 3)
By setting the following type of program, the machining start/end time
(year/month/date/hour/minute/second) can be viewed.
#100=#3011 ;
⇒
Machining start year/month/date
#101=#3012 ;
⇒
Machining start hour/minute/second
G28 X0 Y0 Z0 ;
G92 ;
G0 X50. ;
.
.
.
#102=#3011 ;
⇒
Machining end year/month/date
#103=#3012 ;
⇒
Machining end hour/minute/second
M30 ;
Restrictions and precautions for using time reading variable
(1) #3011 reads the date as an eight-digit value, so the difference of the two dates read in will not
be the difference of days.
(2) #3012 reads the time as a six-digit value, so the difference of the two times read in will not be
the difference of hours.