VB Problem
Newzed
Posts: 2,503
I have a small VB-related problem.· I've written a four-bank PS2P24 program for a customer.· The Stamp program is OK.· However, the customer is using a VB program to communicate with the Stamp.· At one point in the Stamp program, the Stamp must receive .......[noparse][[/noparse]22], where 22 is a relay number.· Not [noparse][[/noparse]dec 22] and not [noparse][[/noparse]"22"], just plain [noparse][[/noparse]22].· If I understand the customer correctly, he is telling me that VB an not send
[noparse][[/noparse]22], only [noparse][[/noparse]"22"].· Is this correct?· Is the anyway for VB to send the Stamp equivalent of:
serout 16, baud, [noparse][[/noparse]22]
Thanks
Sid
[noparse][[/noparse]22], only [noparse][[/noparse]"22"].· Is this correct?· Is the anyway for VB to send the Stamp equivalent of:
serout 16, baud, [noparse][[/noparse]22]
Thanks
Sid
Comments
For instance:
Open "COM1:9600,N,8,1" For Output As #1
Print #1, "[noparse][[/noparse]22]"; 'outputs four-byte string "[noparse][[/noparse]","2","2","]"
Print #1, Chr$(2); Chr$(2);'outputs two bytes 0x02, 0x02
Close #1
Sid
http://www.parallax.com/dl/docs/cols/nv/vol3/col/nv89.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
MSComm1.Output = Chr$(22)
Hope this helps...
Jared