====== DC Power Supply ====== Commands that provide access to **DC Power Supply** data and functions. ===== Get Current State ===== ---- Get the current state of the instrument's channel **Command** * **dc** - (Object) - The DC power supply object. * **#** - (Array) - An array of command objects to apply to the DC power supply channel. * **command** - (String) - The Get Current State command: “getCurrentState” **Response** * **gpio** - (Object) - The DC power supply object. * **#** - (Array) - An array of command objects applied to the DC power supply channel. * **command** - (String) - The Get Current State command: “getCurrentState” * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. * **state** - (String) - The current state of the channel: "idle" or "running". * **voltage** - (Integer) - The current measured value of the channel in mV. === Example === **Command** { "dc": { "1": [ { "command":"getCurrentState" } ] } } **Response** { "dc": { "1": [ { "command": "getCurrentState", "statusCode": 0, "wait": 0, "state": "idle", "voltage": 3300 } ] } } \\ ===== Get Voltage ===== ---- Get the output voltage(s) of the specified DC power supply channel(s). **Command** * **dc** - (Object) - The DC power supply object. * **#** - (Array) - An array of command objects to apply to the DC power supply channel. * **command** - (String) - The Get Voltage command: “getVoltage” **Response** * **gpio** - (Object) - The DC power supply object. * **#** - (Array) - An array of command objects applied to the DC power supply channel. * **command** - (String) - The Get Voltage command: “getVoltage” * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. * **voltage** - (Integer) - The current measured value of the channel in mV. ===Example:=== **Command** { "dc":{ "1":[ { "command":"getVoltage" } ] } } **Response** { "dc":{ "1":[ { "command":"getVoltage", "statusCode":0, "wait":100, "voltage":3300 } ] } } \\ \\ ===== Set Voltage ===== ---- Set the output voltage(s) of the specified DC power supply channel(s). **Command** * **dc** - (Object) - The DC power supply object. * **#** - (Array) - An array of command objects to apply to the DC power supply channel. * **command** - (String) - The Set Current State command: "setCurrentState” * **voltage** - (Integer) - The desired voltage in mV. **Response** * **gpio** - (Object) - The DC power supply object. * **#** - (Array) - An array of command objects applied to the DC power supply channel. * **command** - (String) - The Set Current State command: "setCurrentState” * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. ===Example:=== **Command** { "dc":{ "1":[ { "command":"setVoltage", "voltage":3300 } ] } } **Response** { "dc":{ "1":[ { "command":"setVoltage", "statusCode":0, "wait":500 } ] } } \\ \\