03-16-2023 06:36 AM
I have a PXIe-4139 DCPower SMU. It sometimes goes into overload protection for various reasons. It then has to be reset to work again. In MAX I can simply click "Reset" and it works. But I don't know how to do it in LabVIEW.
There is the "niDCPower Reset Device VI" function that in the help says:
This VI has the same functionality as using reset in Measurement & Automation Explorer (MAX)
Great! But it needs a valid session handle, which, quote, "is obtained from the niDCPower Initialize With Independent Channels VI". But that vi returns an error that the board is in overload protection and doesn't return a valid session handle...
So this doesn't work:
How can I reset a DCPower device programmatically in LabVIEW?
03-16-2023 06:49 AM
03-16-2023 07:21 AM
@GerdW wrote:
Hi Basjong,
have you tried the DCPowerDisable function?
I haven't, but it has the same problem as the Reset VI, in that it needs a valid session reference, which I cannot obtain since the initialize VI always gives an error.
03-16-2023 08:46 AM
The Reset functionality in the NI MAX uses the System Configuration API. You can find an example of resetting devices using SysCfg API at
<LabVIEW>\examples\nisyscfg\Reset All Devices.vi
You can specify an expert of "dcpowerscx" to the filter to get all NI-DCPower devices, or you can filter out the specific device by the Alias Name.