LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamically creating threads

Hi Everyone,

 

I've got a good question that i think should be considered.  i have a subVI that is part of a class so it is a method.  let's say that i have an array of objects of the that class and i want to run this specific method for each instance of the class all at the same time.  is there any way to kick start each one right after the other in LabVIEW without waiting for the previous one to finish but to just get each object in my array to run that method?  If these is a way does it follow the data flow paradigm?

 

i look forward to answers!

 

Brent

0 Kudos
Message 1 of 8
(3,648 Views)
0 Kudos
Message 2 of 8
(3,635 Views)

Here is a list of Tags for LVOOP.

 

 

If you want to run them all in parallel you could create a method that calls a template that uses public methods to first create a struture to store the results and then use VI server methods to set the FP controls on the template to define the class data and tell the template where it should put the answers. Then the templtate can be run without waiting for it to finish.

 

Of course you will have to figure out a way to determine if the template is done so you can get the results. If to is a one-shot situation then a queue can be used for the data from each instance and when something shows up in the queue the template has completed.

 

Now if you want to start that critter up in the back-ground and let it keep running then that sounds like an Active Object and you should check out the NI Community becuase there is a discussion going on there about how to implement Active Objects.

 

Now did any of that click for you?

 

Ben

 

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

here are images that may help

 

Launch_Template.PNGTemplate.PNGCmnd_Q_b4_Lanch.PNGSendState.png

 

 

Ben

 

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

thanks for the response Ben.  give me some time to look this over and see if I can work this possible solution into what I am doing and ill get back to you

0 Kudos
Message 5 of 8
(3,616 Views)

IN this thread on the NI Community RogerL posted a two part zip of examples.

 

 

His example are complete and fully functional.

 

If you improve them please post the improvements back to that thread to encourage the conversation.

 

Ben

 

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

Ok,

 

ive looked up some things on generic active objects and found some more threads in these forums on their use in labview.  Where can i find those VIs that are in those pictures so i can take a look and see if that is something i can try out and use?  Ive searched my VI library for multiple terms and couldn't find them.  Are they for download somewhere or in a new release of LabVIEW??...i know i have the latest quarterly update installed!

 

thanks

 

Brent

 

EDIT: Saw your post after i submitted mine.  I will check that thread out as well!  thanks ben!

0 Kudos
Message 7 of 8
(3,593 Views)

@BrentSchenk wrote:

Ok,

 

ive looked up some things on generic active objects and found some more threads in these forums on their use in labview.  Where can i find those VIs that are in those pictures so i can take a look and see if that is something i can try out and use?  Ive searched my VI library for multiple terms and couldn't find them.  Are they for download somewhere or in a new release of LabVIEW??...i know i have the latest quarterly update installed!

 

thanks

 

Brent

 

EDIT: Saw your post after i submitted mine.  I will check that thread out as well!  thanks ben!


You can't find those (unless I really screwed up).

 

Those are images of code that I delivered to my customers. You don't want to know how much those will cost. Smiley Wink

 

After you take a look at what RogerL posted, I don't think you will need mine.

 

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 8
(3,589 Views)