by Navybluesubaru » Fri Jan 06, 2006 6:03 am
The thing that people are not realizing that I am going to have to overcome is that VB wants to output LITERAL STRINGS. When I tell it to output "0x1C" that is what it puts out. It does not know that I am referring to a HEX value, it just sees it as simple text. In a manner of speaking, VB is stupid in that respect. There is no way when outputting data via the mscomm control to specify what format the data you are passing is in, whether it be decimal, hex, or ascii.
There is a way to generally specify that something is hex, and that is like the following:
&H80
&H10
&HF0
By using "&H" before each part, it recognizes that as a genuine hex value.
I am going to have to something like this:
Comm.Output = &H80 & &H10 & &HF0 ........so forth so on
Instead of this:
Comm.Output = "0x80 0x10 0xF0 "..........so forth so on
In the example directly above, vb sees that as a literal string just as you see it, no specific type of value or special meaning.
The first example is how I am going to have to do it, and Im sure i'll figure it out soon enough.
The problem this whole time is really based on vb's inability to easily send data in special formats instead of plain strings.
Jeff