BASICX to SitePlayer

Started by "wimn.rm" January 14, 2007
Hi, what do I wrong in converting a string of 6 chars to 6 bytes
for a data string to adres 0 in my SitePlayer?

dim pascal as single
dim gpascal as single
dim spascal as string * 10
dim aspbyte as string * 1
dim dspbyte as byte
dim sspbyte as single
dim ok as boolean

dspbyte = &H85 ' 80=write 6=lengte-1 single byte address
call putQueue(ocom3,dspbyte,1)
dspbyte = &H00 'Adres 0
call putQueue(ocom3,dspbyte,1)

'Now prepare the 6 data bytes.

for k = 1 to 6
aspbyte = mid(spascal,k,1) 'spascal contains "1020.6"
call values(aspbyte,sspbyte,ok)
dspbyte = cbyte(sspbyte)
'Next line just for test if I see the value of 666666 on
'the SP webpage. This works. I see 666666

'dspbyte = &H36

call putQueue(ocom3,dspbyte,1)

Found the solution myself in the mean time by using the wonderful
PutQueue mechanism!

It's realy so easy toconvert and switch between the different types.

Sorry bothering you......