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.

Solar Power

Solar Power

Start Saving On Your Electricity Bills Using The Power of the Sun And Other Natural Resources!

Get My Free Ebook


Post a comment