CM11 Symbol and Macro Files

Symbol Files

Take a look at baseline.cm11. You'll see the lines "EXTDIM A1, A7" or something to that effect. This identifies modules A1 and A7 as LM14 modules. You can also use the symbol file to define aliases (i.e. the "ALIAS LIVINGROOM A1" line) so you don't have to remember that A1 is the livingroom light all the time. You could always use "LIVINGROOM", "LIVING", or "LIV" anytime instead of A1. "ON LIVING", for instance. Aliases are recursive as well, i.e. "ALIAS LIGHTS KITCHEN,LIVINGROOM" will translate "LIGHTS" to "A1,A4". There are many examples of this in baseline.cm11.

How do you load the symbol file every time? Either copy it to ~/.cm11-symbols if you are only doing immediate commands, or use the command line switch "-y" to load the symbol file, i.e.

cm11 -y symbols.cm11 -i "ON KITCHEN"

Example: Dawn Simulator

What you'll eventually want to do (most likely) is create some timer macros to do your dawn simulator. These can be downloaded to the cm11 with the command

cm11 -s -e dawn.cm11

The -s options syncs the CM11's clock with your system clock, then the -e option compiles and links the eprom image from the source/symbol file dawn.cm11, and then downloads it to the EPROM. This process creates the file ~/.cm11-symbols from dawn.cm11 so you don't have to recompile them every time, nor will you have to deal with specifying the symbol file with -y. And of course, you don't have to even have your computer connected to the CM11 after this point.

Here is an example dawn.cm11 I might create for doing a dawn simulation:

---------
# Sunrise Timer Macro
ALIAS SUN A1			# SUN is more friendly than a unit number
EXTDIM SUN			# The sun is an LM14

TIMER -MTWTF-			# Begin TIMER macro, Weekdays only
 START 7:00			# CM11 has concept of "START" and "STOP" timers
  NAME "First Stage"		# Helps in debugging later in cm11 -m mode
  EVENT DIMTO:90 SUN		# You can have more than one EVENT per macro
 ENDM				# Ends the "START" macro
 STOP 7:05			# Begins the "STOP" macro
  NAME "Second Stage"
  EVENT DIMTO:80 SUN
 ENDM
ENDT				# End timer macro definition

TIMER -MTWTF-			# Begin another timer macro for next 2 stages
 START 7:10
  NAME "Third Stage"
  EVENT DIMTO:70 SUN
 ENDM
 STOP 7:15			# Yes you can omit the Name field
  EVENT DIMTO:60 SUN
 ENDM
ENDT

# Yes, you can also arrange the commands any way you wish!
TIMER -MTWTF- START 7:20 EVENT DIMTO:50 SUN ENDM STOP 7:25 EVENT DIMTO:30 ENDM
ENDT

# Yes, you can OMIT the STOP macro if you don't need it.  It's more efficient
# to write them in pairs, though.  Uses less space in the EPROM.
TIMER -MTWTF- START 7:30 EVENT DIMTO:0 SUN ENDM ENDT

# On saturday or sunday, just turn the sucker on at 9 AM. :)
TIMER S-----S START 9:00 EVENT DIMTO:0 SUN ENDM ENDT

-------

Jan 30, 1998