LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to control and run multiple (up to 20) processes independantly in LV

Solved!
Go to solution

Hi all, 

I'm trying to build an application in LV to independantly control and run multiple (up to 20) processes, ie, it should be able to start and stop any of the processes at any given time. What would the best way to code for this? Off the top of my head would be to use a unique notifier to control each of the process, but I'm thinking that the code upkeep may be a handful with this number of notifiers being defined. Are there better ways of doing this?

 

Appreciate any help and insight on this.Thanks a bunch in advance!

0 Kudos
Message 1 of 9
(3,437 Views)

 

  1. Is this multiple instances of one process? Or 20 separate processes?
  2. Could each of the processes conform to a standard message command structure, or are they all a little different?
  3. Would you rather use strings or typedef'd enums for the commands?
  4. Do you consider LVOOP an option?
  5. Are some processes children of other processes, or are all controlled by the top-level controller?

 

0 Kudos
Message 2 of 9
(3,432 Views)

Hi Jack,

1. It is 20 separate processes, meant to run and controlled (start, stop, etc) independent of each other.

2. Each of them conforms to the same message command structure, only difference being the data supplied to each of the processes.

3. No preference as to string/typedel, which ever method that results in a more managable code is more than welcomed.

4. I would, but LVOOP is a new thing to me, wouldn't mind picking up a new skill if you're willing to share with me on how best to implement it in my situation.

5. All processes are to be controlled from top level, processes are independent and have no relation with one another.

 

Thanks again for your help! 🙂

0 Kudos
Message 3 of 9
(3,429 Views)

I forgot some more important questions:

 

 

  1. How large is your development group?
  2. How much "discipline" do you want to program into the Process Commands framework? For instance, is it OK for any VI to command a process into a certain state, or should your program generate a broken wire or run-time error if a command is sent from a non-authorized source?
  3. Where do your needs fall on this spectrum: simplicity that gets the job done and the product out the door and will probably not need much maintenance or upgrading, or flexible framework that will likely undergo multiple upgrades or fall into the hands of multiple developers?

 

0 Kudos
Message 4 of 9
(3,421 Views)

Hi Jack,

1. There will be 2-3 people working on it, it's not too large scale of a project.

2. If possible, would want to keep the command source coming from the same source.

3. Looking more into a flexible framework which will allow for scalability to add in new features and also for future upgrades.

 

Thanks!

0 Kudos
Message 5 of 9
(3,416 Views)
Multi-Process Engine (MPE) Reference Library: http://zone.ni.com/devzone/cda/epd/p/id/6136
0 Kudos
Message 6 of 9
(3,387 Views)

MPE requires Real time module, something that is not readily available for me at the moment... How else should I proceed? Thanks!

0 Kudos
Message 7 of 9
(3,379 Views)
Solution
Accepted by topic author PYH

This Nugget launches multiple threads and smacks them with Occurences. Convert that example over to notifiers and you shouldb good to go.

 

I have developed apps with more than 100 background threads using variations on the theme shown there.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 9
(3,372 Views)

Thanks Ben! The ideas worked great so far for my case. Smiley Very Happy

0 Kudos
Message 9 of 9
(3,293 Views)