The snapshot is a plot of eight DS1820 temperature
thermometers hooked up to David Anderson’s ( www.phanderson.com
) serial temperature device. He sells several different kinds now, this was one
of his early ones. Quite frankly I had given up on having any kind of graphic
display after looking over some programming languages. I have used Quickbasic,
QuickC and RapidQ but the effort of learning to program for a modern windows
operating system was more than I wanted to expend. I just wanted to make a
reasonably simple plot. Then I read about StampPlot on David Anderson’s web
site (a great site) and gave it try. I was so impressed that ten minutes later I
paid for a registered copy.
Anyways… The DS1820’s are hooked up to my coldframe
(really a hotframe now, growing tomatoes six weeks ahead of season), my freezer
(you know how important that is if you have ever lost the entire contents of one
because you had no alarm system on it), my computer room and various other odds
and ends. Note that the min/max temps are not working as well as could be, I don’t
think they are being reset properly. Ah well, it’s not a priority right now.
Getting it on the web is my priority. This way I can check on my tomatoes while
I am at work. It’s not on the web although I have set up snapshot to capture
at every update, not every ten minutes as I was more concerned with getting the
point count down, it will be something I’ll work on soon.
Mike
INIT:
!JPGQ 50
!PORT COM 2,2400,8,N,1,2000, 0, 0, 0
!RSET
!NPSU OFF
!NEWP
!DEFS (ME)
!USED ON
!USEA OFF
!PARS ON
!PCHR
!INTT 30
!USET ON
!USEC ON
!ASNP ON
!AUTT
!QSIZ 2000
!SPAN -25, 45
!TMAX 86400
!XLBL Time
!RTIM ON
!TDIV 3600
!PNTS 50000
!MAXT
!TITL
!GRID 24,70
!DISP D9 G2 A0 S0 B15 R
!MACR .DCONST
!RSET
!CONN ON
!PLOT ON
ENDMAC
DCONST:
DEFAULT:
ENDMAC
TIMER:
!PLOT ON
!LOGD (PARSE1),(PARSE2),(PARSE3),(PARSE4),(PARSE5),(PARSE6),(PARSE7),(PARSE0)
~FREC 0a,101a,79a,113a,15
~TEXT 1a,111a,1,1,MIN:(AINMIN1)
~TEXT 1a,107a,1,1,COLDFRAME
~TEXT 1a,103a,1,1,MAX:(AINMAX1)
~TEXT 13a,111a,1,2,MIN:(AINMIN2)
~TEXT 13a,107a,1,2,CLOCHE
~TEXT 13a,103a,1,2,MAX:(AINMAX2)
~TEXT 25a,111a,1,3,MIN:(AINMIN3)
~TEXT 25a,107a,1,3,GROUND
~TEXT 25a,103a,1,3,MAX:(AINMAX3)
~TEXT 37a,111a,1,4,MIN:(AINMIN4)
~TEXT 37a,107a,1,4,SHED
~TEXT 37a,103a,1,4,MAX:(AINMAX4)
~TEXT 49a,111a,1,5,MIN:(AINMIN5)
~TEXT 49a,107a,1,5,OUTSIDE
~TEXT 49a,103a,1,5,MAX:(AINMAX5)
~TEXT 61a,111a,1,6,MIN:(AINMIN6)
~TEXT 61a,107a,1,6,COMPROOM
~TEXT 61a,103a,1,6,MAX:(AINMAX6)
~TEXT 73a,111a,1,7,MIN:(AINMIN7)
~TEXT 73a,107a,1,7,MOVEABLE
~TEXT 73a,103a,1,7,MAX:(AINMAX7)
~TEXT 85a,111a,1,0,MIN:(AINMIN0)
~TEXT 85a,107a,1,0,FREEZER
~TEXT 85a,103a,1,0,MAX:(AINMAX0)
!APDT OFF
!SNAP c:\sendtoweb\temps
!APDT ON
!SEND A
ENDMAC
DBLCLICK:
ENDMAC
Click to enlarge
Notes from SelmaWare:
- Great example using drawing instructions and a non-standard
source. The data acquisition system sent data with space-delimited
analog data. The !PCHR and !PARS ON were used to define this format.
- The text drawing could have been simplified slightly using
a '\n' in the code for a new line such as:
~TEXT 61a,107a,1,6,COMPROOM\nMAX:(AINMAX6)\nMIN:(AINMIN7)
for
~TEXT 61a,107a,1,6,COMPROOM
~TEXT 61a,103a,1,6,MAX:(AINMAX6)
~TEXT 73a,111a,1,7,MIN:(AINMIN7)
- Thanks Mike for the feedback and great example!
|