Title: Re: Asyncrhonous Serial VISA
The VISA library AFAIK does not allow simultaneous input and output on a single port.  The difference between asynchronous and synchronous behavior is getting a bit blurred.

Asynchronous calls to the VISA library mean that the execution for that execution engine is not blocked.  Thus other nodes (non-visa, or VISA on a different port) can execute.  However since there are several different execution engines and now with nice multi-threaded O/S capabilities, it is unclear whether only a single internal thread is blocked by a synchronous node or not.  Since several threads can be allocated to a single execution engine it becomes hard to detect the blocking of a single thead.  One of the experts may correct my terminology here of threads and execution engines, but this is my understanding.

But a write will block until that VISA port becomes available.  hopefully this restriction wil be lifted with VISA 4.  The other thing you can do, is not to start the read until actual characters are in the buffer.  This means that you will not block the port until it is ready to read.  This can be extended to only read the number of characters that are actually in the buffer and not use the read timeout waiting for characters.  Maybe an NI VISA guru can tell you how to detect the difference between async and sync visa.  The question is why every use sync visa these days?  It used to be because async was buggy but that has been cleared up a long time ago.

-Scott



At 11:44 -0700 6/4/04, Jason Dunham wrote:
Is anyone having success at running asynchronous VISA calls for serial port reads and writes?
I made a simple test VI to read one byte from COM1, and write a continuous stream of bytes out of the same port in a parallel while loop.
The write loop stalls until the read command times out.  I even tried moving the read to a subvi and changing it's execution system, but to no avail.
If I read and write from different ports it the read and write are independent, even if the VISA nodes are set to run synchronously.
I'm just not getting the whole asynchronous concept, I guess.  I have yet to create a VI which behaves different with sync or async VISA calls.

I'm using LV 7.1, VISA 3.1 and Windows XP.

Reply via email to