Software
R&S
®
TS-PSM3
36
User Manual 1178.2780.02 ─ 01
/* set dmm function, resolution and auto ranging */
DMM_Conf_Measurement ( 0, residDmm, "DC_CURRENT", 0.0,
"AUTO_RANGE_ON", 1.0e-4,
&errorOccurred, &errorCode, errorMessage);
/* connect DMM_LO to local analog bus line a2 and DMM_HI to analog
bus line c1 */
ROUTE_Execute ( 0, residRoute, "DMM_LO > $LABa2, DMM_HI > $LABc1",
&errorOccurred, &errorCode, errorMessage);
/* bypass the high-power-relay and current-voltage-converter of
TS-PSM3 channel 9 with the ampere meter of TS-PSAM */
ROUTE_Execute ( 0, residRoute, "PSM3_CH9_COM > $LABc1 > $ABc1,
PSM3_CH9_NO > $LABa2 > $ABa2",
&errorOccurred, &errorCode, errorMessage);
/* open the high-power relay on TS-PSM3 channel 9;
wait for debounce for all switch modules */
ROUTE_Execute ( 0, residRoute, "PSM3_CH9_NO | PSM3_CH9_COM, ?#",
&errorOccurred, &errorCode, errorMessage);
/* measure the current throught the ampere meter of TS-PSAM */
DMM_Read ( 0, residDmm, 1.0, 1, ¤tResultLoadStandby,
&resultsCount,
&errorOccurred, &errorCode, errorMessage);
}
/* disconnect all existing connections */
ROUTE_Execute ( 0, residRoute, "||",
&errorOccurred, &errorCode, errorMessage);
/* close the libraries */
DMM_Cleanup (0, residDmm, &errorOccurred, &errorCode, errorMessage);
ROUTE_Cleanup (0, residRoute, &errorOccurred, &errorCode,
errorMessage);
RESMGR_Cleanup (0, &errorOccurred, &errorCode, errorMessage);
{
char buffer[100];
sprintf( buffer, "Load Active Current: %.3f A\n"
"Load Standby Current: %.3f A",
currentResultLoadActive, currentResultLoadStandby);
MessagePopup( "User Information", buffer );
}
return(0);
}
Programming with GTSL libraries