Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with function "Ivi_InitWithOptionsAndGetError"

Solved!
Go to solution
Hi all,
I'm trying to perform the example that appears in the page 12-7 on the document http://digital.ni.com/manuals.nsf/websearch/9D3D530113B7875F86256D2C0061F6BE
I 've configurated Max in that way:
    - Logical Name: MyFGen --> Driver Session: Agilent 33220
    - Driver Session: Agilent 33220
             - General: Without Init Options and withouy simulation
             - Hardware:
                    - Name: MyAgilent33220
                    - Resource Descriptor: TCPIP0::192.168.55.114::INSTR
                    - Software: Software Module: Agilent33220
                    - Virtual Name: MyAgilentFGen     Physical Name: Chan1
                    - Initial Settings: Empty

    - Instrument Driver Software Module:
             - General:
                   - prefix: Agilent33220   ProgID: Agilent33220.Agilent33220
                   - Module path: ..\IVI Foundation\IVI\Bin\Agilent33220.dll
                   - Physical Names: TCPIP0::192.168.55.114::INSTR Channel


When I run the LabView program apperas the following error:
       - "IviFgen Initialize With Options.vi<ERR>
        Driver Status:  (Hex 0xBFFA0011) Primary Error: (Hex 0xBFFA0011) Function or method not supported.
        Elaboration: FunctionId: 3,  FunctionName: InitWithOptions"

What could be my error?
Thanks and best regards

                
         
 
0 Kudos
Message 1 of 18
(7,056 Views)
Hello Unai,
        Are you using the IVI-C Instrument Specific Instrument Driver that is posted here on IDNet?  If so, try running in simulation mode.  If not, download and install the IVI-C driver and first try it in simulation and then with the live instrument.

Cheers,

NathanT
0 Kudos
Message 2 of 18
(7,049 Views)
Hi Nathan
thanks for your answer!

I have two different programs.: in the first one I'm using the specific drivers of Agilent33220 function Generator (Agilent 33XXX series), and It works ok.

But now I want to run a program using only the standard IVI drivers (IVIFGen) as in the document http://digital.ni.com/manuals.nsf/websearch/9D3D530113B7875F86256D2C0061F6BE (pag 12-7)
If you tell me your mail I could send you a screenshot of the schematic

Thanks for all!




0 Kudos
Message 3 of 18
(7,044 Views)
Hello Unai,
        Please answer the first question from my last post with a "yes" or "no".

       It is great that you want to use the IVI-C IVIFGen class drivers, but we need to make sure that you are using the IVI-C Specific Driver for your instrument first.  Based on the information in your first post, it looks like you are using the IVI-COM Specific driver, which is a different implementation of IVI.  Since you want to use IVI-C Class Drivers, your first choice for a Specific driver should be IVI-C, which can be found here.

Cheers,

NathanT


0 Kudos
Message 4 of 18
(7,021 Views)
Hi Nathan,
I'm using the IVI-COM driver supported by Agilent.
I've just installed the IVI-C driver for HP33120A Signal Generator that you posted in the previous message but I obtain the same problem.
I dont know what could be the problem.
0 Kudos
Message 5 of 18
(6,992 Views)
Hello Unai,
       Thanks for installing the IVI-C Specific Driver for your instrument.  Have you added the instrument as a VISA TCP/IP Resource in MAX?  If not, then add it.  If so, please give it a VISA Alias and attempt to communicate with it with a VISA Test Panel.  Just write "*IDN?" and then read it back.  If this works, than VISA is probably not causing the problems.  Make sure to save the VISA resource after giving it the alias or making any other changes.

       Confirm that your IVI Logical name points to the IVI-C Specific Driver Session for your instrument. 

Once that is done, go to the IVI Driver Session that was created by the hp33120a IVI-C Specific Driver installer. 

Go to the hardware tab and add the VISA resource corresponding to your instrument and check the box next to it. 

Do not change the Software, Virtual Names, or Initial Settings Tabs.  On the General Tab, first try running a Class driver example in LabVIEW with the driver in simulation mode. 

If that works fine, then change it to "Don't Simulate" and make sure to save the IVI Configuration before running the example.

Let us know the results,

Cheers,

NathanT



0 Kudos
Message 6 of 18
(6,984 Views)
Hi Nathan,
Using VISA test panel it works ok.

I've try to simulate this example IviFgen [STD] - Generate Std Wfm.vi but the error appears again:

"Driver Status:  (Hex 0xBFFA0011) Primary Error: (Hex 0xBFFA0011) Function or method not supported.
Elaboration: FunctionId: 3,  FunctionName: InitWithOptions"

I attach the MAX configuration screenshot of the driver session.

Thank you


Mensaje editado por UnaiDeusto
0 Kudos
Message 7 of 18
(6,969 Views)
This error always appers in "IviFgen Initialize With Options.vi". I attach the block diagram of this vi and the configuration box of the library. If I change the library to "..\IVI Foundation\IVI\Bin\hp33120a_32.dll" This vi doesnt return an error but It doesnt return me a correct "instrument handle out" (The error is "Driver Status:  (Hex 0xBFFA1190) The session handle is not valid.") and the example doesnt run.

0 Kudos
Message 8 of 18
(6,966 Views)
Hello Unai,
       Thanks for the MAX screenshots and testing with the VISA Test Panel.  The installer for the IVI-C hp33120a Instrument Driver should have created a new IVI Driver Session in MAX.  You should not be re-using the IVI-COM Driver Session settings, that is probably what is causing the problems.  Please do the following steps:

1.  Uninstall the IVI-COM Agilent 33220 Instrument Driver
2.  Delete the Agilent33220 IVI Driver Session from MAX
3.  Unistall the hp33120a IVI-C Instrument Driver
4.  Install the hp33120a IVI-C Instrument Driver (Actually run the installer)
5.  Confirm that the installer created a new IVI Driver Session in MAX, and don't change a thing in it!
6.  Point your IVI Logical name to the hp33120a IVI Driver session
7.  Save the IVI Configuration in MAX
8.  Attempt to run the FGen Example in LabVIEW

If that works, try it with hardware.  Please give the instrument a VISA alias and only change the Hardware tab and the simulation selector of the General Tab.  Make sure to save it before running the example again.

Do not change the Software, Virtual Names, or Initial Settings Tabs!

Let us know how that goes,

NathanT
0 Kudos
Message 9 of 18
(6,954 Views)
Hi NathanT,
It seems that it improves step by step!
Now when I run the IVIFGEN example, the IVIFGEN-INITIALIZE.vi works ok: the instrument is reset and this vi returns a correct instrument session.

But now in the next vi, "IviFgen Configure Output Mode.vi" appears a new error:
    - Error -1074135011 occurred at IviFgen Configure Output Mode.vi
    - Possible reason(s): Driver Status:  (Hex 0xBFFA001D)

I have took a look to ivi.h file and there appears this line:
#define IVI_ERROR_NOT_INITIALIZED               (IVI_ERROR_BASE + 0x1D)

It could be possible that the device is not initialized ok?


0 Kudos
Message 10 of 18
(6,943 Views)