Software
R&S
®
TS-PSM4
32
User Manual 1178.2796.02 ─ 01
/* get the current value which corresponds to the measured voltage
value at TS-PSM4 channel 10 */
rspsm4_GetCalculatedCurrent ( psm4SessionHandle, "CH10",
voltageResult,
¤tResultLoadStandby );
if( currentResultLoadStandby < 1.0 )
{
/*
the current through the load is lower than 1 ampere - we can switch
the current directly to the ampere meter of the TS-PSAM module
to perform a more sensitive measurement of the standby current
*/
/* disconnect DMM_HI and DMM_LO from local analog bus lines a2 and
b1 */
ROUTE_Execute ( 0, residRoute, "DMM_HI | $LABa2, DMM_LO | $LABb1",
&errorOccurred, &errorCode, errorMessage);
/* disconnect the 5 mOhms shunt resistor of TS-PSM4 channel 10
from analog bus line a2 and b1 */
ROUTE_Execute ( 0, residRoute, "PSM4_CH10_NO | $LABa2 | $ABa2,
PSM4_CH10_NO | $LABb1 | $ABb1",
&errorOccurred, &errorCode, errorMessage);
/* 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-PSM4 channel 9 with the ampere meter of TS-PSAM */
ROUTE_Execute ( 0, residRoute, "PSM4_CH9_COM > $LABc1 > $ABc1,
PSM4_CH9_NO > $LABa2 > $ABa2",
&errorOccurred, &errorCode, errorMessage);
/* open the high-power relay on TS-PSM4 channel 9;
wait for debounce for all switch modules */
ROUTE_Execute ( 0, residRoute, "PSM4_CH9_NO | PSM4_CH9_COM, ?#",
&errorOccurred, &errorCode, errorMessage);
/* measure the current throught the ampere meter of TS-PSAM */
DMM_Read ( 0, residDmm, 1.0, 1, ¤tResultLoadStandby,
&resultsCount,
Programming with GTSL Libraries