I'm creating a TestStand custom step using Labwindows/CVI. The step will control an Agilent Rf Signal Generator and I have to use their IVI-COM driver. One of the instrument functions isn't covered by the driver (Set Phase). I brought this to their (Agilent's) attention and asked for a workaround solution (along the line of a VXIPNP Passthrough function for sending SCPI strings). This was their response:
******
If there is a need for an instrument command which is not present in the driver, one can use the WriteString() method to send a general SCPI command to the instrument. Here is this example of how the RF Signal Generator IVI base class driver can send SCPI directly to the instrument.
spRfSigGen->System->IO->WriteString(_bstr_t(":AM:INT:FREQ 2.0e03 Hz"),true);
spRfSigGen->System->IO->WriteString(_bstr_t(":AM:INT:FUNC TRI"),true);
The available SCPI commands are found in the SCPI Command Reference for the instrument.
*******
Basically the question is can anyone convert this into LabWindow/CVI ?????????
I have created and Active X controller (using the wizard) for their IVI COM driver type library and have traversed the object tree
driverObj->SystemObj->IOObj where does one go after that to actually write a string? I also created An Active X controller for the visacom type library and tried this function
static int RFsigGen_SetPhase(CAObjHandle driverObj)
{
CAObjHandle systemObj = 0;
CAObjHandle IOObj = 0;
int error = 0;
error = AgilentRfSigGenLib_IAgilentRfSigGenGetSystem (driverObj, NULL, &systemObj);
if (error == 0)
error = AgilentRfSigGenLib_IAgilentRfSigGenSystemGetIO (systemObj, NULL, &IOObj);
if (error == 0)
error = VisaComLib_IMessageWriteString (IOObj, NULL, ":PHAS:REF", NULL);
if (error == 0)
error = VisaComLib_IMessageWriteString (IOObj, NULL, ":PHAS 30DEG", NULL);
return error;
}
Not surprisingly and error is returned at VisaComLib_IMessageWriteString (IOObj, NULL, ":PHAS:REF", NULL);
Can anyone put me on the right track ?
Cheers
DWW