HP (Hewlett-Packard) Drive Network Card User Manual


 
Using IVI with PAWS
79
5 In the doOpen() interface function, insert the following code below the line
Please insert your CEM driver code here:
hr = driver.CoCreateInstance(CLSID_Agilent34401);
if (FAILED(hr))
{
Display("\033[30;41m Bad return from
CoCreateInstance() method\033[m\n");
}
hr = driver->Initialize(CComBSTR("GPIB0::23::INSTR"),
VARIANT_FALSE,
VARIANT_TRUE,
CComBSTR("Simulate=TRUE"));
if (FAILED(hr))
{
Display("\033[30;41m Bad return from Initialize()
method\033[m\n");
}
Note:
doOpen is called for the first time when the run-time system loads the PAWS
project. If you intend to use non-ATLAS modules in your ATLAS code, subsequent
calls to doOpen will be made and you will need to execute the code above only
once.
6 To set the function for DC Voltage, the range to 1.5 volts, and the resolution to
1 millivolt, select the DMM.cpp file from the PAWS Project window.
7 In the DMM_Setup() interface function, insert the following code below the
line Please insert your CEM driver code here :
hr = driver->put_Function(Agilent34401FunctionDCVolts);
if (FAILED(hr))
{
Display("\033[30;41m Bad return from
put_Function(Agilent34401FunctionDCVolts)method\033[m\n"
);
}
hr = driver->get_DCVoltage(&pDMMDCVolt);