LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Slow VI With Multiple Modules

Hi all, 

 

I'm running a cDAQ 9172 chassis with 8 modules:

9219 (AI Volts), 9482 (x2 Relay out), 9485 (SSR out), 9213 (AI Current), 9211 (AI Temp), 9241 (DI), 9263 (AO Volts)

 

I was troubleshooting a 200022 error and had to lump all of the AI modules together, which fixed the problem, but the code runs slower than I thought it should. I am attaching a really boiled down code as an example. I know the 9211 is going to be my limit at 14S/s/ch and the 9219 isn't much better at 100, but I'm getting about a 1 second update on the data. Is this about what I can expect, or can it be tweaked to run a bit faster? It's probably fine for what I'm using it for, but any advice would be greatly appreciated. 

 

Thanks!

Zach

 

 

 

0 Kudos
Message 1 of 3
(730 Views)

One (maybe the only?) way to get different independent hardware modules to operate "independently" (and concurrently) is to run them in parallel.  Certainly the Task line, which defines the I/O channels and devices, should not be "chained" from one set of cDAQ modules to another (as you have done).

 

Disclaimer -- despite several decades of LabVIEW experience, I've never encountered a cDAQ system (I've worked with USB DAQ, PXI, CompactRIO, myRIO, and IMAQdx cameras).

 

You seem to be opening and closing the (serial) DAQ channels every loop.  Why not use continuous sampling, sample the various devices in parallel (in separate loops, so they can run at the same or different speeds), and passing the data as it comes in to a Consumer Loop (using a Queue or a Stream Channel Wire)?

 

Why is there a Sequence structure in your code?

 

Sigh.

 

Bob Schor

Message 2 of 3
(680 Views)

Hi,

 

I found that the cDAQ chassis can't do concurrent measurements for all available slots. It's limited to a certain number of AI, AO, etc. That's why I chained them together. 

 

https://www.ni.com/en/support/documentation/supplemental/18/number-of-concurrent-tasks-on-a-compactd...

 

I learned LabVIEW from someone who coded this way. I can't say that I know any better. The point was to open and close after every loop so that if there are any errors, they get cleared out and it gets opened again. I guess by your questions, I could close on error and reopen. 

0 Kudos
Message 3 of 3
(357 Views)