Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

overrun error when using multiple serial ports

Hi,
thanks a lot for your tip on Action Engines. I also realized that my error always occurs in the Read QCM measurement.vi (which is the SubVI of the core program). I am posting this SubVI below. Also, can you tell me how to check how many bytes are available to be read (I have a hard time figuring this part out).
Thanks,
Tony
0 Kudos
Message 11 of 17
(1,457 Views)
One more question:
why can't we use "Clear VISA" function to clear the buffer and thus get rid of the overrun error?
Tony
0 Kudos
Message 12 of 17
(1,453 Views)
Hi

I edited the subvi, the only real action is the addition of the error clusters.
To make sure that your main program can handle the error instead of popping up an error dialog.

To read the number of bytes available see inside.
I now read the rest of the buffer and throw it away. (even faster when no indicator is present)



greetings from the Netherlands
0 Kudos
Message 13 of 17
(1,448 Views)
Hi,
thanks a lot for your help. One thing: can you save your VI for LV 7.0, cause I have an earlier version of the program on my computer.
Thanks,
Anton
0 Kudos
Message 14 of 17
(1,427 Views)
Hi,
thanks a lot. The new vi works fine. The only problem is that sometimes the program gives a 'weird' reading from the instrument. Do you know what might be the problem and/or how to solve it?
Thanks,
Anton
0 Kudos
Message 15 of 17
(1,411 Views)
Hi

This can happen because of reading all that is left and then waiting for a new set.
You should be able to synchronise if you know exactly how each message is built up.
The best would be to use an end character as cr or lf if the controller sends that.
If you like I can take a look.
The only thing you need to do is send me a long list of consecutive characters read in one string.
the best you can do is read e.g. 100 characters and display this in a vi.
then make current values default and send it to the board.


greetings from the Netherlands
0 Kudos
Message 16 of 17
(1,401 Views)
Here is a version 7.0 with still the same behaviour.
first reading 17 charcters, then reading the rest of the buffer and maybe part of the next wanted 17 characters.

But if you could find out that there sometimes is a weird reading why do you need this vi in 7.0?


greetings from the Netherlands
0 Kudos
Message 17 of 17
(1,400 Views)