11-13-2013 08:37 AM
Hello,
I would like to know if there is a way to query a frequency generator for the limitations of the output frequency that can be generated, using the C API. I have found documentation which clearly outlines the limitations of frequency output (min and max) for all devices supported by my current driver, but have yet to find a way to query these values from the driver and or the device itself. Is there such a method? or must I hard code these values into my program if I want to limit user input to the range of correct values for frequency?
Thank you for your help
11-14-2013 09:13 AM
It depends on the frequency generator. A lot of them do have commands you can pass to them that will obtain this data. What is the frequency generator that you are working with? You can always check the manual for SCPI commands to send to the device to retreive this data. Also, when you say C API, are you referring to C coding in CVI or another language in another environment?
11-14-2013 09:42 AM
Thank you for your response. The Frequency generator I'm working with is the NI PXI-5406, and the C API I was referring to is the one documented in the "NI-FGEN C Function Reference" section of the help documentation provided with the aforementioned instrument's driver. I was hoping to use that API to be able to query the necessary information, but saw no mention of such an attribute or function for this use.
Thank you
11-18-2013 01:52 PM
By limitations of the output frequency, do you mean specs related to jitter, phase misalignment, propagation delay, etc? That information is available on the cards spec sheet. I don't believe there are attributes in the driver that report that information. You can always write your own code that identifies a card by its model number, and looks up its specs in a file. The following attribute identifies a cards model number:
NIFGEN_ATTR_INSTRUMENT_MODEL
11-18-2013 02:00 PM
Specifically the attributes I am interested are outlined in the "NI Signal Generators Help" -> "Devices" -> "NI 5401/5404/5411/5431 Features Supported" section of the help documentation under the "Standard Function Output" table. The aforementioned table outlines the "Minimum frequency" and "maximimum frequency" for each listed device. I would like to be able to query those specific attributes from the device, rather than hard coding these into my code based on device name (as mentioned in the previous reply). These are the attributes I have previously referred to as "frequency output limitations".
11-19-2013 06:00 PM
HI,
Unfortunately, it is not possible to get a minimum and maximum frequency pragmatically. If you take a look at the Maximum frequency, in the help document, there are different values listed for different conditions. Therefore if there were a property that could be read off, it would be meaningless because there would be extenuating circumstances for nearly every card.
It seems that your best bet is to program a lookup table to determine your limitations.