SERIN hell no, it won't go
lee555
Posts: 1
I would like to send 3 or 4 values to my stamp (bs2)
sendings is not the problem, receiving is the problem
send in vb (
value1=x······· ( ASCII)
value2=190···· (0-200)
value3=195···· (0-200)
value4=116···· (0-200)
total_value as string· = value1 & value2 & ......
) ok
'
Main:
· SERIN 16,$4054,PAUSEit,500,PAUSEit,[noparse][[/noparse]DEC3 val2,DEC3 val3,DEC3 val4]
·· DEBUG Val2,Val3,Val4,":"
··· PAUSE 20
GoTo Main··
'
Main:
· SERIN 16,$4054,PAUSEit,500,PAUSEit,[noparse][[/noparse]STR mVal\7,DEC3 val3]
·· DEBUG mVal(0),mVal(1),mVal(2),mVal(3),mVal(4),mVal(5),DEC val3":"
·····(OK !··GOOD · GOOD )
········ val1 = (mVal(0) mVal(1) mVal(2))
········ val2 = (mVal(3) mVal(4) mVal(5))
··· DEBUG· val1,",",val2,",",val3,":" (·hell no)
··· PAUSE 20
GoTo Main
'
sendings is not the problem, receiving is the problem
send in vb (
value1=x······· ( ASCII)
value2=190···· (0-200)
value3=195···· (0-200)
value4=116···· (0-200)
total_value as string· = value1 & value2 & ......
) ok
'
Main:
· SERIN 16,$4054,PAUSEit,500,PAUSEit,[noparse][[/noparse]DEC3 val2,DEC3 val3,DEC3 val4]
·· DEBUG Val2,Val3,Val4,":"
··· PAUSE 20
GoTo Main··
'
Main:
· SERIN 16,$4054,PAUSEit,500,PAUSEit,[noparse][[/noparse]STR mVal\7,DEC3 val3]
·· DEBUG mVal(0),mVal(1),mVal(2),mVal(3),mVal(4),mVal(5),DEC val3":"
·····(OK !··GOOD · GOOD )
········ val1 = (mVal(0) mVal(1) mVal(2))
········ val2 = (mVal(3) mVal(4) mVal(5))
··· DEBUG· val1,",",val2,",",val3,":" (·hell no)
··· PAUSE 20
GoTo Main
'
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
SERIN 16, $4054, [noparse][[/noparse]Val1, Val2, Val3, Val4]
THEN, you can see them as:
SEROUT 16, $4054, [noparse][[/noparse]Val1, DEC Val2, DEC Val3, DEC Val4]
Where 'Val1' would be the "x" character, and the others would be converted into
their decimal equivalents -- Byte '190' becomes 3 string bytes "190".
This assumes you ARE sending them as bytes from your PC originally.
The "SERIN xxx,yyy,[noparse][[/noparse]DEC MyVal] reads a 'string' with a CR after it, converts it
to a decimal number, and puts the decimal number into MyVal.
You had the right idea, just the wrong order of implementation.
Oh, and what did you intend by "val1 = (x y z)"?· You've left out your operators, there.
http://www.parallax.com/dl/docs/cols/nv/vol3/col/nv89.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA