Operation,
Remote Operation
1-2-5
RGS-2000NG TCAS Test Set Operation Manual
139187 / Rev. 500
Page 222
Subject to Export Control. See Cover Page for details.
September 2021
return RGS_status;
if ((RGS_status = viClose (rmSession)) < 0)
return RGS_status;
RGS_status = RGS_sessionInfoClose (RGSGenSession[(RGSGen-1)]);
if (instPtr != NULL)
free (instPtr);
}
}
return RGS_status;
}
//=============================================================================
// Function: RGS_writeInstrData
// Purpose: This function writes a command string to the instrument.
// Parameter List: RGSGen - Generator number
// writeBuffer - String to write
// waitToNxtCmd - Delay to next command
// Return Values: Zero on success, non-zero otherwise
//=============================================================================
ViStatus _VI_FUNC RGS_writeInstrData (ViInt16 RGSGen,
ViString writeBuffer,
ViReal64 waitToNxtCmd)
{
ViStatus RGS_status = VI_SUCCESS;
ViChar WriteBuf[200] = "", Terminator[3] = "";
ViInt32 bytes;
ViInt16 retry;
ViUInt16 statusbyte = 0;
ViChar resourceName[50] = "";
clock_t start_time;
long device = 0;
Terminator[0]=0x0d; // Add CR and null to end of string
Terminator[1]=0x00;
Fmt(WriteBuf,"%s<%s%s", writeBuffer, Terminator);
bytes = strlen (WriteBuf);
retry = 0; // Initialize
if (strcmp (OutBuffer, writeBuffer) != 0)
{
strcpy (OutBuffer, writeBuffer);
}
Example Program (cont)