Update Values

StampPlot keeps track of all kinds of different values such as earlier when (PTIME) was used for the current plot time, and (BIT0) was used for the last digital bit 0 received. These are termed Macro Math Values.

Another is (AINVAL0) to (AINVAL99) for a set of analog values received. We can set the meter to automatically use the value when updated by setting an Update value: !O Meter1.U=(AINVAL0)

Now, when the instruction to update is issued, the meter will be updated with this value. !O Update

'Plot with meter and update value

PAUSE 1000

'Plot with meter and update value

PAUSE 1000

DEBUG

CR,"!POBJ Clear",

CR

DEBUG

"!NEWP",CR

DEBUG

"!PLOT ON",CR

DEBUG

"@TEXT 35a, 102a,

2,

(BLUE),

StampPlot Meters!"

, CR

' Size the plot DEBUG "!PPER 70,80",CR

' Size the plot DEBUG "!PPER 70,80",CR

' Create meter

DEBUG "!POBJ oMeter.meter1=75,50,,,0,255,25,200",CR

' Set an update value

DEBUG "!O Meter1.U=(AINVAL0)",CR

x VAR Byte x = 100

DO

RANDOM x

' Plot value

DEBUG DEC x,CR

' Update all plot

object controls

DEBUG "!O Update",

, CR

PAUSE 500

LOOP

While this doesn't seem to save a lot, if you had 3 meters, text boxes, and other various controls, you would be able to update them all at once using !O Update.

Getting Started With Solar

Getting Started With Solar

Do we really want the one thing that gives us its resources unconditionally to suffer even more than it is suffering now? Nature, is a part of our being from the earliest human days. We respect Nature and it gives us its bounty, but in the recent past greedy money hungry corporations have made us all so destructive, so wasteful.

Get My Free Ebook


Post a comment