A check-out the Rigol LabVIEW example for the DP800 series of power supplies.
I'm planning to automate the measurements on the programmable electronic load that Peter, Jon and I are designing here on element14. For that I need to control a power supply, that load and an oscilloscope. In this exercise, I'm learning to program the Rigol DP832A, in particular enabling a channel and set it to several values repeatedly. |
Rigol's Example
On Rigol's website you can find an example that controls the instrument and reads some data.
You can select a channel, set the voltage, then configure and control protection for over-voltage and over-current.
The program then measures the actual voltage and current, and logs it to time based plots.
I can use several of the blocks for my exercise. I'm trying to let the power supply step through a set of voltages, then do measurements on a device under test based on those voltages.
I'm not that interested at the moment in the measurement and logging features, but will check them out anyways.
The example program comes with the driver for the supply. You download it as a zip file.
Installing is done by extracting that archive in the [D:\Program Files (x86)\National Instruments\LabVIEW 2014]\instr.lib folder (you'll have to find your LabVIEW installation folder and adapt the path to that).
You can then find and run the example from the instr.lib\RIGOL DP800 Series\RIGOL DP800 Series.lvproj project.
Setting Initial Parameters
In this test I'll use the GUI to set the parameters before execution. When automating my setup I'll use the LabVIEW to set everything to a known state.
I select the instrument in the VISA resource control, select the channel and voltage.
In the lower part of the screen I set the limits of the supply and activate them.
When I press the Run arrow at the top of the screen, the LabVIEW program starts and applies all these settings. It then activates the channel.
In the background, the workflow each time uses SCPI to talk to the device:
... and each of those SCPI calls use a lower level state machine that talks to the supply:
LabVIEW lets you step through these flows. It highlights the block that's active and you can check payload.
In the example below, you see the result of selecting the channel, and enabling the over current protection. The SCPI command that combines these is being prepared just before it's sent to the instrument:
Top Comments