So then, a FOR/NEXT loop and a LOOKUP table is the most practical way to do this PBP?
for i = 1 to
LOOKUP 1, [$28,$9e,$50,$1b,$00,$00,$00,$85], sensor0
next i
So then, a FOR/NEXT loop and a LOOKUP table is the most practical way to do this PBP?
for i = 1 to
LOOKUP 1, [$28,$9e,$50,$1b,$00,$00,$00,$85], sensor0
next i
I'm not looking for a value, I'm just trying to load the array, so that I can subsequently refer to in my OWOUT command ("Sensor\8" indicated below).
OWOUT w1,1,[MatchROM,STR Sensor0\8,ReadScratch] 'send ID code
Last edited by J. Mark Wolf; - 1st November 2005 at 15:25.
I am finally able to fill my string array but it is UGLY! The following code works, but it barks!
for x = 0 to 3
lookup x,["0",".","0","0"],y
RevLevString(x) = y 'load string array with "0.00"
next x
'
for x = 0 to 19
lookup x,["O","C","T"," ","2","5",","," ","2","0","0","5"," ","9",":","2","5","p","m"," "],y
RevDateString(x) = y 'load str array with "OCT 25, 2005 9:25pm"
next x
A competing product accomplishes the same thing as follows:
RevLevString bytetable "0.96"
RevDateString bytetable "OCT 01, 2005 7:25pm "
Is there a more elegant way to fill a string array in PBP?
You can also load your string by storing it in Program Codespace (several threads on this forum on this topic), or by storing it in internal or external EEPROM. Again a small For/Next Loop will accomplish the loading.
Bookmarks