Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there any way to output Hex or Binary using MSComm?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Is there any way to output Hex or Binary using MSComm? I have tried, but can only sucessfully output in ascii. If I convert to hex (using Hex[])or binary first (using CByte[]), I get an 'invalid property value' error.

Or is there a better way to communicate to com ports using vb?
 
use a byte array to send your data.
ie.

Dim ByteArray(3) as Byte

ByteArray(0) = &H2
ByteArray(1) = &H6
ByteArray(2) = &HD
ByteArray(3) = &HA

Mscomm.Output = ByteArray()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top