10-16-2014 01:09 PM
I'm using LabVIEW 2014 and the most recent version of the Measurement & Automation Expert (MAX) to communicate with an Agilent 33500B series function generator with IVI drivers on a Windows 8.1 computer. (I also see this problem when trying to communicate with an Agilent oscilloscope). I've used the MAX to create an IVI logical name and tied the name to the appropriate driver session following the instructions in: http://www.ni.com/white-paper/4594/en/. In LabVIEW, I have created the IVI instrument, tied it to the appropriate logical name, initialize the instrument, and then close the session. When I run this program, the Initialization block runs (resetting the parameters on the function generator) AND THEN I get the following error:
"Error -1073807339 occurred at IviFgen Initialize With Options.vi
Possible reason(s):
Primary Error: (HEX 0xBFFF0015) TImeout expired before operation completed.
Complete call chain:
IviFgen Initialize With Options.vi
IviFgen Initialize.vi
<myfilename>.vi
"
I read in the documentation that I should not simultaneously initialize with options in LabVIEW and in MAX, so I am using the Initialize block which still calls Initialize With Options. The same error occurs when I:
1. Uncheck all the options in MAX and run the code
2. Uncheck all the options in MAX and replace the LabVIEW Initialize block with Initialize With Options and run the code
3. Add a Wait block between the initialization and the close blocks and run the code.
However, I am able to communicate with the function generator when I use the VISA Test Panel (opened in the MAX) and send it a VISA command. I am also able to communicate with the function generator if I use the VISA I/O blocks instead of the IVI blocks in LabVIEW.
Is it really a timeout issue? If so, how do I change the timing? If not, what is going on?
Thanks.
10-17-2014 05:24 PM
A good troubleshooting step to try would be go into the VI containing the VISA read and write functions, turn on highlight execution and see where the timeout occurs, increase the timeout and try again. If you're unsure where to find those VIs post your code and I'll take a look.
10-17-2014 08:00 PM
10-20-2014 09:21 AM
I'm using a USB connection. For MAX options, I've tried:
1. Cache, range check - both checked
2. Cache, range check, query instrument status - both checked
3. All options unchecked
4. All options checked
For the above combinations, I've tried disabling both the reset and the query instrument ID options in the IVI Initialize block. All of the combinations resulted in the timeout error.
I have IVI Compliance Package 14.0 installed.
10-20-2014 10:06 AM
It doesn't even sound like you are communicating with the equipment. Are you sure your resources are correct?
10-20-2014 10:55 AM
According to the MAX they are correct (IVI driver for the Agilent 33519B downloaded from the NI website). When I run the IVI Initialize block any frequency, amplitude, offset, etc. settings on the function generator are reset to the default values. So, something is being sent to the instrument.
However, I've also tried adding the General Error Handler block right after the Initializaiton block to cancel the -1073807339 error. Then, I add the IviFgen Configure Standard Waveform [STD] block to set the function generator frequency. The program throws an error that looks like a resource problem:
"Error -1074130544 occurred at IviFgen IVI Error Converter.vi
Possible reason(s):
The session handle is not valid.
Complete call chain:
IviFgen IVI Error Converter.vi
IviFgen Configure Standard Waveform [STD].vi
<myViName.vi>
"
What could be the reason for an invalid session handle? I've followed the NI tutorials on setting up IVI instruments in MAX and in LabVIEW.
10-20-2014 11:05 AM - edited 10-20-2014 11:07 AM
Hang on. Let me process this information again.
10-20-2014 11:13 AM
@sagha wrote:
According to the MAX they are correct (IVI driver for the Agilent 33519B downloaded from the NI website). When I run the IVI Initialize block any frequency, amplitude, offset, etc. settings on the function generator are reset to the default values. So, something is being sent to the instrument.
However, I've also tried adding the General Error Handler block right after the Initializaiton block to cancel the -1073807339 error. Then, I add the IviFgen Configure Standard Waveform [STD] block to set the function generator frequency. The program throws an error that looks like a resource problem:
"Error -1074130544 occurred at IviFgen IVI Error Converter.vi
Possible reason(s):
The session handle is not valid.
Complete call chain:
IviFgen IVI Error Converter.vi
IviFgen Configure Standard Waveform [STD].vi
<myViName.vi>
"
What could be the reason for an invalid session handle? I've followed the NI tutorials on setting up IVI instruments in MAX and in LabVIEW.
Okay, this is new information. Nothing in your previous posts mention that the initialztion did anything at all besides return the timeout error. The invalid session handle is because you closed the session.
I'm having trouble following your descriptions.
10-20-2014 11:53 AM
Attached is a .png of the LabVIEW code I'm testing. Here is a recap of the data flow:
1. Create IVI resource of Fgen type.
2, Initialize function generator. The function generator screen paramaters are all reset to their default values. Then, error -1073807339 is thrown.
3. Cancel error -1073807339 to continue program.
4. Set frequency on function generator. Error -1074120544 is thrown.
5. Close IVI resource.
10-20-2014 12:21 PM