From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simultaneously Record Multiple DAQ Channels

Solved!
Go to solution

I am currently set up to read two channels in from the DAQ using DAQ Assistant. I am wondering what the best way would be to go about sampling these channels at the same time, or as close as possible. Attached is the vi I am currently using.

 

Thanks,

Sawyer

0 Kudos
Message 1 of 8
(3,429 Views)

I having the same problem. I need to make a program that can log data from 4 sensor at the same time. Running individually have no problem but when i try to run all at the same time there is an error.

0 Kudos
Message 2 of 8
(3,425 Views)

@ssward wrote:

I am currently set up to read two channels in from the DAQ using DAQ Assistant. I am wondering what the best way would be to go about sampling these channels at the same time, or as close as possible. Attached is the vi I am currently using.

 

Thanks,

Sawyer


They are sampling at the same time (or extremely close to each other).  I'm not sure what your actual problem is.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 8
(3,410 Views)

@achapAriff wrote:

I having the same problem. I need to make a program that can log data from 4 sensor at the same time. Running individually have no problem but when i try to run all at the same time there is an error.


Any particular format you want to save your data in?  I recommend TDMS since there is a very handy Configure Logging function in DAQmx to save your data to disk (TDMS file) as you read it.

GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 8
(3,408 Views)

I was just wondering if there was a way to get them closer, or if this way is good enough.

 

--Sawyer

0 Kudos
Message 5 of 8
(3,406 Views)

Reading the two channels in a single task is going to make them as close as possible in sampling time.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 8
(3,404 Views)
Solution
Accepted by topic author ssward

DAQmx handles all the timing under the hood and does pretty well.  If you want to tweak the advanced timing settings you can but of course you'll have to give up the DAQ ASSistant and write real LabVIEW code. Smiley Surprised 

 

I'm assuming you're using a multiplexing card right?  The only actual solution for true simultaneous sampling is to buy a card that has multiple ADCs like the S-Series cards.

 

To the second poster:  You don't have the same problem as the OP.  He can set up multiple channels.  If you want help, you need to provide more information than "it gives an error". Smiley Wink

EDIT: I'll bet you're trying to use separate tasks for every input aren't you.  You'll get a resource conflict error if you do.  You have to use ONE task and set up multiple channels in that task to collect more than one signal.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 7 of 8
(3,401 Views)

Thanks for the information.

0 Kudos
Message 8 of 8
(3,390 Views)