Msg: 3 *Conference*
05-14-91 20:12:19
From: TED SWIFT
To : ALL
Subj: M200 BASIC POWER FUNCTION
Boy, am I having fun getting to know my Model 200! I had a M100, but saw an ad for a TPDD1 disk drive (which I was looking for)...connected to a M200, printer, wand, and docs. All I really *needed* was the drive, but I ended up swapping the M100 and an undisclosed amount of cash for the whole shebang. It's neat to have the extra software in ROM (e.g., Multiplan and (file) kill in the main menu. But I have a problem that y'all can help me with. In exchange for help I will write (am writing) all kinds of neat software which I will upload. I want to use the M200 for data collection (maybe I should go to work for Dr. Allen? :-) ), and I was delighted to stumble on the POWER command in Basic. If there are any of you out there who don't know, if given a numeric expression: POWER numeric expression it sets the dwell before the M200 goes to sleep. Given arguments for time and date POWER "hh:mm:ss","mm/dd/yy", BASIC program Power will tell the clock chip to set an alarm to wake everyone up at the given time and date, and will do some cool things: * If the power is on and your are at the main menu, Basic beeps and runs the named program. * If the power is on and you're not in the main menu, Basic beeps and prompts you to run the program. * If the power is off and was turned off manually, Basic beeps, stokes the boilers, and runs the program. * If the power is off and was turned off automatically, Basic beeps, turns power on, then prompts you to run the program. If you don't do anything for 40 seconds, Basic shuts down the show again. I want the M200 to wake up every 5 minutes, do some stuff like read some voltages from the ADC-812 board (which I bought from Rural Engineering, a pretty spiffy little product in itself), store them in a file, and go back to sleep to save power. But the POWER function doesn't seem to like a variable in the argument for the wake up call: I get a syntax error when I do this: 1 'program foo.ba to try out the power function 10 FOR I = 35 TO 45 STEP 5 'try it every 5 minutes 20 POWER "19:I:00", "05/14/91", FOO.BA 'this being 7:30 on tuesday 14 May 30 PRINT "GOOD MORNING" 40 POWER 10 'go back to sleep in a minute 50 NEXT I Now, ignoring the probably errors in the For-Next loop and other random weirdness, I get a syntax error on line 20. Adding confusion to injury, if I replace the I with something reasonable, like "POWER "19:45:00",etc., I get a type mismatch error. Grrr!. Any thoughts? Thanks