LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to control voltage with my code?

Doug, there are a few things, maybe I am confusing you:


the Pulse code I posted is for my counter, which works. I simply need to figure out how to get it to not 'freeze' my UI and program when it is running..

 

The analog voltage I speak of, is something that I have yet to add, and is what I ask in the first post of this thread. I need to add the ability of my program to control the analog out on the DAQ board.

0 Kudos
Message 21 of 26
(509 Views)
Since you don't understand LabVIEW and basic dataflow, please take the free tutorials.

You choose to use an example without any understanding of LabVIEW. The example was NOT intended to be used as a subVI. The reason it hangs your main is because of the while loop. Simple as that.
0 Kudos
Message 22 of 26
(507 Views)

Living and learning 🙂 Thanks..

 

Doug

 

Got more information about the power supply:

 

There are 4 pins on the power supply that is being controlled.

2 of them go to  DAQ analog inputs - voltage and current, they are called 'test points' on the power supply.

2 of them go to DAQ analog outputs - voltage and current, thses are called 'V program input' and 'current program input'

 

What my next task is is to write voltage and current via my  AO0 and AO1 to the power supply 'program inputs'

0 Kudos
Message 23 of 26
(504 Views)

'You choose to use an example without any understanding of LabVIEW. The example was NOT intended to be used as a subVI. The reason it hangs your main is because of the while loop. Simple as that.'

 

I tried the example without the while loop and I do not get a proper pulse. For testing, could I physically wire my counter output to an analog in to see what happens in NIMax?

0 Kudos
Message 24 of 26
(499 Views)

Create functional global variable vi's based on the code I showed for both your pulse train and for your analog output. Your don't need or want the while loop as you have shown as Dennis said.

 

Your app with all the features needs to be packaged in a state machine or consumer/producer architecture.

Doug

"My only wish is that I am capable of learning each and every day until my last breath."
0 Kudos
Message 25 of 26
(488 Views)

A consumer/producer is basically 2 separate loops? I have that, i believe.

 

I have 1 loop that is the 'main' program and then my 2nd loop contains the even structure that handles the UI clicks..

0 Kudos
Message 26 of 26
(486 Views)