Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Keysight 34972A looses USB connection in LabVIEW

Hi

The extra read of 100 ms does not work because the wait works in parallele with the read that has already 3200 ms timeout in visa.

So you better increase the visa timeout and remove the sequence frame and the 100ms wait.

The visa timeout can be extended to 10 seconds (10000ms) because the timeout will end when a measurement is available.

greetings from the Netherlands
0 Kudos
Message 11 of 15
(805 Views)

the timeout error disappeared, when I added a few millisecond wait in a frame AFTER the VISA Read.

Maybe that will also fix my original problem, I have to see...

0 Kudos
Message 12 of 15
(802 Views)

Hi

That means that something in the rest of the program has something tricky, maybe you have a race condition going on.

 

greetings from the Netherlands
0 Kudos
Message 13 of 15
(798 Views)

That EZ Voltage Vi you posted is part of the LabVIEW driver, but it's been modified.  It's always better to make a separate copy with a different name so that the drivers doesn't get modified.  That way your changes don't affect the behaviour of other programs. Also, EZ Voltage.VI seems to call itself?  The unmodified version calls a subvi to convert a list of measurement pts to an array (list to array.vi found in the driver).. 

 

From your image, the test code should be simplified to diagnose the problem. Why all the VISA CLR statements and Time Waits? You should also check the instrument errors on every loop and see what that returns.  

 

The EZ Voltage.vi is meant to be a simple example of how to make a single measurement on N channels, it's not intended to be used in a loop.  So the implementation here is not the recommended approach.  You should look at the "/Example/Advanced Scan.vi" in the driver.

 

Your approach is to close relays, then use EZ voltage.vi which configures the instrument on every loop iteration, then open relays.    It would be a lot better to use the standard approach to configure measurement, make N measurements in a loop while collecting data, then clean up after the loop.  If you need to measure on multiple channels, you would setup the scan list that opens the relays automatically on every measurement.  I think your timeout issue is due to slow response somewhere in the instrument internal calls; close relay, then slow configure measurement, measure but the timeout is too short - try 30s.   Sounds ridiculous, but the DMM has a lot to do when a relay opens/closes, filter voltage spikes, measure autozero, scale ranging, averaging, etc...  

 

Try something like (untested due to lack of 34970 at the moment)...

hp34972a_scan_list_in_loop_bus-trigger.png

 

Download All
0 Kudos
Message 14 of 15
(782 Views)

Personally, I have always found it easier to send my termination characters in my code rather than allowing the system to auto send termination.  I have seen others have unterminated values at times using the auto-terminate configuration.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
Message 15 of 15
(773 Views)