LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Single Error Line, One Task For Two 9482 Modules

Solved!
Go to solution

Hi,

 

I have a massive program with no subvi's that I wrote quickly and now I'm trying to shrink it down and make it more efficient/polished through help from my colleagues. One such tip I've received is that I need one error line. They said that would speed up my code and make it flow better.

 

I'm trying to implement this but I'm running into trouble when I initialize my 9482 relay modules. My question is: Can I have one task that controls both modules (relays 1-8) rather than two tasks and subsequently two error lines? I include a screenshot of a subvi in my code that initializes the two 9482 modules.

 

It seems like a simple question but maybe I'm missing something.

 

Thanks in advance!

 

P.S. I'm running this program on a 32-bit embedded controller in a PXI Chassis running LabVIEW 2015 on Windows 7.

0 Kudos
Message 1 of 2
(2,258 Views)
Solution
Accepted by topic author cdolan25

cdolan25 wrote:

I have a massive program with no subvi's that I wrote quickly and now I'm trying to shrink it down and make it more efficient/polished through help from my colleagues. One such tip I've received is that I need one error line. They said that would speed up my code and make it flow better.


It will improve flow, but in fact it's more likely to slow down execution. Tasks will be forced to execute after each other, instead of in parallel.

 

It will only improve execution if the forced flow prevents copies that are needed when executed in parallel. His can happen if you have large data structures (arrays, clusters, classes).

 

The deterministic flow and error handling is why you should do it.

 

Can't help you with the daqmx question. I've been successfully avoiding it for the past few years.

 

Message 2 of 2
(2,233 Views)