
Software
R&S
®
TS-PSAM
32
User Manual 1142.9878.12 ─ 12
/* configure DCS earth free again; default state */
sta = rspsam_cnx_Gnd(vi, RSPSAM_VAL_INSTRLINE_DCS_LO,
RSPSAM_VAL_RELAY_OPEN);
chk ("rspsam_cnx_Gnd");
/* report the result */
if (VI_SUCCESS == sta)
{
printf("Reading: %.3f V\n", reading);
}
}
/* FUNCTION *****************************************************************/
/* configures a test using the DMM for a 4 wire resistor measurement
*****************************************************************************/
static void runDmmTest ( void )
{
ViReal64 reading;
/* select function and range */
sta = rspsam_ConfigureMeasurement(vi, RSPSAM_VAL_4_WIRE_RES, 1000.0, 0.001);
chk ("rspsam_ConfigureMeasurement");
/* configure DMM earth tied */
sta = rspsam_ConfigureGround (vi, VI_TRUE);
chk ("rspsam_ConfigureGround");
/* connect DMM to local analog bus */
sta = rspsam_Connect(vi, "DMM_HI","ABa1");
chk ("rspsam_Connect");
sta = rspsam_Connect(vi, "DMM_SHI","ABb1");
chk ("rspsam_Connect");
sta = rspsam_Connect(vi, "DMM_LO","ABc1");
chk ("rspsam_Connect");
sta = rspsam_Connect(vi, "DMM_SLO","ABd1");
chk ("rspsam_Connect");
/* wait until configurations have settled; perform measurement */
sta = rspsam_Read(vi, 5000, & reading);
chk ("rspsam_Read");
/* disconnect components from local analog bus */
sta = rspsam_DisconnectAll(vi);
chk ("rspsam_DisconnectAll");
Programming Example