06-29-2021 06:44 PM - edited 06-29-2021 06:55 PM
Hi,
I'm new to Labview and NI products and wasn't able to find my answer after browsing through a bunch threads on similar topics. I have a cDAQ system that pulls from 5 pressure transducer channels (NI 9205), 1 thermocouple channel (NI 9213) and has 3 AO (NI 9264) that need to be triggered by timers and/or (not yet programmed) by data from the thermocouple channel. I mimicked online examples of multi channel acquisition, but even with my thermo channel on high speed (which should be 75 S/s I think), I can only get ~2 Hz out of the loop. Would really appreciate your guys' advice!
Best,
Jack
Solved! Go to Solution.
06-30-2021 01:24 AM - edited 06-30-2021 01:30 AM
Hi Jack,
@Jack_Oswald wrote:
Would really appreciate your guys' advice!
Some advice:
That basic stuff being said:
Once you replace those 5 tasks by just one task your loop will (most probably) immediately run faster!
More things to say:
06-30-2021 01:24 PM - edited 06-30-2021 01:26 PM
Hi Gerd,
Thanks very much for your detailed reply! I have the code attached. I had reasons (likely and hopefully inadequate ones) for some of your points:
-I created 5 AI tasks because I couldn't find a way to apply different custom scales to each channel and we are using multiple types of pressure transducers
-I get an Error -50103 thrown when I try to set a sample rate on the pressure AI's I think that is due to having the thermo and AO and pressure channels (will change this) in the same loop but would love your opinion here.
-I set the read to 1 on demand since I wanted to read once per loop, I must misunderstand the proper use... for this and the shift register comment I copied the format from: https://www.youtube.com/watch?v=fIy6XT3CdPQ&t=1488s&ab_channel=ZacharyNeale
That said, I will implement your advice where I can outside this list: I'll get rid of the express commands, create separate loops, and consolidate those AIs into like sensors. I'll also switch to using waveforms instead of building a time array and using DBLs if you would recommend doing so. I'll update once I've gotten this working. Thank you again!
Best,
Jack
06-30-2021 01:46 PM
Hi Jack,
@Jack_Oswald wrote:
I have the code attached.
Nope…
@Jack_Oswald wrote:
I created 5 AI tasks because I couldn't find a way to apply different custom scales to each channel and we are using multiple types of pressure transducers
Simply put all of those 5 pressure sensor CreateVirtualChannel function in a row and wire the task reference from one to the next…
(The next improvement would be to put that code into a loop, with providing neccessary inputs from autoindexed arrays.)
07-07-2021 10:43 AM
Hi Gerd,
Apologies for my delay getting back to you. I couldn't respond again in my first 24 hrs on the forum and forgot to follow up the next day. I switched all of the AI and AOs to Express functions and I've gotten the code to execute appropriately.
Thanks for your help!
Jack
07-08-2021 12:41 AM
Hi Jack,
@Jack_Oswald wrote:
I switched all of the AI and AOs to Express functions and I've gotten the code to execute appropriately.
Be warned: while this may work right now it will surely be no long-term stable solution!
(The DAQAssistent has a long history of forum threads about "stability" problems. Your VI(s) may stop to work as expected sooner or later…)