LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -1073807339 when using IVI (setup in MAX) to initialize instrument

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.

 

0 Kudos
Message 1 of 11
(5,232 Views)

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.

RF R&D
National Instruments
0 Kudos
Message 2 of 11
(5,190 Views)
Since you are using IVI and have a Call Library Function Node, you can ignore Bumblebee's comment.

What type of physical connection are you using? You have the option to reset or query the instrument id. Have you disabled those to see if either of those are causing the timeout?

What options in MAX are you checking/unchecking? What version of the IVI compliance package do you have installed?
0 Kudos
Message 3 of 11
(5,179 Views)

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.

0 Kudos
Message 4 of 11
(5,141 Views)

It doesn't even sound like you are communicating with the equipment.  Are you sure your resources are correct?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 11
(5,132 Views)

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.

0 Kudos
Message 6 of 11
(5,122 Views)

Hang on.  Let me process this information again.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 11
(5,120 Views)

@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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 11
(5,112 Views)

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.

0 Kudos
Message 9 of 11
(5,106 Views)
Please use I/O Trace to capture what is going on with just the initialize function. You just can't ignore the first error.
0 Kudos
Message 10 of 11
(5,098 Views)