LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview control of a GPIB instrument - problems...

Hi all,

Windows XP
Labview 6i
NI GPIB card in PXI chassis over MXI-3 PCI bridge.

I am trying to write a VI to control a TTi1705 Multimeter via GPIB. I
can access the instrument, and have a case structure with a Menu Ring
to set either VAC or VDC. If i put this in a while loop, it runs fine;
if the setting is changed, then it programs the meter accordingly.

If I now put in the same while loop, a two stage sequence (GPIB Write
"READ?" and a GPIB Read) to get the current voltage being measured,
this also works as required. Until.... I change the AC/DC ring. When I
do this, it still sets the meter accordingly, but now the wrtie/read
sequence stops, and eventually reports "GPIB Read returned error code:
EDVR: Error connecti
ng to driver or device".

Either selecting Continue or Abort, then re-running the VI allows the
write/read sequence to operate again OK, until the AC/DC is changed
again.

Does anyone know why this is happening or how I could fix it?

Any help appriciated!

Regards,
Joe.
0 Kudos
Message 1 of 2
(2,533 Views)
My guess would be that sending the AC/DC change is interrupting the loop,
just before the GPIB Read. When it gets back it hangs. You could use a
semaphore - grab a semaphore before the GPIB Write, don't release it until
after the GPIB Read. Use the same semaphore for the AC/DC change.
That way, the AC/DC change won't interrupt a read.

Les.Hammer@CompleteTest.com
0 Kudos
Message 2 of 2
(2,533 Views)