Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Help using IVI Power Supply step in TestStand

I get "An invalid argument has been passed to a property or method. (VoltageLevel)" with any values (including the defaults) that I try to use to configure my AG66309B. All I want to do is use it in TestStand as a standard IVI power supply to control turning it on and off and setting different voltages in the course of my test plan, but it's proving impossible.

I also can't seem to validate the device. This may be related to my other problem. When I try to validate, take off simulation and press Init, I always get the same message, "ag663xxa_InitWithOptions returned an error... blah blah... The simulation state cannot be changed." If I leave simulation on, everything works just fine. What does this mean?

I h
ave downloaded the latest IVI driver from the NI site and installed it.

Any help would be appreciated at this point.

Thanks,

Socram
0 Kudos
Message 1 of 10
(5,905 Views)
Hello-

What is the exact error received by InitWithOptions? Try unchecking the "simulate" checkbox in the Inherent Attributes of this Virtual Instrument in the IVI portion of MAX.

Randy Solomonson
Application Engineer
National Instruments
Message 2 of 10
(5,905 Views)
Thanks! I seem to be a step further now. However, I still can't make this thing work. In TestStand, when I try to "Edit Ivi Power Supply Step" and validate the virtual device I have set up in MAX, I still get errors.

It seems that if I leave "Simulate" checked, then Init and Configure, I get the following error: "The IVI Configure operation failed for the logical name 'MyPowerSupply'. Details: An invalid argument has been passed to a property or method. (VoltageLevel)(-30002)"

If I uncheck "Simulate", then Init and Configure, I get the following error: "The IVI instrument failed to initialize for logical name 'MyPowerSupply'. Details: Type mismatch (13)"

This is all with the default values for the power supply step, I have changed nothing.


I have a feeling that there is something wrong somewhere in my instrument's configuration in MAX, but I have tried many times to follow all the documented steps and installed and reinstalled all the drivers and updates.

Again, any help would be most appreciated.

Socram
0 Kudos
Message 3 of 10
(5,905 Views)
Hello Again-

Try altering the InitWithOptions string to set QueryInstrStatus=0. That's all I can think of for now.
0 Kudos
Message 4 of 10
(5,905 Views)
Socram,

I think you may be right that something may be wrong in your MAX configuration. See if this explanation helps.

MAX IVI Configuration consists of four basic parts:

  • Logical Name
  • Virtual Instrument
  • Instrument Driver
  • Device

    A Logical Name links to a Virtual Instrument.

    Virtual Instruments link to an Instrument Driver and if applicable, a Device.

    Instrument Drivers and Devices are end items and link to nothing.

    The Logical Name you're using, 'MyPowerSupply' must be setup to link to a Virtual Instrument that links to the correct Instrument Driver and Device.

    The driver you're using created Virtual Instrument and Instrument Driver objects upon installation. These should be called ag663xxa. It also linked
    the Virtual Instrument to the Instrument Driver.

    You need to make sure that the Logical Name 'MyPowerSupply' is linked to the Virtual Instrument 'ag663xxa'.

    Then check that the Virtual Instrument 'ag663xxa' is linked to your Device. If it isn't, create a Device that has the correct GPIB resource descriptor for your instrument.

    ------------------------------------------------------

    You also mentioned that any value you sent to the VoltageLevel attribute returns an error. The valid range according to the instrument driver's implementation is 0.0V to 15.356V. If you are having trouble setting that, then there's a different issue at hand.


    First get MAX sorted out so you are about to initialize a session to your hardware, then we can see if there are more issues.

    --Bankim
  • 0 Kudos
    Message 5 of 10
    (5,905 Views)
    I have read and followed your instructions and have reinstalled my device, driver, virtual device, and logical name. The steps you decribed are the same that I read and followed in the IVI Driver Toolset User Manual. I have also unchecked the "Sumulation" box from as advised in a prior posting. Just in case I missed something, I'm attaching some screen shots of every properties box, exept for the last one on the Virtal Instrument since I left all the fields black as they are by default.

    Once all that is done and set up, I add a IVI->Power Supply step to my sequence in the "Setup" tab. I leave all the values default, which include a default voltage level of 1 for both channels. I try and run the sequence, so that it will ju
    st initialize the power supply to a power of 1 to both channels and it fails. Again, I have attached the sequence report so you can see the exact error message I get.

    I am still able to communicate with the device through GPIB, so I know it's active and connected properly. But I can't seem to work at all using this Ivi stuff.

    Again, if there's anything that you guys could come up with, please let me know. Thanks in advanced for your time.

    Socram
    Download All
    0 Kudos
    Message 6 of 10
    (5,905 Views)
    Hello again-

    The channel string may not be configured right. Check the documentation to be sure that channel names are appropriately named. For example, some instruments call the first channel: "ch1" or "ch01". It appears that the current configurate is set to "1" for the first channel.
    0 Kudos
    Message 7 of 10
    (5,905 Views)
    Randy,

    I am having exactly the same problems as this. When you state the channel number may not be configured correctly, check the documentation - which documentation - is this an instrument specific item, or part of the IVI specification.

    Andy
    0 Kudos
    Message 8 of 10
    (5,905 Views)

    hi,

     

    The reference created from the instrument handle out is invalid. I have reinstall the IVI drivers, Instrument driver. can anybody suggest to fix this issue ?

     

    Pl. check the attachment for more detail.

     

     

    0 Kudos
    Message 9 of 10
    (5,170 Views)

    Hello LabVIEW Zone,

           In the future, please start a new post instead of replying to an old post.   One problem that I see from your screenshot is that you are not closing your instrument references. You should make sure to always call the Close VI at the end of your application.  I recommend that you restart your computer and then try running the Getting Started VI for the IVI specific driver.  If that does not work, please confirm that you can communicate with your instrument in MAX, and provide us more information about the errors that you are seeing.

     

    You also should take a look at: Using IVI Drivers to Build Hardware-Independent Test Systems with LabVIEW and LabWindows/CVI

     

    Cheers,

     

    NathanT

    0 Kudos
    Message 10 of 10
    (5,144 Views)