04-05-2019 11:06 AM
I have an Agilent 34970A that I'm using the record temperature and voltage values. The DAQ is connected through an NI GPIB-USB-HS. I have downloaded NI Visa drivers and the Agilent 34970A instrument library.
I am able to run my program from ~1 min before an error occurs and the DAQ is completely unresponsive through Labview 2018 and Max. Error -1073807342 occured at VISA Read in Agilent 34970.lvlib:EZ Voltage.vi. Possible reason: VISA: (Hex 0xBFFF0012) Invalid resource reference specified. Parsing error.
I must unplug the device from the computer, replug the USB, and scan for the instrument through Max to reestabilish a connection.
I have replaced the GPIB adapter, the DAQ, checked all connections, so I can rule out a physical connection issue. Something is happening to trip up the VISA address and I cannot figure out what it could be.
Solved! Go to Solution.
04-05-2019 11:53 AM
Hi jhirschey,
It would be easier for all members who want to help you if you add your code to your post.
What I can see from your pictures.
You close the VISA connection in the first iteration of the loop, that makes no sense. You read temperature and pressure once, close VISA and then, of course, you can not acquire data from the device.
To improve your code,
you should place the VISA close VI after the while loop, so that is executed when you shut down the program.
To end the loop properly I would recommend to add a stop button to the loop condition.
Regards,
MOJO
04-05-2019 12:23 PM
Make sure the Power Saving (and any other related) settings for the USB device are turned off.
Ben
04-05-2019 12:25 PM - edited 04-05-2019 12:26 PM
MOJO,
I have updated my code to remove the Close vi (temporarily). However, I still encounter this same error shortly after running the program. The issue seems to be some error reading the VISA session.
04-05-2019 12:33 PM
Ben,
I disabled the USB selective suspend setting. Are there other settings that could be affecting the USB ports?
04-05-2019 01:42 PM
Removing the Close vi only makes it worse. Now you never dispose of the VISA session. As MOJO said, place the Close after the loop (make sure the VISA ref is fed through the loop).
You may need to restart LabVIEW to clear that reference before it is used again.
04-05-2019 03:05 PM
@jhirschey wrote:
Ben,
I disabled the USB selective suspend setting. Are there other settings that could be affecting the USB ports?
Yes, the USB hub bbn itself defaults to shutting down. Use the device manager to change the power options.
04-06-2019 11:52 AM
Not remove close but place after execution of while loop. Also the set measures is better you place outside (before) the loop. Use shift register for reference (not for this issue but a best practice. Try not wire the input terminal. Try to change time. Find out on the palette of this instruments the samples.
Hope this help you
04-08-2019 12:12 PM
Yes. I see now that removing the Close function seemed funny, but I did it because the error was not exiting the loop and the Close function was never called. I fixed this by adding an Or function with the Stop button to terminate the while loop when an error occurs.
However, the VI still stops and the VISA connection seems to terminate ~30-60 seconds after I begin the VI. The only fix is to physically unplug the hardware from the computer and reinitialize the connection through Max.
Any additional help will be greatly appreciated!
04-08-2019 01:05 PM - edited 04-08-2019 01:07 PM
Stop button and close after the loop looks much better.
And that you post your VI makes it much more easier to help you.
I found this http://www.ni.com/tutorial/4644/en/ on ni.com.
The examples seem to be good guidance.
Your 10V enum to Conf Voltage.vi is not correct. You set the range to -1.
Create a new enum constant and select 10V again. So that you adjust the correct manual range.
And wire the same range into the loop to EZ voltage.vi.
Check your serial configuration.
You can bundle the channels to N plot chart.
See the attached VI, hope it helps.
MOJO