LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

viWaitOnEvent timeout??

Solved!
Go to solution

I have a simple application (LV2009, VISA 4.6.2) to communicate with equipments using a GPIB-USB-HS.

 

When runned in the development environment no error is generated but in the exe I can see in spy a lot of viWaitOnEvent timeout error. In the attached spy files I perform the same task in the development environment and in the executable.

 

1- start application

2- set the VISA Ressource Name control

3- send the *IDN? command using VISA Write.

 

Note that the errors appears only in spy, no error is reported by the exe (I receive a correct ID query response). I can also see that in the the development environment the function viWrite and viRead are used and that the exe use viWriteAsync and viReadAsync, why??

 

Ben64

Download All
0 Kudos
Message 1 of 2
(3,009 Views)
Solution
Accepted by topic author ben64

OK I found the answer in this old 2001 thread: viWrite vs. viWriteAsync

 

http://forums.ni.com/t5/LabVIEW/viWrite-vs-viWriteAsync/m-p/8873/thread-id/6999

 

You can right-click the VISA Write and VISA Read functions and select the Synchronous IO Mode -> synchronous. This removed the viWaitOnEvent timeout errors and now the viWrite and viRead are used in the exe.

 

I still wonder why in the development environment the viWrite function is used and in the exe the viWriteAsync functio was used. Maybe because of the OS (WinXP Professional v5.1) seiing a serial IO because the USB-GPIB-HS is connected to a USB port?

 

Ben64

Message 2 of 2
(2,992 Views)