LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 6009 DAQmx data adquire

Hi people, I'm working in a program with NI 6009 DAQmx data adquire.This program is connect with de NI 6009. In the A0 I connect a capacitor and when I pressed a bottom near capacitor in the labview appears a charging of this capacitor in the graphic, all the time is taking samples. 

 

The program doen't work very good. I need help because I want to create this:

 

Now the program draws a charging in the graphic and pass de voltatge of this in the table but...not so good if someone can help me about this because it take a lot fo samples...and i want the samples of in second 1s the voltatge 1.5s the voltatge 2s the voltatge...

 

The bottom of "hold" is like a pause bottom but didn't work good... I don't know...why .

 

When I pressed the "hold" the program stays in pause and when pass this I need another bottom to save the results of the table in a "Microsoft Excel".

 

Another think is the stop bottom doesn't work..too. 😞

 

Please...I need help...

 

 

thanks a lot.

0 Kudos
Message 1 of 20
(3,632 Views)

anyone?

0 Kudos
Message 2 of 20
(3,588 Views)

help please!

0 Kudos
Message 3 of 20
(3,578 Views)

First, Many of us who participate in this Forum are volunteers and quite a few only post during their working hours. So please have some patience on a weekend.

 

The time constant in your circuit is 220 ms or less depending on which resistors are selected. So after 1 second the voltage will be ~ 5 V. After 1.5 s, V = 5. After 2 s, V = 5.  Not too interesting.  Probably more interesting is to take samples at 1 or 10 ms intervals and plot that.

 

It is not clear what you want the Hold button to do. Do you want to suspend updating the displays? Do you want to suspend acquiring data? What do you want to happen after the Hold button is set back to False? Clear displays? Append new data to the data present before Hold? Something else?  Because of the time constant the data will almost always be constant at 5 V after manual operation of the Hold button.

 

The reason you have problems with your hold button is that you are reading the local variable in a greedy loop. Because there is no delay in that loop, it will consume all the CPU resources available. Furthernore, no other part of the VI can run until that loop stops.

 

To get the buttons to all be responsive and available look at event structures and Producer/Consumer Design Patterns.

 

Lynn

0 Kudos
Message 4 of 20
(3,567 Views)

First of all, srry for my impatience but i need help.

 

The HOLD his function is like this https://decibel.ni.com/content/docs/DOC-10792 , I tried this and It didn't work so good...for this reason I need to another way to do this. When the programe pause I put "Save to excel" and pass to excel the results of table but ...well I add the program that I modify.

 

I put new things...but I would be better if anyone can revise because I don't know which is the better thing to make the table if the build table or the other.

 

The time of the table it's the other problem I want to take samples every second or 0.5s read the voltage and only 20 samples.

 

thanks for your time.

 

 

0 Kudos
Message 5 of 20
(3,559 Views)

I change what you say and no work... :S

0 Kudos
Message 6 of 20
(3,523 Views)

I put an image what bad it happen with the samples...it takes a lot of samples and I only want 20.

 

The seconds appears 00 00 00 00 00 01 01 01 01 .... and this I couldn't solve...

 

what I have to do?

 

please help.

Download All
0 Kudos
Message 7 of 20
(3,513 Views)

Read the help file for the Format Date/Time String function. To get fractional seconds you need a different format string. Try "%S%3u".

 

I do not have the DAQmx VIs but it looks like you are telling the Read VI to read 5000 samples. If you only want 20, change the number of samples per channel input.  Then you will probably get a buffer overflow error. You might be better off reading all the data and decimating to get the result you seem to want.

 

Lynn

0 Kudos
Message 8 of 20
(3,480 Views)

mm  yes the problem of the samples if I put 20...the program did only 20 but in the graph don't appears good the dischargin because I only see 0-0.2, I don't know its very strange...

0 Kudos
Message 9 of 20
(3,461 Views)

And you say.."reading all the data and decimating to get the result" how can I do this? 

0 Kudos
Message 10 of 20
(3,455 Views)