Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

IVI Simulation Driver Attributes

Hi,
I'm new in IVI so my problem is maybe stupid, but...
I'm trying to simulate DMM by IVI, so i installed IVI Class Simulation Drivers. Now when i access the device by command IviDmm_InitWithOptions, IviDmm_Read... i get window IVIDMM Simulatonr Setup, where can i set Measurement Base and Measurement Noise, what is fine, but i don't want this dialog arrise and i need to set those values by program.
 
I tryed
Ivi_SetAttributeViReal64(IVIHandle,chanelName,NISDMM_ATTR_READING_BASE,0,base);
but no success
 
I know one way is to set those value in Measurement & Automation Explorer -> IVI Drivers-> Advanced-> Simulation Driver Sessions-> nisDMM -> InitialSettings -> Reading Base
but i need to chage those values few times during the program.
0 Kudos
Message 1 of 2
(3,226 Views)
Michalkubik,
 
The easiest way to turn of interactive simulation is to set the INTERACTIVE_SIMULATION flag to False for the simulation driver session initial settings in MAX. Alternatively, you can build the simulation driver yourself with ALLOW_INTERACTIVE_SIMULATION defined to 0. The source code is installed to the C:\Program Files\National Instruments\IVI\sim directory.
 
To programmatically set the values of the READING_BASE etc. attributes, you first need to call the Ivi_GetSimulationSession () function (declared in ivi.h), and call Ivi_SetAttribute with the session obtained and the attribute you want to set.
 
BTW, if you are modifying the READING_BASE etc., attributes only once during a session, then you can simply set them in MAX.
 
Regards,
 
z_haider
 
Message 2 of 2
(3,204 Views)