Solved

Com Port Programming

Posted on 2004-09-16
4
191 Views
Last Modified: 2010-04-23
Hey All,

I am trying to write some code to communicate with a piece of hardware that accepts hex values.

How will i format a string like "AA AA AA AA AA AA" so that it is hex when I send it to the port.

I will be using the serial port component in VB.net.

What I have so far is something liek this

x(0) = &HAA
        x(1) = &HE
        x(2) = &H1
        x(3) = &H0
        x(4) = &H0
        x(5) = &H3
        x(6) = &H52
        x(7) = &H45
        x(8) = &H4C
        x(9) = &H41
        x(10) = &H59
        x(11) = &H23
        x(12) = &H31
        x(13) = &H20
        x(14) = &H3
        x(15) = &HD4

But it doesnt seem to work.  

Any help would be appreciated.
0
Comment
Question by:dspencerpci
4 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 125 total points
ID: 12076849
There is a free community version of Sax.NET in the VB.NET Resource Kit for serial communication:

MSDN:  The Visual Basic .NET Resource Kit
http://msdn.microsoft.com/vbasic/vbrkit/default.aspx

Bob
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now