10-13-2008 07:11 AM
Hello,
I have an instrument with two types of sensors, with different characteristics. I would like to have two range tables, say:
static IviRangeTableEntry sensor1_frequency_tableEntries[] =
{
{500e+6, 6e+9, 0, "FREQ", 0},
{IVI_RANGE_TABLE_LAST_ENTRY}
};
static IviRangeTable frequency_table =
{
IVI_VAL_RANGED,
VI_TRUE,
VI_TRUE,
VI_NULL,
sensor1_frequency_tableEntries,
};
and
static IviRangeTableEntry sensor2_frequency_tableEntries[] =
{
{500e+6, 18e+9, 0, "FREQ", 0},
{IVI_RANGE_TABLE_LAST_ENTRY}
};
static IviRangeTable frequency_table =
{
IVI_VAL_RANGED,
VI_TRUE,
VI_TRUE,
VI_NULL,
sensor2_frequency_tableEntries,
};
Then when I initiate my IVI-driver I check what sensor is attached to the instrument. Now, to my question. I would like to set an attribute to point to the current range table. Something like this:
switch (type)
{
case 1:
checkErr ( Ivi_SetAttributeViInt32(vi, VI_NULL, BT4500B_ATTR_FrequencyRangePointer, VI_NULL, &sensor1_frequency_table));
break;
case 2:
checkErr ( Ivi_SetAttributeViInt32(vi, VI_NULL, BT4500B_ATTR_FrequencyRangePointer, VI_NULL, &sensor2_frequency_table));
break;
default:
break;
}
Does anyone know what (if any) type of attribute I have to use? Or any other ideas?
Thanks in advance
Fred Niemelä
System Engineer
Saab Aerotech
10-14-2008 12:46 PM
Hi,
What type of instrument do you have? You can check the different specifications on the IVI Foundation website.