03-20-2015 05:54 PM
Duplicate VISA session is the way to go for this
Open a session for your VISA Write loop and open duplicate a session for your VISA Read loop instead of branching a single VISA ref wire.
Then the VISA Read will not block the VISA Write and the two loops will operate independently of each other.
Besure to close each session, for if you don't you will keep adding VISA sessions and will see something like this from the VISA ref control drop down
Com1 (1)
Com1 (2)
Com1 (3)
Com1 (4)
so on and so on
03-20-2015 05:58 PM
@Omar_II wrote:
Duplicate VISA session is the way to go for this
I would still contend that you should be doing the whole check for data in the port before reading when you are dealing with non-streaming data. I have actually had it so I got half of my message before the VISA Read timed out. By doing the check for data, you are ensuring that you can get the entire message before the timeout stops the read.
03-20-2015 06:05 PM
I will try to implement it tomorrow and make some test to see ho it works.
Thank you very much!
Omar
05-22-2023 09:42 PM
Thank you!!!!
Just finished spending "a few" hours trying to solve this.
Where this applies in my case is running on an embedded controller, the NI sbRIO
I use the serial port to log LOTS of diagnostic's, and also to receive an occasional command.
set the timeout to small and it crops my Tx.
set the timeout to big and it's waiting to long and my Tx queue overflows.
Thank you again!
-Jason