10-11-2007 10:40 AM
10-11-2007
12:57 PM
- last edited on
10-29-2025
09:51 PM
by
Content Cleaner
You can't set the VISA functions to be reentrant. That concept applies to VI, and not primitives/functions. I believe what you're looking for is discussed in this article.
10-11-2007 01:03 PM
10-11-2007 01:15 PM - edited 10-11-2007 01:15 PM
Message Edited by Clueless1 on 10-11-2007 01:17 PM
10-11-2007 01:27 PM
10-11-2007 01:36 PM
To pevent multiple threads that use unique devices on a sinlge serial port ---> Use Lynn's AE suggestion.
To allow multiple thread to access unique ports, make sure the VI's that call the VISA functions are
1) unique VI's or
2) Are not unique but are set as reentrant
AND
The VISA calls are set as "Async".
Notes:
GPIB does not require the above protection UNLESS you have multiple thread accessing the SAME device. In that case use the AE approach to makes sure you get the response that goes with the queury.
Make sure you use the latest and greatest versin of NI-VISA. In about LV 7.0 there was a bug that forced an application to run in the UI thread (single threaded) when the VISA call was happening. This apprears to have been fixed.
Ben