correpaco
Posts: 2
Joined: Wed Aug 19, 2009 5:33 pm
Location: Spain

ploblem with bytes 127 to 255 Vport activex

Thu Aug 20, 2009 2:44 pm

[?]Hi:
Above all, sorry by my English

I have a problem with Vport and bytes whose value is greater 9F hex (decimal 127)
Using any terminal application
eg Windows HyperTerminal and examples of the SDK version 201g over Vb (activex).
When Vport Intercepts characters(written in hyperterminal) from 0 (0x00) to 126 (0x9E) are interpreted correctly, but when i write a Byte whose value is greater than 126 (0x9E), Vport interpret it as the character "?" (63 or 0x3F).

Converting the string into an array of bytes:
I only get the value at 63
the position of the corresponding character string "?" and not the correct byte written in hyperterminal

I needed use all bytes (0 to 255)
I use this code for binary mode :
"...Private Sub objVPort_OnDataFromPort(Data As Variant)

Dim arr() As Byte

arr = StrConv(Data, vbFromUnicode)
Debug.Print arr(0)
If IsNull(Data) Then
txtDataFromPort.Text = "Timeout"

Else
txtDataFromPort.Text = arr


End If
End Sub...."
wen write in hyperterminal byte 128 (0xA0)
data =?
arr(0) = 63

In string mode no convert data to arr.

What am I doing wrong?

User avatar
johan
GpsGate
Posts: 14372
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: ploblem with bytes 127 to 255 Vport activex

Thu Aug 20, 2009 4:37 pm

Please read this:
http://franson.com/forum/topic.asp?TOPIC_ID=13

Regards,
Johan

Franson Support

correpaco
Posts: 2
Joined: Wed Aug 19, 2009 5:33 pm
Location: Spain

RE: ploblem with bytes 127 to 255 Vport activex

Thu Aug 20, 2009 9:46 pm

]Ok thanks
I created a SerialXp.Port and use their properties
it is well [:)]

Return to “SerialTools”