Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

two sensors - two stops

Hi guys,

I made this simple program for simultaneous acquisition of two sensors. My problem is that I need that waveform chart stop individually when the value of amplitude is superior to 0,004(mV). But in case of only one sensor detect, the other continues to make acquisition of data. This is important because I need different times!
Somebody can help me?

My regards,

Berenguel
0 Kudos
Message 1 of 14
(5,307 Views)
Hello,

I suggest you not to use express VI, but use exemple...
I did a little exemple that may help you... (LV 8.2)

Regards

Richard Keromen

0 Kudos
Message 2 of 14
(5,260 Views)
Hello,

Well actually, after a little reflexion; the vi given above shouldn' have been working... You can't use two different measurements, on the same ressource. 
But as you didn't react, i suppose you didn't used it, right?
I'm trying to find another solution .

Sorry, and my best reagards,

Richard Keromen

0 Kudos
Message 3 of 14
(5,244 Views)
Hello,

I saw your program but sincerelly i didn't understand quite well the function.
At the moment i made some modifications on my program. The problem is that i cant resolve the situation of times!
The program need to do two things:

Firts one: the fuction time on each sensor need to stop when the value of maximum peak reach the value of 0.03, but can't stop the program, need to wait for the second sensor to detect (different time or not)

Second one: When the two sensors detect the value => 0.06 the program stops.

Can anyone resolve this, because I can't.

ps: Don't forget that i can only use one daq assistant.

Best regards,

Berenguel
0 Kudos
Message 4 of 14
(5,243 Views)

Berenguel,

It is not possible to run two task simultaneously on the same material. A task can also (you have done so with the DAQ assistant) contain several channels. Because of this, if you stop the task, you stop the reading of all channel defined in your task.

Do you really need to stop the acquisition when you detect a peak? You could imagine ignoring the records for a specific channel made after this detection.

Cordially,

0 Kudos
Message 5 of 14
(5,205 Views)
Hi,

I don't need to stop when the program detect a peak. But I need the value of time in the first peak of each sensor (different time). I don't need nothing more.

I need to make some calculations to discover the distance of the fracture to the sensor! (it's not done for now). It's anyway of doing that?

I had try using the statistics block, using maximum peak and maximum time, but the value of time it's so stupid (ex: 3272880361,495139). It's impossible to have a time of this value.


Best Regards,

Berenguel


0 Kudos
Message 6 of 14
(5,204 Views)

Berenguel,

First, the timestamp you generate in your code is not correlated with your acquisition timestamp: The DAQmx driver can provide these informations through a waveform data format. It contains the origin timestamp (t0), the time between two sample (dt) and an array of sample ([Y]). Use the VI Convert from Dynamic Data.

Second, the timestamp value you get in second is coherent: it corresponds to the time elapsed in seconds since the 1st january, 1904. And if you only need the elapsed time between two timestamps, do a simple difference.

An other thing: do you know when will appear the peaks? Do you have a maximum time between they occur?

Regards,

0 Kudos
Message 7 of 14
(5,178 Views)
Hi Mathieu R,

I don't understand the first part (timestamp), maybe because my knowledges in this matter aren't good.

In answer to the question, I know when the peak will occur, but this have to work, without that "trick", and I don't have a maximum time between the occur. But normally the difference will be in ms.

If you can give me a good example of the first part that you have talk or if you can insert your ideals in my program, that will be excellent.

Best regards,

André Berenguel

0 Kudos
Message 8 of 14
(5,169 Views)
Hi,

You don't need to get time in your code, because you know your sample rate - so the time elapsed between two samples, and you're able to calculate the number of samples between peaks appears on each channel. See the example below:

Hope this helps,

Message Edité par Mathieu R. le 10-04-2007 05:46 PM

Download All
0 Kudos
Message 9 of 14
(5,072 Views)
Hi,

thanks for your help. I will see how, can i use your example in my program.
Best regards,

Berenguel

PS: I can't open the file, because my version is 8.2 (student), if you can make a save as to a old version than (8.5) it will be appreciated.

Message Edited by berengas on 10-10-2007 06:17 AM

0 Kudos
Message 10 of 14
(5,042 Views)