Changing DC Power Supply Voltage or Current Level on the Fly in LabVIEW

Updated May 15, 2023

Reported In

Hardware

  • PXIe-4113

Software

  • LabVIEW NXG

Driver

  • NI-DCPower

Issue Details

I am trying to build a LabVIEW application in which I am able to set up all the settings and configuration for my power supply session, have it run in the background at a set voltage or current level, and be able to send it commands on the fly to change the output level.

All of the examples in the LabVIEW Example Finder show one voltage or current level being set and output before the session is reset and closed. Is it possible to adjust the voltage or current levels on the fly and have the device output different voltages or currents before resetting and closing the session?

Solution

Yes, the voltage and current levels of the power supply can be dynamically reconfigured while the device is running.

In LabVIEW, these levels can be changed using the niDCPower Voltage Level and niDCPower Current Level property nodes or with the niDCPower Configure Voltage Level and niDCPower Configure Current Level VI's from the NI DCPOWER funtions palette.

NI strongly recommends you to check the verified examples available within the NI Example Finder :
 
2022-03-08_10h33_08.png
 

Additional Information

Some ideas for implementing dynamic reconfiguration include an Event Structure nested in a While Loop which continually checks for changes in a voltage or current level control. A change in the value of the control could trigger an Event Structure case which uses a property node or VI to configure the voltage or current level to reflect the new value of the control.

Another option would be to use an action engine design in which you use a Functional Global Variable (FGV) to store and pass the instrument session handle. After the session has been started and initiated, you would call the FGV to access the access and run a property node or VI to change the voltage or current level on that session while the instrument is running. If you use this method, be sure that you eventually reset and close the session when the VI terminates execution.