LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Vmax of a continuous pulse train

Hi,

 

I have created this VI to generate a continous digital pulse train from a counter output channel started by a external digital trigger. But now I can set the Vmax (max Voltage) of the digital pulse? I want to set it to 2.4V but do not how.

 

From the testing hardware to which I am giving this pulse I want to acquire and graph the Voltage of the battery (3V coin battery) (input to DAQ). But I want the pulse generating VI to stop immidiatly when the battery measures less than equal 2.1V. How I can do that.

 

I am attaching both VI's.

0 Kudos
Message 1 of 12
(3,338 Views)

Read the specs of your DAQ card. Most/all are set for a TTL output of 5V and cannot be changed.

 

Since the acquire example you posted only runs once (do NOT use the run continuous button), you don't have any method to monitor the results. In any case, you would need to combine your generation and read functions in a single VI.

 

Immediately is also something you will have a problem with. You would not be able to do any comparison until the acquisition is complete and you get results every second. That's not very immediate to me. Aside from reading fewer samples, not really sure how to make the detection faster. I'll think about it but I hope someone else has an idea.

0 Kudos
Message 2 of 12
(3,331 Views)

 


@Dennis Knutson wrote:

Read the specs of your DAQ card. Most/all are set for a TTL output of 5V and cannot be changed.

 

Since the acquire example you posted only runs once (do NOT use the run continuous button), you don't have any method to monitor the results. In any case, you would need to combine your generation and read functions in a single VI.

 

Immediately is also something you will have a problem with. You would not be able to do any comparison until the acquisition is complete and you get results every second. That's not very immediate to me. Aside from reading fewer samples, not really sure how to make the detection faster. I'll think about it but I hope someone else has an idea.


 

Thanks. So the high level cannot be changed? 😞 . I want to monitor the acquired voltage. So I could run it with the continous button. Or?

 

How I can combine the VIs into one VI and immiadtely could also be after 1 second or so.

0 Kudos
Message 3 of 12
(3,326 Views)

NO, do not use the run continuous button. Look at examples called 'Continuous'

 

To combine code, copy the code in one VI and paste it into the other. Modify from there (i.e. put the read and write functions inside a common loop).

0 Kudos
Message 4 of 12
(3,319 Views)

 


@Dennis Knutson wrote:

NO, do not use the run continuous button. Look at examples called 'Continuous'


 

OK Thanks

 


@Dennis Knutson wrote:

 

To combine code, copy the code in one VI and paste it into the other. Modify from there (i.e. put the read and write functions inside a common loop).


Should I copy the wholw Block diagram of one VI and paste it to the other? how to make the common loop?

 

0 Kudos
Message 5 of 12
(3,316 Views)

You can paste one block diagram into the block diagram of another VI.

 

While loops are a basic component of LabVIEW and if you do not know how to create them or place functions inside, then I highly recomend you take the LabVIEW 101 tutorial.

0 Kudos
Message 6 of 12
(3,306 Views)

 


@Dennis Knutson wrote:

You can paste one block diagram into the block diagram of another VI.

 

While loops are a basic component of LabVIEW and if you do not know how to create them or place functions inside, then I highly recomend you take the LabVIEW 101 tutorial.


No I know how to add the while loops :). But must I also add anything else or wire anything else? Just create the while loop and put the VIs inside? The Voltage measurement should also be triggered by the rising of the generated pulse. Can you help me with that? What to wire and where?

 

0 Kudos
Message 7 of 12
(3,298 Views)

Try to get something started yourself. Start with the triggered continuous examples for a read.

0 Kudos
Message 8 of 12
(3,290 Views)

I have created both VIs and attached them in my first post. Its just the combining which is creating me problems. I want to tigger with my Pulse VI the Voltage Measurement VI and want to stop the pulse signal when the measurement is on 2.4V

 

 

0 Kudos
Message 9 of 12
(3,284 Views)

Try putting just the DAQmx Read inside the loop. Read the data and do your comparison. The result of the comparison could be wired to a DAQmx Stop Task for the counter task inside a case statement. You would then exit the loop and clear the counter and analog read tasks. I don't see an example with AI Read and a Counter Write but there is one with AI Read and AO Write (Multi-Function-Synch AI-AO). You can perhaps use this as a model except replace the AO functions with your Counter code.

0 Kudos
Message 10 of 12
(3,274 Views)