LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you check an IVI range attribute

I would like to query an IVI driver to check a range attribute, for example; I'd like to know the minimum frequency supported by the IVIRFSigGen driver.
 
Does anyone know how to do this?
 
Thanks.
0 Kudos
Message 1 of 5
(3,260 Views)

Hi GoBlue,

The IVIRFSigGen class doesn't inherently have a minimum frequency.  When you associate an instrument specific IV driver with that class, the instrument specific IV driver contains the minimum and maximum values for that particular device.  You can use the RANGE_CHECK attribute to check that values are within range for your device.  I have attached a screenshot from the IVI Driver Help that explains the RANGE_CHECK attribute.

0 Kudos
Message 2 of 5
(3,237 Views)
Thanks for your reply Michael.
 
I was looking at that command, but I didn't have any luck figuring out how to use it.  The help says to leave the Capabilty Name either "" or VI_NULL, so I wasn't sure how to tell it to check for a given frequency. 
 
I could use the ViStatus returned from the ConfigureRF command, but I was hoping there was a way to have it check before sending the command.
 
Thanks again.
0 Kudos
Message 3 of 5
(3,219 Views)
Hi GoBlue,
 
Are you wanting to find the range of a particular device driver for your own knowledge, or are you wanting to programatically acquire this value.  If you are just wanting to know the range of an IVI specific driver, you can open the main .c file for the driver and select Tools >> Edit Driver Attributes, the click on Range Tables and select the range table for this driver.  This range table contains the lookup table for valid ranges at different settings.  This just parses throught the .c file for this information.  You can also search the .c file for IVIRangeTableEntry.  This contains the same information.
 
If you want to programatically query the driver, you can use the Ivi_GetAttrMinMaxViInt32() function to return the min and max value of a parameter from the range table.
0 Kudos
Message 4 of 5
(3,200 Views)
Hi Michael,
 
I'm looking to do it programmatically, and the Ivi_GetAttrMinMaxViInt32() function did the trick.  For some reason, the Max value didn't seem to work, but I'm concerned with the Min and that worked like a charm, so I'll look at that later.  I thought I dug through all the Ivi_GetAttr functions, but I must have missed this one.
 
Thanks for the IVI 101!
 
Mark
0 Kudos
Message 5 of 5
(3,189 Views)