Hello,
*I'm trying to simulate data/errors with Keysight instruments drivers for Ag34401 or Ag3446x.*
When I say simulate, I'm referring to the "Simulated data/errors" functionality described by IVI "Every IVI instrument-specific driver has basic built-in simulated data generation algorithms. For example, when you use a DMM driver in simulation mode, the Measure function will return a random number within the valid range of the current mode of the DMM." *I have installed both drivers on my laptop, configured a Logical Name in Ni Max, and specified to Simulate With Specific Driver.*
I have written a *simple Console Application in C#:*
...
using System.Runtime.InteropServices;
using Ivi.Driver.Interop;
using Ivi.SessionFactory.Interop;
using Ivi.Dmm.Interop;
static void Main(string[] args)
{
string logicalName = "DCPwr";
IIviSessionFactory sessionFactory = new IviSessionFactoryClass();
IIviDriver driver = (IIviDriver) sessionFactory.CreateDriver(logicalName);
driver.Initialize(logicalName, true, true);
Console.WriteLine("Identifier: {0}", driver.Identity.Identifier);
Console.WriteLine("Description: {0}", driver.Identity.Description);
Console.WriteLine("Model: {0}", driver.Identity.InstrumentModel);
IIviDmm dmm = (IIviDmm) driver ;
dmm.Configure(IviDmmFunctionEnum.IviDmmFunctionDCVolts, -1.0, -1.0);
Console.WriteLine("Measurement: {0}", dmm.Measurement.Read(1000).ToString() );
Console.WriteLine("Measurement: {0}", dmm.Measurement.Fetch(1000).ToString());
Console.ReadKey();
}
When the *logical name is associated to the Ag3446x* Driver Session in Ni Max, the output is the following:
Identifier: Ag3446x
Description: IVI driver for the Agilent 3446x family of DMM
Model: 34460A
Measurement: 0
Measurement: 0
When the *logical name is associated to the Ag34401A* Driver Session in Ni Max, the output is the following:
Identifier: Agilent34401
Description: IVI driver for Agilent Technologies 34401A Digital Multi Meter
Model: 34401A
Measurement: 0
Measurement: 0
So the Interchangeable functionality are working fine, but based on Simulated data/errors functionality, *I'm espected a random number for the measurement but something doesn't work: the value is always 0.*
Nothing changes if I simulate with nisDmm class driver.
I have tried the same also with LabWindows CVI but nothing was changed.
*Any suggestion about?*
*What is that I'm doing wrong?*
I'm getting crazy :)
Thanks
Luigi
*I'm trying to simulate data/errors with Keysight instruments drivers for Ag34401 or Ag3446x.*
When I say simulate, I'm referring to the "Simulated data/errors" functionality described by IVI "Every IVI instrument-specific driver has basic built-in simulated data generation algorithms. For example, when you use a DMM driver in simulation mode, the Measure function will return a random number within the valid range of the current mode of the DMM." *I have installed both drivers on my laptop, configured a Logical Name in Ni Max, and specified to Simulate With Specific Driver.*
I have written a *simple Console Application in C#:*
...
using System.Runtime.InteropServices;
using Ivi.Driver.Interop;
using Ivi.SessionFactory.Interop;
using Ivi.Dmm.Interop;
static void Main(string[] args)
{
string logicalName = "DCPwr";
IIviSessionFactory sessionFactory = new IviSessionFactoryClass();
IIviDriver driver = (IIviDriver) sessionFactory.CreateDriver(logicalName);
driver.Initialize(logicalName, true, true);
Console.WriteLine("Identifier: {0}", driver.Identity.Identifier);
Console.WriteLine("Description: {0}", driver.Identity.Description);
Console.WriteLine("Model: {0}", driver.Identity.InstrumentModel);
IIviDmm dmm = (IIviDmm) driver ;
dmm.Configure(IviDmmFunctionEnum.IviDmmFunctionDCVolts, -1.0, -1.0);
Console.WriteLine("Measurement: {0}", dmm.Measurement.Read(1000).ToString() );
Console.WriteLine("Measurement: {0}", dmm.Measurement.Fetch(1000).ToString());
Console.ReadKey();
}
When the *logical name is associated to the Ag3446x* Driver Session in Ni Max, the output is the following:
Identifier: Ag3446x
Description: IVI driver for the Agilent 3446x family of DMM
Model: 34460A
Measurement: 0
Measurement: 0
When the *logical name is associated to the Ag34401A* Driver Session in Ni Max, the output is the following:
Identifier: Agilent34401
Description: IVI driver for Agilent Technologies 34401A Digital Multi Meter
Model: 34401A
Measurement: 0
Measurement: 0
So the Interchangeable functionality are working fine, but based on Simulated data/errors functionality, *I'm espected a random number for the measurement but something doesn't work: the value is always 0.*
Nothing changes if I simulate with nisDmm class driver.
I have tried the same also with LabWindows CVI but nothing was changed.
*Any suggestion about?*
*What is that I'm doing wrong?*
I'm getting crazy :)
Thanks
Luigi