07-15-2010 01:05 PM
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
07-15-2010 01:19 PM
for others: background information in this thread
07-15-2010 01:20 PM
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
07-15-2010 01:30 PM
here are images that may help
Ben
07-15-2010 01:43 PM - edited 07-15-2010 01:43 PM
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
07-15-2010 02:08 PM
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
07-15-2010 02:36 PM - edited 07-15-2010 02:37 PM
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!
07-15-2010 02:42 PM
@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.
After you take a look at what RogerL posted, I don't think you will need mine.
Ben