Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Read doesn't read all available characters

Solved!
Go to solution

Hi,

   I am trying to communicate with a Magellan/Ion controller using RS 485. I am running an external device monitor with shows me that 7 bytes are sent from the controller to labview, I am using the basic VISA Write then wait a few milliseconds and then VISA Read  as well as using the property of bytes at port to tell the VISA read how many bytes to read. When I look at NI Spy I can see that the VISA read function is told to read 7 bytes from the right COM address but only six bytes are read. I have changed the delay before read time from 0 to so long that it doesn't read anything and I still have the problem. Is there a timeout or maxium number of bytes that the VISA read has internally that I am running into or is there some other fix to my problem?

0 Kudos
Message 1 of 6
(3,597 Views)

Do you have endcharacter dtection enbled and is your endcharacter lost or some other character?

greetings from the Netherlands
0 Kudos
Message 2 of 6
(3,594 Views)

Termination charater is on since it is the default setting. I strange thing about this is that i have 13 commands  that i write to the controller and then read back the responses. It is only the one which requires 7 bytes to be read back that has any trouble.

0 Kudos
Message 3 of 6
(3,590 Views)
Solution
Accepted by topic author sealy0910
It's not strange at all. It is expected. If you are not reading ASCII, then disable the term character. VISA read terminates as soon as the character is detected.
Message 4 of 6
(3,582 Views)

Yes, this is expected ! See here for more details about termination characters in NI-VISA.

0 Kudos
Message 5 of 6
(3,565 Views)

Thanks so much for everyone's help. That was the exact problem. Being new to labview these disscusion forums are very helpful.

0 Kudos
Message 6 of 6
(3,531 Views)