Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I read all bytes on comm port?

Hello!

I'm trying to read the bytes at my specified port.
I request "bytes at port" and the program tells me there are 12 bytes at port.
When I try to "Read" using VISA, I only get 8 bytes.
However, two of the end bytes are 0D and 0A.
How can I get all requested bytes into my program?
There is data after the hex inputs and I can't use it.
0 Kudos
Message 1 of 4
(3,341 Views)
Try to use the ActiveX control "MSComm" by Microsoft available in "Composants" of your software. This composant work fine. But you should arrive to use the VISA composant too. Read help with VISA and see if there are not bytes reserved to the end of communication or the return caracter like Chr$(13) and Chr$(10).
I wish i have help you.
0 Kudos
Message 2 of 4
(3,341 Views)
It would help if you mentioned what software you're using. In LabVIEW, if your'e using VISA Configure Serial Port, the default setting is to stop the read when the termination character is detected and the default termination character is x0A. To read past the termination character, all you have to do is disable the termination character. I'm sure there's a similar VISA setting when you use other programming languages.
Message 3 of 4
(3,341 Views)
Yep! That was the problem I was having.
I figured it out soon after posting.

Thank you!
0 Kudos
Message 4 of 4
(3,341 Views)