Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

IVI_GetAttribute function panel: cannot see instr.spec. attribute

Hi,

I recall the function panel for a Ivi_GetAttribute function,
f.e. Ivi_GetAttributeViString. To select an attribute for the 'Attribute ID' a window pops up: 'Select Attribute Constant'.
In that window I cannot see attributes that are specific to the particular instrument (the ones that begin with PREFIX_ATTR_). However in the Control Help for 'Attribute ID' it says that also instrument specific attributes can be selected here.
I checked my .c and .h file and everything is ok and in order for my instrument specific attributes.

Am I doing something wrong or is it simply not possible to select instrument specific attributes
in function panels for the Ivi_GetAttribute functions?
If so, does that mean I need to manually type in the name of the instrument specific attribute in the source code?

Thanks for any help/hints,
best regards,
Marcus
0 Kudos
Message 1 of 4
(3,200 Views)
Hi Marcus

What version of CVI an IVI driver do you use?
have you include the header files which are called in the help for 'Atrribute ID'?

regards

Manuel
0 Kudos
Message 2 of 4
(3,181 Views)
Hi Manuel,

I use CVI 6.0.0 (105) and I installed ICP 2.2.
The .h file is included.

Here is an example of my code (.c file):
checkErr( Ivi_GetAttributeViString (vi, VI_NULL, NORMA5XX_ATTR_ID_QUERY_RESPONSE, 0, BUFFER_SIZE, rdBuffer));


Now when I recall the function panel for Ivi_GetAttributeViString I cannot find my NORMA5XX_ attributes in the Attribute ID list.
However the attribute
NORMA5XX_ATTR_ID_QUERY_RESPONSE is defined in the .h file
and that is included.
Also my driver works, this means
that manually setting the attribute ID to NORMA5XX_ATTR_ID_QUERY_RESPONSE works.


So, why do my own NORMA5XX attributes do not show up
in the function panel? The definition in the .h file
looks like this:


/*- Instrument-Specific Attributes -------------------------------------*/


#define NORMA5XX_ATTR_ID_QUERY_RESPONSE (IVI_SPECIFIC_PUBLIC_ATTR_BASE + 1L)
#define NORMA5XX_ATTR_TIME (IVI_SPECIFIC_PUBLIC_ATTR_BASE + 2L)
#define NORMA5XX_ATTR_INPUT_COUPLING (IVI_SPECIFIC_PUBLIC_ATTR_BASE + 3L)

Thanks and best regards,
Marcus

Message Edited by Marcus3967 on 07-04-2005 06:28 AM

0 Kudos
Message 3 of 4
(3,161 Views)

From your post, I'm not sure I know if you're writing an instrument driver, or trying to use one to write a test application. If you are writing a test application, you should not be using the Ivi_SetAttribute and Ivi_GetAttribute functions. You should be using the Set- and GetAttribute functions that are part of the instrument driver you're using - in this case, norma5xx_SetAttribute<type> and norma5xx_GetAttribute<type>. These functions should be in the driver's function panel, and should include all of the driver specific attributes.

The functions defined in the ivi.lfp function panel are primarily meant to be used when writing an instrument driver. That function panel and associated sub file define all of the general attributes which all drivers are expected to support. However, there's no way for that function panel to know about the attributes that are specific to your particular driver. They will only show the inherent attributes, because that is all they know about. You can use those functions with other attribtute IDs when writing a driver, at which point you would have to enter the IDs yourself. If you want to still use the function panels to inject the function calls into your code, but need to use an identifier not in the supported list, you can press Ctrl-T to turn all of the ring, slide, and boolean controls on the function panel into text boxes where you can enter whatever identifiers you wish.

Message 4 of 4
(3,131 Views)