0 BEGIN PGM 8180_EN MM 1 ;NC program for displaying the current 2 ;date and time in a pop-up window 3 ;on the screen. 4 ;on older controls this cannot yet be 5 ;implemented with a fixed syntax. 6 ;Therefore, the the control first reads the 7 ;current systemtime in seconds 8 ;since 00:00 of 1/1/1970 from this program 9 ;and saves it on the Q0 parameter. Then 10 ;the control calls a program in which it 11 ;calculates the current date and time from 12 ;this value. The control stores the individual 13 ;values in the parameters Q1 to Q6. 14 ;It then uses these values in the program 15 ;in order to display the values in a 16 ;mask on the screen by using an FN16 function. 17 ;The FN16 function and the mask file can 18 ;also be used to write the values to a text 19 ;log. 20 ; 21 ;Function for reading the current system time 22 FN 18: SYSREAD Q0 = ID320 NR1 IDX1 23 ; 24 ;Call the program for calculating the date 25 ;and time 26 CALL PGM 81801_en.h 27 ; 28 ;Function for displaying the calculated 29 ;values in the format of the Date.a mask 30 ;file on the screen 31 FN 16: F-PRINT Date.a / screen: 32 ; 33 ;End of program 34 END PGM 8180_EN MM