Getting Started Guide - Tom-Lu/IVI.C.NET.Adapter GitHub Wiki
Before IVI.C.NET.Adapter take effect, you need setup Adapter Class in Ivi Master Configuration file. IVI.C.NET.Adapter provide an utility to do so.
- Launch the config utility
- Click
Auto Setup
- Adjust
New Adapter Class
if necessary - Click
Save
to save changes into the Ivi Master Configuration file
The config utility will update Assembly Qualified Class Name
field for specified Ivi Driver Software Modules.
After proper config the Adapter Class in Ivi Master Configuration file, then you can forget IVI.C.NET.Adapter and play with IVI.NET Shared Components directly. There no dependence from your application to IVI.C.NET.Adapter.
using System;
using Ivi.Driver;
using Ivi.DCPwr;
namespace IVI.C.NET.Adapter.Test
{
public class IviDCPwrAdapterTest
{
private IIviDCPwr DCPwr = null;
public void InitAdapter()
{
DCPwr = (IIviDCPwr)IviDriver.Create("AgE36xx", true, true, "Simulate=1,RangeCheck=1,QueryInstrStatus=0,Cache=1");
}
public void OutputTest()
{
foreach (IIviDCPwrOutput Output in DCPwr.Outputs)
{
Output.ConfigureCurrentLimit(CurrentLimitBehavior.Regulate, 1);
Output.ConfigureOvp(true, 10);
Output.ConfigureRange(RangeType.Voltage, 50);
Output.VoltageLevel = 8;
Output.TriggerSource = "Immediate";
Output.TriggeredCurrentLimit = 0.5;
Output.TriggeredVoltageLevel = 7;
Output.Enabled = true;
Output.ConfigureCurrentLimit(CurrentLimitBehavior.Trip, 5);
Output.ConfigureOvp(false, 8);
Output.VoltageLevel = 5;
Output.TriggerSource = "Software";
Output.TriggeredCurrentLimit = 2;
Output.TriggeredVoltageLevel = 5.1;
Output.Enabled = false;
}
}
}
}