The Log program starts the Cascade TextLogger with this configuration file (tl.cfg), which contains commands to be executed at start-up. The syntax for the file, as for all of the Cascade TextLogger commands, is Lisp syntax, which encloses the command name and its arguments (if any) within a set of parentheses. Comments can be included by putting the semi-colon symbol (;) at the beginning of a line. We put two semi-colons simply to make it easier to distinguish comments from the other lines of the file.
The Cascade TextLogger commands used here are: usegmt, time, timestamp, collect, empty, tolerance, log, disable, cache, group, file, and output, For more information on these commands, please refer to the Cascade TextLogger manual.
;; Cascade TextLogger Configuration File for Cogent Tools Demo
;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;; BASIC SET-UP
;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;; Set the time to local time, not Greenwich Mean Time.
(usegmt f)
;; Set the time output to system time, in seconds since Jan 1, 1970
;; and microseconds, displayed to 6 decimal places.
(time "%Z.%.6U")
;; Set the time resolution to the last point logged.
(timestamp last)
;; Collect data from any new point logged, fill in other values.
(collect fill)
;; Define a string to be output when no data is logged for a point.
(empty " * ")
;; Define the amount of time between values that can elapse before
;; values are considered to be unrelated and must be logged on
;; separate lines in the output.
(tolerance 0 10000000)
;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;; LOGS
;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;; For the 'Plot All' display, and the '/tmp/cogentdemo/tloutput.dat'
;; file. Disable the log for the time being and turn off caching
;; so that values get written immediately.
(log tldemoall "%t %.5f %.5f %.5f" SP_001 MV_001 PV_001)
(disable tldemoall)
(cache n tldemoall)
;; For the 'Plot Recent' display, and the '/tmp/cogentdemo/tlrecent.dat'
;; file. Again, disable the log for the time being and turn off
;; caching so that values get written immediately.
(log tldemorecent "%t %.5f %.5f %.5f" SP_001 MV_001 PV_001)
(disable tldemorecent)
(cache n tldemorecent)
;; For STDOUT.
(log tldemostdout "%t %.5f %.5f %.5f" SP_001 MV_001 PV_001)
(disable tldemostdout)
;; Make a group to permit sending commands to several logs at once.
(group tldemoboth tldemorecent tldemoall)
;; Assign file names to logs.
(file /tmp/cogentdemo/tloutput.dat tldemoall)
(file /tmp/cogentdemo/tlrecent.dat tldemorecent)
(file stdout tldemostdout)
;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;; OUTPUT TITLES
;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(output stdout "Started Cascade TextLogger")
(output tldemoall "#---------- Cascade TextLogger Output ---------#")
(output tldemoall "# #")
(output tldemoall "# Set point, Control output and Process #")
(output tldemoall "# variables for the Cogent Tools Demo #")
(output tldemoall "# %M %.2j, %Y at %02h:%02n #")
(output tldemoall "# #")
(output tldemoall "# Time SP MV PV #")
(output tldemoall "# ------ ---- ---- ---- #")
(output stdout "#---------- Cascade TextLogger Output ---------#")
(output stdout "# #")
(output stdout "# Set point, Control output and Process #")
(output stdout "# variables for the Cogent Tools Demo #")
(output stdout "# %M %.2j, %Y at %02h:%02n #")
(output stdout "# #")
(output stdout "# Time SP MV PV #")
(output stdout "# ------ ---- ---- ---- #")| Prev | Home | Next |
| Photon: Log callbacks - start_logging | Up | Common: Starting and Stopping the Cascade TextLogger - log_toggle |