
Operation,
Remote Operation
1-2-5
RGS-2000NG TCAS Test Set Operation Manual
139187 / Rev. 500
Page 240
Subject to Export Control. See Cover Page for details.
September 2021
{
int index;
double delay;
// find session index
for (index = 0; index < MAX_SESSIONS; index++)
{
if (sessionInfo[index].session == instHandle)
break;
}
// Invalid Session abort
if (index >= MAX_SESSIONS)
return RGS_ERROR_CMD_WAIT;
// Wait until the minimum delay has been achieved
do {
delay = Timer() - sessionInfo[index].startTime;
} while (delay < sessionInfo[index].curWaitTime);
return VI_SUCCESS;
}
//=============================================================================
// Function: Log last command transmission
// Purpose: This function stores the timer count when called to indicate
// the time when the instrument was last communicated with.
//=============================================================================
ViStatus RGS_nxtCmdLog (ViSession instHandle, ViReal64 waitToNxtCmd)
{
int index;
// find session index
for (index = 0; index < MAX_SESSIONS; index++)
{
if (sessionInfo[index].session == instHandle)
break;
}
// Invalid Session abort
if (index >= MAX_SESSIONS)
return RGS_ERROR_CMD_WAIT;
sessionInfo[index].startTime = Timer();
sessionInfo[index].curWaitTime = waitToNxtCmd;
return VI_SUCCESS;
}
Example Program (cont)