Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to search supported models??

Hi, i am using IVIConfigurationServer finctions...
 
I want to search if an specific instruments model is supported by any of the software modules that i have registred in my configuration Store.
 
It´s that possible????
 
Thanks
0 Kudos
Message 1 of 3
(3,429 Views)
Hello geodo,
       That is certainly possible.  Since the IVIConfigurationStore file is an XML file, you could devise your own way of parsing it if there is not a way to accomplish what you need through the ConfigurationServer functions.  It looks like you could probably use:

ViStatus _VI_FUNC IviConfig_GetSoftwareModulePropertyViString (IviSoftwareModuleHandle SoftwareModuleHandle,ViInt32 PropertyID,ViInt32 BufferSize,ViChar Value[]);

with a PropertyID of:
IVICONFIG_VAL_SW_MODULE_SUPPORTED_INSTR_MODELS

That is defined at the top of the header file (IviConfigServer.h) found at C:\Program Files\IVI Foundation\IVI\Include

I will leave it up to you to determine how you would like to iterate through the software modules.

Let us know how it goes,

NathanT
0 Kudos
Message 2 of 3
(3,414 Views)
Thanks Nathan
 
I get to search for a model
 

{

IIviSoftwareModulePtr sm(

__uuidof(IviSoftwareModule));

total=cs->SoftwareModules->Count;

printf("Hay %d SM\n",total);

//printf("hola");

for (indice=1;indice<=total;indice++)

{

sm=cs->SoftwareModules->Item[indice];

if(strstr(_bstr_t(sm->SupportedInstrumentModels),"E8251A")>0)

printf("\nSiii ");

printf("\n");

printf(_bstr_t(sm->SupportedInstrumentModels));

}

}

 

 

Its run correctly

0 Kudos
Message 3 of 3
(3,385 Views)