Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB reads lock up application until after I/O compltes?

Hi All,
 
GPIB is not my speciality so I hope some has seen this issue and knows how to handle it.
 
I have two VI both running with their front panels open VI_A and VI_B.
 
VI_A  just reads from a LV2 global and adds data to a chart. It normally updates about once per second.
 
VI_B queries an instrument for a waveform and then shows the data on a graph.
 
While VI_B is executing a VISA read to get the waveform BOTH VI_A and VI_B appear to lock-up. As soon as the VISA read completes, we are back to the normal updates. Right up until VI_B tries to read from the instrument and then another multi-second lock-up.
 
Additional info:
The event structure in VI_A does not fire durring the "lock-up". I can see the button is pushed, but the event (that resets the push button) is delayed while the VISA read is active.
 
LV is configured to use multiple threads.
 
NO VI Server invloved.
 
Changing the settings of the sub-VI called by VI_B to "data acquisition" did not help.
 
So...
 
If you have any hints, please share them.
 
THank you in advance,
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 1 of 13
(5,817 Views)

Ben,

The only thing I can think of immediately is to see if the VISA Read is set to do synchronous I/O.

Message 2 of 13
(5,804 Views)

Thank Dennis,

 

I checked that early on and should look at it again. Looking back now, I realize that there are two operations that cause the hanging. I did not go back and change BOTH.

 

I changed one, still observed the lock-up and then switched back. A "sanity check" is definately called for.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 13
(5,791 Views)
So have you verified that your VISA reads are Asynchronous or Synchronous. If they are set to synchronous, then I think the locking up may be expected... Is there any way we could get a look at a portion of your code to see how these two VIs are interacting? Have you taken a spy capture that we might look at for more information? If you haven't worked with NI-SPY, I'll paste a link to a tutorial below:

NI-SPY

Logan S.
Message 4 of 13
(5,767 Views)

Hi Logan,

No I did not run NI Spy because I am convinced the "hang-ups" occur durring periods where large data sets are being transfered from the instrument to my machine.

Please e-mail me at

bar@dsautomation.com

and I will reply with the code to illustrate the structure.

 

Thank you for your interest,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 13
(5,762 Views)

To anyone else following along...

Logan now has the code.

We will share the results here, but sorry, not the code.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 13
(5,759 Views)

Update:

The jury is still out.

I less than ideal work-around is to break up long reads into a series of smaller reads with a wait in between. This slowed the speed of the read operation but allowed other processes to get at the CPU on a regular basis.

Nothing else definative at this time.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 13
(5,731 Views)
Hi All, It turns out this is a known issue involving both the GPIB-32.dll (NI-488.2) and LabVIEW. We are working on a fix that will be included in later revisions of both. The current work around that we've found is to use an additional GPIB interface to communicate with your additional GPIB hardware. We'll update this post when the fix has been made. Thanks Ben for all your help! Logan S.
Message 8 of 13
(5,696 Views)

Please talk to "Matt" and update the status of this issue.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 13
(5,544 Views)

Hi Ben,

I'm sorry I have not posted here sooner.  We had another issue similar to yours come up and attempted again to replicate this issue to verify that it matched the corrective action request that I reference above.  After a number of attempts, I found we could not replicate what you were seeing.  For instance, we attached two instrument simulators to our system, set up three while loops in a simple VI - one loop for each instrument simulator, and one loop just monitoring the UI.  We tried using synchronous and asynchronous VISA calls in the loops, tried it with the both simulators on, with only one on, with both on, then shut down one, and we never saw the UI lock up as you were describing.  Please see the attached VI to see one of our attempted setups to replicate this problem.  Did we misunderstand the description?  Or perhaps how to replicate the issue?

Logan S.

Message Edited by LoganS on 12-19-2005 02:47 PM

0 Kudos
Message 10 of 13
(5,538 Views)