Whats the trick?
Guido
Posts: 195
Good Morning all,
What is the trick expressimg the following debug function to Stamp Plot Lite.
Trying to Plot neg Temperatures?
DEBUG REP "-"\TEMPF.BIT15,DEC1 TEMPF," F ",CR·
Thanks for the Help!!!!!!
What is the trick expressimg the following debug function to Stamp Plot Lite.
Trying to Plot neg Temperatures?
DEBUG REP "-"\TEMPF.BIT15,DEC1 TEMPF," F ",CR·
Thanks for the Help!!!!!!
Comments
... DEBUG REP "-"\tempF.BIT15,ABS DEC tempF/10,".",DEC1 ABS tempF," F ",CR·
Neither the /10 nor the DEC1 modifier will work when the number is negative (twos complement). If the temperature represents a whole number (twos complement, no decimal point implied), then the SDEC modifier will work:
... DEBUG SDEC tempF, "F",CR
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Thanks for the Help. I have been playing around with trying to save variable space and using Allan Lanes suggestion. Attached is the following program that indeed will to my knowledge work at least to -9 degrees F. At the Time I was asking for help I was not looking at Negative numbers...But since then I though it would be great to have three sensor monitoring three seperate locations and one could go down at least to -10F.
I tried your advice for displaying a negative Tempf for Stamp Plot lite, but would not work...Do you have any other suggestions?
DEBUG REP "-"\tempF.BIT15,ABS DEC tempF/10,".",DEC1 ABS tempF," F ",CR
...ust to be sure that the values are good? If it works on your debug screen, I don't know why it would not work with Stamp Plot Lite.
It should work down to -40 degrees, the limit of the sensor chip.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Again Thank you for all the help. I am actually slowly learning what I am doing. Yes to you question, it works perfectly in the debug screen, but will not plot on Stamp Plot Lite. It will display the correct reading in the Message window but will only plot if you use something like this:
DEBUG TEMPF,CR
I am sure it has to do with the negative sign. I was thinking that there may be a trick to have Stamp Plot Lite accept and plot as a negative....·Any Ideas or is this just the Basic Stamp unable to handle negative factors with Stamp Plot Lite.
Guido
If you have Excel, maybe you could use that to chart your data.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com