Dynamic Signal Acquisition

cancel
Showing results for 
Search instead for 
Did you mean: 

can you help about data acquisition with trigger signals (not constant intervals)

Hello to everyone,
I want to ask you a question about data collection. I have a system of eight sensors. My aim is to record data from these sensors. I have a logic signal to determine when I get data from these sensors. But the time between the signals is not constant. I get about 2000 trigger signals in a second. I have usb 6210 and pci 6010 cards. My problem is;

I want to get 1 data from sensors with every trigger signal.

(trigger signal > sensor1>sensor2>...>sensor8> wait until next trigger signal>trigger signal>sensor1>....).

 

But the n samples option can be at least 2. How can i do it?

Also, with cards that I have, is it possible to carry out this event?

I was able to get data with the 6210 card using PFI inputs (2 or more data for each sensor).

 I would be glad if you help.

0 Kudos
Message 1 of 7
(6,353 Views)

Hello,

 

I dont know if I fully understand the situation here, especially since it sounds like you want either 1 sample per sensor per logic analyzer tick, or n samples per sensor per logic analyzer tick. If you only want 1 sample per sensor per logic tick, what I would recommend is as follows.

 

Set up a continuous analog task that can hold all of your analog channels. When you configure your sample clock timing, set the source to be any PFI line on the device. That is the PFI line that you should connect your logic signal. What this is going to do setup the sample clock of your task to be the logic analyzer signal so that ever tick will create a pulse, even if the signal is uneven.

 

If you want to do n samples per sensor per logic analyzer tick, then there are going to be some difficulty that goes with that, and I do not believe that your devices will be able to handle that since they do not support retriggerable tasks. I would then recommend an X series card like the NI USB-6341.

 

https://www.ni.com/en-us/shop/model/usb-6341.html

 

Best,

 

Shamik C

Applications Engineer 

National Instruments 

Message 2 of 7
(6,309 Views)

Dear ShamWOW!!,

 

thanks for your answer. my native language is not English, so sorry for my possible incorrect sentences. i attached a file about what i want to do. i have an encoder. it gives me 1024 pulses for every turn. but the distances between pulses are not constant. approximately it gives 2kHz frequency (average) for motion of my motor.So my aim is,

 

when i get 1st trigger->read sensor1-sensor2-sensor3-...-sensor8 data->wait until next trigger,when i get 2nd trigger->read sensor1-sensor2-sensor3-...-sensor8 data->...

 

thanks for your answer.

 

0 Kudos
Message 3 of 7
(6,305 Views)

Okay,

 

Then I recommend the first step where you make the encoder into your sample clock. This should work, even if irregular. You can do this pretty quickly by modifying an example DAQmx VI, and I recommend Voltage - Continuous Input.vi from Help >> Find Examples.

 

From there, change the sample clock source input to your PFI line with the encoder, and then change the Physical Channels input to list out the channels you are using.

 

Message 4 of 7
(6,300 Views)

Dear ShamWOW!!,

thanks for your reply. i modify the example program for my system (attached). i want to ask you a question - i hope the last 🙂 - ;

How can I be sure that the program stores the data at the time I want? Because the time column is not found in the data I recorded. Thank you for your interest.

 

Mustafa.

Download All
0 Kudos
Message 5 of 7
(6,275 Views)

This community example demonstrates how to add timestamps to a TDMS file.

 

http://forums.ni.com/t5/NI-DAQmx-Examples/Write-Data-Events-to-a-TDMS-File/gpm-p/3503233

Maggie M.
Application Engineer
National Instruments.
http://www.ni.com/support
0 Kudos
Message 6 of 7
(6,262 Views)

Maggie, that link didn't work for me.

This forum post also shows how to add a timestamp channel to a TDMS log file.
https://forums.ni.com/t5/LabVIEW/Data-Logging-using-Write-to-TDMS/m-p/3238910#M942726

Doug
Enthusiast for LabVIEW, DAQmx, and Sound and Vibration
0 Kudos
Message 7 of 7
(353 Views)