LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Power Supply Voltage Control

Hello, 

 

I am using a USB-231 and ULx for NI LabVIEW to control the voltage coming from a power supply. The VI I currently have has a lot of moving parts, but so far what it accomplishes is reading a 0-10V signal provided by the power supply and converting it to the "actual" voltage (which is anywhere from 0-250kV). I then have a property node where I can increase the voltage by any increment I need. The problem is, when I try to connect this property node to my converted voltage, I get an error saying it connects to more than one data source. Same thing happens when I try to change the converted power supply value to a control. All of this is found towards the bottom of the attached VI. 

 

If anyone has ideas on how I can fix this or needs me to clarify something, please let me know. 

Thank you! 

0 Kudos
Message 1 of 7
(1,528 Views)

Not sure why you think you need to use a property node to increment the voltage?

I cannot open your vi to look at it, but sounds like you need to rethink you strategy.

You might want to save the vi in a slightly older version so more people can look at it.

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 2 of 7
(1,502 Views)

The property node is used so that I can change the value of the increments whenever I need to. I reattached the VI as version 2016 (or it should be, at least). 

0 Kudos
Message 3 of 7
(1,444 Views)

Hi tj,

 


@tjhanks wrote:

The property node is used so that I can change the value of the increments whenever I need to.


Why do you need to bury that property node inside an event structure inside a While loop, which is only stopped when the panel of the VI is closed?

Why do you need to place this While loop inside another While loop, which handles your DAQ routines?

 

What did you learn about "THINK DATAFLOW!" until now?

Did you learn any loop will iterate once the code inside has finished? (Your code shows lack of DATAFLOW understanding…)

 

What's the point of this code:

You read the value of "Voltage increment" (using a property node where you could read from the terminal) to create a ValueChange event for the very same "Voltage increment". That event will be handled in the event case, just to read the same value again from the "Voltage increment" terminal and write it into another control???

Why not read the "Voltage increment" terminal and write to a local variable of "Numeric "power supply voltage"?

 

Why is there so much duplicated code in your VI? (Ever heard about the advantages of using subVIs?)

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(1,438 Views)

Apologies that it's not an attractive VI, I am still learning. 

 

However, everything except what I had described works as I need it to. I am not concerned with the rest of it so much as the part you pointed out, which as far as being able to change the increment value whenever I need while the VI runs, it does that well.

 

"Numeric (power supply voltage)" I would ideally like to be a control that is connected to "Power Supply Voltage (0-250kV)" somehow so that I can control the voltage. Insofar I can only control "Numeric (power supply voltage)" which is a variable that means nothing to me since it isn't related to the 0-10V coming in. When I try to connect it, I get an error. 

 

Hope this makes sense, also what did you mean by "Why not read the "Voltage increment" terminal and write to a local variable of "Numeric "power supply voltage"?" It may help me if you clarified this a little bit. Thank you! 

0 Kudos
Message 5 of 7
(1,427 Views)

Hi tj,

 


@tjhanks wrote:

"Numeric (power supply voltage)" I would ideally like to be a control that is connected to "Power Supply Voltage (0-250kV)" somehow so that I can control the voltage.


This doesn't make any sense at all!

"Power (0-250kV)" is an indicator displaying the (scaled) result of your AI-DAQ reading. You cannot control this AI-DAQ task by changing some other control on your UI!

 

To be able to "control" that voltage reading you need to manipulate the power/voltage source. As there is no (hardware related) output in your VI I see no way to control your external power supply hardware: please provide informations on your current testbench setup, like an electric schematics…

 

Why are there indicators with exactly the same label (like "Input voltage")? This is (very) dangerous, especially when you work with local variables/property nodes!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(1,421 Views)

I just have a power supply connected to a USB-231. Is there no way to programmatically manipulate the power source? 

0 Kudos
Message 7 of 7
(1,370 Views)