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
In the IVI-3.2:  Inherent Capabilities Specification document it can be read that this error means: “%s:  A connection to the instrument has not been established.”

What can be the reason?
Thanks
0 Kudos
Message 11 of 18
(2,854 Views)
Hello Unai,
       Well, since the Configure Output Mode is the second VI in the example, it looks like the Initialize is not returning a good session reference.  Please take a NI-Spy capture of the example running.  Refer to this KB for more information on taking a good NI-Spy capture.  Also, please post another set of screenshots of your MAX configuration settings.

Thanks,

NathanT
0 Kudos
Message 12 of 18
(2,848 Views)
Hi NathanT,
I attach here the file from NiSpy and the MAX and LabView screenshots.
Thanks for all


Mensaje editado por UnaiDeusto
Download All
0 Kudos
Message 13 of 18
(2,836 Views)
Solution
Accepted by topic author UnaiDeusto
Hi NathanT,
here attach you other capture with more information.
Thanks.
0 Kudos
Message 14 of 18
(2,833 Views)
Hello Unai,
       Thanks for the excellent screenshots.  The NI-Spy capture shows that the Initialize function is not running completely before the ConfigureOutput function is running.  I have attached a NI-Spy capture from a successful execution of the example with a live 33120 at my desk.  Your NI-Spy capture does not show a viOpen, which is why the instrument resource is not initialized.  This is probably due to a conflict between Agilent VISA and NI-VISA.  I recommend that you completely uninstall Aglient VISA and re-install the most current version of NI-VISA.
      Let me know how it goes after doing that.

Thanks,

NathanT
0 Kudos
Message 15 of 18
(2,822 Views)
I've just obtained this spy file
I dont undertand why it arrives until action number 46 and then it goes bananas and the same error appears again
The diference with your file is that in the viOpen function the status is a value and in my spy file this field is empty.


Mensaje editado por UnaiDeusto
0 Kudos
Message 16 of 18
(2,814 Views)
Hi NathanT,
I have re-install all the drivers and now it works perfectly!! Thank you for everything!!

I have other little question: to read the configuration of the IVI driver, I would like to use a file instead the MAX. When a push the button "save IVI configuration", I suppose this configuration is load in a file. Can I read this file from LabView and modified It by hand?

Thanks again for your help and patience 🙂
0 Kudos
Message 17 of 18
(2,804 Views)
Hello Unai,
       I am glad that uninstalling Agilent VISA and reinstalling NI-VISA took care of the issue, that was a tricky issue.  You are correct that MAX just changes a IVI configuration file.  It is called the IVIConfigurationStore.xml.
       There is an API interface to the Configuration Server and here is a KB that talks about it and includes an example:http://digital.ni.com/public.nsf/allkb/F25F9B0E8DA4BB2386256DEF00729F81?OpenDocument

MAX always works great for me, so I have not used the Config Server API.

I HIGHLY recommend that you continue to use MAX to change the IVI settings.  Remember that you can create multiple IVI Driver Sessions if you have multiple instruments of the same type or want to have different configurations of the same instrument.

Cheers,

NathanT
Message 18 of 18
(2,798 Views)