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!
Solved! Go to Solution.
Would really appreciate your guys' 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:
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!
I have the code attached.
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.)
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!
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…)