
Software
R&S
®
TS-PSAM
38
User Manual 1142.9878.12 ─ 12
&errorOccurred, &errorCode, errorMessage);
cs("DCPWR_Conf_Output_Enabled");
/* read voltage */
DMM_Read (0, residDmm, 0.1, 1, &result, & resultCount,
&errorOccurred, &errorCode, errorMessage);
cs("DMM_Read");
/* report result */
printf("Result: %.3f V\n", result);
/* switch off power supply */
DCPWR_Conf_Output_Enabled (0, residDcpwr, supplyName, 0,
&errorOccurred, &errorCode, errorMessage);
cs("DCPWR_Conf_Output_Enabled");
/* disconnect all */
ROUTE_Execute (0, residRoute, "||",
&errorOccurred, &errorCode, errorMessage);
cs("ROUTE_Execute");
/* configure DCS earth free again; default */
DCPWR_Conf_Ground_Relay (0, residDcpwr, supplyName, 0,
&errorOccurred, &errorCode, errorMessage);
cs("DCPWR_Conf_Ground_Relay");
}
/* FUNCTION ****************************************************************/
/* use of TS-PSAM for resistance measurement
****************************************************************************/
static void runDmmTest ( void )
{
ViInt32 resultCount = 0;
ViReal64 result = 0.0;
/* configure 4-wire resistance measurement */
DMM_Conf_Measurement (0, residDmm, "4_WIRE_RES", 1000.0,
"AUTO_RANGE_OFF", 1e-3,
&errorOccurred, &errorCode, errorMessage);
cs("DMM_Conf_Measurement");
/* DMM should be earth tied in this test */
DMM_Conf_Ground_Relay (0, residDmm, 1,
&errorOccurred, &errorCode, errorMessage);
cs("DMM_Conf_Ground_Relay");
/* connect DMM to UUT */
ROUTE_Execute (0, residRoute, "HI > UUT_VCC, LO > UUT_GND,"
"SHI > UUT_R1.1, SLO > UUT_R1.2, ?#",
Programming Example