11-08-2011 04:13 PM
First off, let me apologize for posting again - for some reason I didn't find the Instrument Control board the first time around. Originally posted in the general forums, where it is down to page 3 and I doubt will ever see the light of day: http://forums.ni.com/t5/LabVIEW/Moving-vi-to-faster-computer-throws-VISA-async-queue-error/td-p/1767...
Our group recently bought a new quad-core computer with plenty of RAM. We've had LabView under version control, so we simply installed the same version of LabView on the new computer, checked out all the newest code, hooked up our GPIB cards, and started running the same programs as before. However, during a program run, I can easily overload VISA's async queue for a particular session, throwing error -1073807303. Here are (I think) the relevant bits (the code is too convoluted to paste in a single vi):
Now here comes the fun part. The same code, running on a 32-bit XP-SP3 (LabView 2009), dual core, 2 GB RAM computer doesn't throw any errors. Running on a 64-bit Windows 7 + LV2009 + 24GB RAM throws the following error: (-1073807303).
I have read the following posts:
According to the third link, deleting the events manually is not good enough - instead the recommendation is to close the VISA session.
Now for the questions:
Memory shouldn't be an issue, since I'm only using 8 / 24 GB (even with a 64-bit virtual machine running at the same time). My biggest worry is that open/lock/close session will give even more overhead. (even 20ms of overhead, when there are about 20-25 calls "per step" would increase the overall time fo the data run significantly).
Sorry if this is a bit rambling without a definitive VI to show.
Thanks in advance,
Tomek
11-09-2011 10:20 AM
Hi Tomek,
Just to reiterate, you have been receiving error -1073807303 (Unable to queue the asynchronous operation because there is already an operation in progress). I find this highly unlikley because you seem to be thorough person, but I would verify that your drivers are the same on both computer setups.
Regarding your questions, yes this is probably happening because your newer computer setup queues commands too fast. Like you said a possible option would be to increase the buffer sizes. I'm specifically thinking the UART FIFO buffers, more information can be found about them in these links: http://digital.ni.com/public.nsf/allkb/ECCAC3C8B9A2A31186256F0B005EEEF7?OpenDocument and http://digital.ni.com/public.nsf/websearch/2D5F972CD550BBC386256F0B005E9A63?OpenDocument .
As to say which one of these two options will be better performance-wise is hard to say. The only way to really verify this is to run NI Spy or NI IO Trace to determine how fast the "Close VISA Event Session" compared to the "Discard Event" will take. Of course, increasing the buffer would be the easiest solution, but you run the risk of overflowing the queue again because you know for sure that you are queuing up items faster than you are dequeuing.
Jason L
11-10-2011 01:05 PM
Hi Jason,
Thanks for the two links. I'm not quite clear how to change the buffers you mention. I only see the following visa option under "General Settings":
I had a response on the other thread as well, and it seems that the following are things to try:
Thanks,
Tomek