
Software
R&S
®
TS-PSAM
37
User Manual 1142.9878.12 ─ 12
****************************************************************************/
static void cs ( char * funcName )
{
if ( errorOccurred )
{
printf ("%s returned 0x%08X\n%s\n\n", funcName, errorCode, errorMessage);
}
}
/* FUNCTION ****************************************************************/
/* use of TS-PSAM components DCS and MU separately
****************************************************************************/
static void runDcsTest ( void )
{
ViInt32 resultCount = 0;
ViReal64 result = 0.0;
/* configure volatage measruement */
DMM_Conf_Measurement (0, residDmm, "DC_VOLTS", 5.0,
"AUTO_RANGE_OFF", 1e-3,
&errorOccurred, &errorCode, errorMessage);
cs("DMM_Conf_Measurement");
/* DCS should be earth tied in this test */
DCPWR_Conf_Ground_Relay (0, residDcpwr, supplyName, 1,
&errorOccurred, &errorCode, errorMessage);
cs("DCPWR_Conf_Ground_Relay");
/* connect power supply */
ROUTE_Execute (0, residRoute, "DCS_HI > UUT_VCC, DCS_LO > UUT_GND",
&errorOccurred, &errorCode, errorMessage);
cs("ROUTE_Execute");
/* connect measurement unit of TS-PSAM */
ROUTE_Execute (0, residRoute, "MU_HI > UUT_R1.1, MU_LO > UUT_R1.2",
&errorOccurred, &errorCode, errorMessage);
cs("ROUTE_Execute");
/* configure power supply */
DCPWR_Conf_Current_Limit (0, residDcpwr, supplyName,
DCPWR_VAL_REGULATE, 0.01,
&errorOccurred, &errorCode, errorMessage);
cs("DCPWR_Conf_Current_Limit");
DCPWR_Conf_Voltage_Level (0, residDcpwr, supplyName, 1.1,
&errorOccurred, &errorCode, errorMessage);
cs("DCPWR_Conf_Voltage_Level");
/* switch on power supply */
DCPWR_Conf_Output_Enabled (0, residDcpwr, supplyName, 1,
Programming Example