LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running two tasks in parallel

Recently with the help of a few forum members I was able to write a program for a joystick actuation counter. I combined this vi with one of my older programs, and I was wondering how I could get the two tasks to run in parallel. Depending on which DAQ Assistant I use to have the error out, only one of my tasks runs at a time. How do I make it so that both my tasks are running? I have included my program so you can see what I am talking about.

 

0 Kudos
Message 1 of 4
(3,605 Views)

I figured it out, is there anyway for me to delete this topic?

0 Kudos
Message 2 of 4
(3,589 Views)

GHLabTech,

 

We keep old posts online for the benefit of others searching with similar questions.

 

I was just able to look at your code and if anyone else is experiencing a similar problem the reason both loops aren't running in parallel is the error wire connecting the two.  Any tunnel leaving one loop and entering another will prevent the second loop from running until after the first loop terminates and generates a final value.

 

Is there are reason why you are using two loops for this application?  It appears both of your DAQ Assistants are doing the same thing and both loops are running at the same rate.  Could you not combine them into one loop and only use one DAQ Assistant?  The loops will never be able to run truly in parallel because they both rely on the same hardware resources.

 

Regards,

 

Simon

0 Kudos
Message 3 of 4
(3,578 Views)

Yeah thats what I did, I combined both tasks into one while loop and it eliminated my question.

0 Kudos
Message 4 of 4
(3,572 Views)