Software
R&S
®
TS-PSU12
35
User Manual 1504.4524.12 ─ 05
/* configure channel 1 earth tied */
DCPWR_Conf_Ground_Relay ( 0, residDcpwr, "CH1", 1,
&errorOccurred, &errorCode, errorMessage);
/* connect channel 1 to front connector */
SWMGR_Connect ( 0, residSwmgr, "CH1", "CH1_1",
&errorOccurred, &errorCode, errorMessage);
/* set current limit range for channel 1 to 100.0 mA */
DCPWR_Conf_Output_Range ( 0, residDcpwr, "CH1", DCPWR_VAL_CURRENT, 100.0e-3,
&errorOccurred, &errorCode, errorMessage);
/* set current limit for channel 1 to 10 mA; current limit behavior is regulate */
DCPWR_Conf_Current_Limit ( 0, residDcpwr, "CH1", DCPWR_VAL_REGULATE, 10.0e-3,
&errorOccurred, &errorCode, errorMessage);
/* select voltage range 12 V*/
DCPWR_Conf_Output_Range ( 0, residDcpwr, "CH1", DCPWR_VAL_VOLTAGE, 12.0,
&errorOccurred, &errorCode, errorMessage);
/* set voltage to 10 V */
DCPWR_Conf_Voltage_Level ( 0, residDcpwr, "CH1", 10.0,
&errorOccurred, &errorCode, errorMessage);
/* wait until relays have settled; timeout 500 ms */
SWMGR_WaitForDebounce ( 0, residSwmgr, 500,
&errorOccurred, &errorCode, errorMessage);
/* switch on channel 1 */
DCPWR_Conf_Output_Enabled ( 0, residDcpwr, "CH1", 1,
&errorOccurred, &errorCode, errorMessage);
/* configure the measurement: Sample Count 40, Sample Interval 1 ms, Delay 0.0 */
DCPWR_Conf_Measurement ( 0, residDcpwr, "CH1", 40, 1.0e-3, 0.0,
&errorOccurred, &errorCode, errorMessage);
/* measure the output current */
DCPWR_Measure ( 0, residDcpwr, "CH1", DCPWR_VAL_CURRENT, &result,
&errorOccurred, &errorCode, errorMessage);
/* switch off channel 1 */
DCPWR_Conf_Output_Enabled ( 0, residDcpwr, "CH1", 0,
&errorOccurred, &errorCode, errorMessage);
/* disconnect all */
SWMGR_DisconnectAll ( 0, residSwmgr,
&errorOccurred, &errorCode, errorMessage);
/* configure channel 1 earth free again */
Sample programmes