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.
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.
12-28-2017 09:36 AM
Good day, LabView users!
I am trying to set up a LabView VI to collect data on multiple channels, across multiple cards/modules, at different sampling rates. Here's a brief summary of my application:
In order to understand the performance of a waste-heat recovery system, I am using a NI cDAQ 9188 chassis and several different cards (9215, 9213, and 9203) to monitor temperature, pressure, torque, and flow rates at various points on a testing stand. Because of the nature of the systems we test, I need to sample temperature, pressure, and flow rate at approximately 1 Hz. However, I also need to monitor the signal coming from a torque transducer at a much higher frequency (let's say 120 Hz for the sake of discussion).
Prior to setting up this test stand, I relied on LabView example VI's to set up/customize a VI which sampled all of my channels at the same rate. Now that I need to add a second independent sampling rate, I'm not sure how to modify the VI I have already created to do this. I am also not sure if modifying my existing VI is the best way to go about this. The VI I already have is attached. Can anyone provide any advice or resources to help me out?
Solved! Go to Solution.
12-29-2017 10:14 AM - edited 12-29-2017 10:23 AM
Good day, meierdh,
I took a look at the documentation for your cDAQ chassis, and it should have 3 analog input timing engines. See this document for reference.
This should allow you to create up to three different analog input tasks, each with their own sampling rate. In your case, two different tasks would likely solve the problem. To set up the second task, place new DAQmx functions below your other ones, and link them with a new task wire. These two tasks will operate in parallel, and can be configured with two different sampling rates.
Additionally, if you need faster performance out of your program, you may want to look into changing your while loop into two while loops in a producer consumer configuration. This guide walks through the producer consumer design pattern.
Give that a try, and please let us know if you have any more questions, or if this proposed change does not solve your issue. Hope you had a wonderful holiday season, and happy coding.
11-27-2019 05:41 AM
Hi, can you change the code version to 2014?