LabVIEWForum.de - Timed acquisition

LabVIEWForum.de

Normale Version: Timed acquisition
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Hallo Liebe Labviewers,


I have a problem, and I hope that you can help.

I would like to acquire measurements according to 2 different options:

1** After detecting a digital edge, the script measures for a period of time detaT, and then pauses measuring until the next digital edge.

2** Detect a digital edge, waits for a detaT1, then measures for deltaT2, and then pauses measuring until the next digital edge.

I've been trying many solution, but That didn't work BlushBlush

Any tips will be very very appreciated :9

Vielen Dank im voraus,

Labview_pr
Hi pr,

for 1* and 2* you could setup a DAQmx task with a digital start trigger and a fixed amount of samples. When the start trigger arrives the task will read the predefined amount of samples…

The difference between 1* and 2* is simple: just throw away the first subset ("detaT1") of samples…
Hi @GerdW,

Thank you for your reply.

If I get it well, do you mean a Daqmx Task that generates a digital edge for the acquisition? ( Denknach)

In my case, the digital event source is an external machine (via NI9361).

Maybe I need to set for the acquisition channel to read a specific amount of samples as you said (Please could you check the capture below).

for the 2nd option, do you mean that I need to read the first saples and then delete them ?! and read the next samples ?

Many thanks again Smile

Labview_pr
Hi pr,

Zitat:do you mean a Daqmx Task that generates a digital edge for the acquisition?
In my case, the digital event source is an external machine (via NI9361).
No: setup a task using an external (digital) signal as start trigger.
Did you examine the example VIs coming with LabVIEW? There are a lot examples for DAQmx…

Zitat:Maybe I need to set for the acquisition channel to read a specific amount of samples as you said (Please could you check the capture below).
Well, you want to acquire a fixed amount of data, so you can read a fixed amount of samples…

Zitat:for the 2nd option, do you mean that I need to read the first saples and then delete them ?! and read the next samples ?
Either do two reads. Or just one read operation and use ArraySubset afterwards…
Hallo GerdW,

What i did for the first case, just setting a fixed amount of samples to read. I need a dt =5sec, so for a sampling rate of 10000hz, i setted the amount of samples to (50000 S/ch)..

for the second case; i ve just used two successive read.VI, ( see below plz)

Thank you for ideas Big Grin really helpful Smile)

Cheers,

pr
Hi pr,

some comments on your image:
- Use AutoCleanup from time to time…
- You don't need a sequence structure here: THINK DATAFLOW!
- 10s is the default value for the timeout, you don't need to wire a constant (twice!) here…
Hi GerdW,

Thank you for your reply.

Now, please I need you remarques about the triggering event...
After many trials, I referred to an example to, trigger the measurements...so for every new rising edge I measure a set amount of samples. For this I am using a digital counter NI 9163 (0V-24V input).

When testing the code, the measurements are triggered even for a low voltage input.. (of 0.05V) due to a noisy signal !!!

I am so confused, and I am wondering, aside of this noisy signal... that there is something's wrong with the code BlushBlushBlush

I've attached below a capture for the counter channel.. and measurement channel ...

I hope that you could hlep me Smile

Many thanks in advance,

_pr
Please inform us about your DAQ-Hardware Setup, like cDAQ chassis, cDAQ-modules, and so on.

Gruß, Jens
Hi pr,

Zitat:I've attached below a capture for the counter channel.. and measurement channel ...
Why are there a control and an indicator using the VERY SAME label? (Why is it such a generic label?)
Which of those is used with the measurement part?
Which counter values do you get? How are they changing with time? Can you show a plot of these counter readings?
The counter probably is just counting up, so the comparison with zero will result always in TRUE…

Did you debug your VI(s)? Which value of "x>y?" is read before the measurement case structure?
Hello again,


Sorry for late I was waiting to test the programme again.

@Jens, I am using the cDAQ-9184, The NI 9361 Digital input Module as a counter.

@GerdW, you are totally right Dais

In fact, the counter is counting up the edges, and the measurements are triggered since x>y is alway true comparing to zero.

This the problem, that's why even though there is now trigger signal it is still working :///

Please I am asking for help, in how to change this code in order to acquire measurement, for every coming rising edge...

I've really tried too many times .... and now I need to find a solution as soon as possible :/

Many thanks in advance

_pr
Referenz-URLs