![Rohde & Schwarz TS-PSU12 User Manual Download Page 53](http://html.mh-extra.com/html/rohde-and-schwarz/ts-psu12/ts-psu12_user-manual_1477967053.webp)
Software
R&S
®
TS-PSU12
37
User Manual 1504.4524.12 ─ 05
/* connect channel 1 to front connector */
status = rspsu_Connect (vi, "CH1", "CH1_1");
/* set current limit range for channel 1 to 100.0 mA */
status = rspsu_ConfigureOutputRange (vi, "CH1", RSPSU_VAL_RANGE_CURRENT, 100.0E-3);
/* set current limit for channel 1 to 10 mA; current limit behavior is regulate */
status = rspsu_ConfigureCurrentLimit (vi, "CH1", RSPSU_VAL_CURRENT_REGULATE, 10.0E-3);
/* select voltage range 12 V*/
status = rspsu_ConfigureOutputRange (vi, "CH1", RSPSU_VAL_RANGE_VOLTAGE, 12.0);
/* set voltage to 10 V */
status = rspsu_ConfigureVoltageLevel (vi, "CH1", 10.0);
/* wait until relays have settled; timeout 500 ms */
status = rspsu_WaitForDebounce (vi, 500);
/* switch on channel 1 */
status = rspsu_ConfigureOutputEnabled (vi, "CH1", VI_TRUE);
/* configure the measurement: Sample Count 40, Sample Interval 1 ms, Delay 0.0 */
status = rspsu_ConfigureMeasurement (vi, "CH1", 40, 0.001, 0.0);
/* measure the output current */
status = rspsu_Measure (vi, "CH1", RSPSU_VAL_MEASURE_CURRENT, & result);
/* switch off channel 1 */
status = rspsu_ConfigureOutputEnabled (vi, "CH1", VI_FALSE);
/* disconnect all */
status = rspsu_DisconnectAll(vi);
/* configure channel 1 earth free again */
status = rspsu_ConfigureGround (vi, "CH1", VI_FALSE);
/* close the driver session */
status = rspsu_close (vi);
return 0;
}
Sample programmes