PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring with SMU (PXIe-4141)

I need to give power to a system and measure the result. I'm doing this in Labview to create an automated measurement station.

As I want to keep it modular, I have a VI to adjust the voltage of an output (this one seems to work properly, as I have the voltage I set after executing it, and the current measured seems reasonable) and another VI to only measure voltage, current and calculate power (I want to reuse them both later).

Both VIs follow the same structure: initialize niDCpower -> set parameters (in the case of the measuring VI there is none to set) -> niDCpower initiate -> measure -> niDCpower close.

Then after I set the voltage with the first, the handle is closed, I need to get a new handle and initiate DCpower. In this step is where I'm having the problem: after niDCpower initiate, the output voltage drops to 0. The only way I found to do it as I want is to keep the session open after the first VI (remove niDCPower close) and carry the instrument handle to the measurement VI, but I don't know if this is a good practice.

Is any other way of doing this?

I'm attaching the VIs here, voltage set is almost as the example.

Thanks in advance

0 Kudos
Message 1 of 2
(507 Views)

jano2358@gmail.com wrote:

The only way I found to do it as I want is to keep the session open after the first VI (remove niDCPower close) and carry the instrument handle to the measurement VI, but I don't know if this is a good practice.


Yes, that is the best practice: open a session and keep it alive until you complete all your work. This is like powering up your laptop, completing all your work, and then powering it down. You won't restart your laptop every time you open a new application or webpage.


This help article explains the various states in the session model.

https://www.ni.com/docs/en-US/bundle/ni-dcpower/page/programming-states.html

 

 

 

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 2 of 2
(495 Views)