01-31-2013 04:47 AM
Hi,
Is it possible to make a reentrant execution of a VI in a for loop? So that every iteration of the for loop has it's own instance of the VI... I am having trouble withe Highpass filter VI, when i put this in a for loop and set the "init/cont" to true it does not does a proper job because it uses the same VI every itteration, and it should clone itself for every itterartion and use the same instance of the VI when it comes back in the itteration...
I hope you understand what i mean...
Best regards,
Thijs
Solved! Go to Solution.
01-31-2013 04:54 AM
Not that I know.
But if the filter VI inside the for loop is reentrant AND you set your for loop to be parallelized as many times as the number of elements in the array it's indexed on maybe that would work?
Pure guess though, I've never really used parallel For loops.
Does your array always contain the same number of element (I guess signal to filter)?
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
01-31-2013 05:07 AM
01-31-2013 05:08 AM
01-31-2013 05:49 AM
I tried the parallelism for loop but it doesn't do it... The 2 seperate Vis works great, but that's not what i want....
01-31-2013 06:04 AM - edited 01-31-2013 06:05 AM
What is the maximum size of your array?
If you do have a max array size that is not too high maybe you could do something like this :
At least I know thi would work, I know because I've used this technique in a case where I could have form 1 to 4 channels to filter.
hope this helps
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
01-31-2013 06:10 AM
Maybe not the most efficient way of accomplishing this, but you could wrap whatever you want to do in a vi template and open a new instance for each iteration using vi server.
01-31-2013 06:10 AM
It is a solution but i prefer, a dynamic solution...
thanks
01-31-2013 06:11 AM
How would i do that? M_Peeker?
01-31-2013 06:12 AM
Using VI Server to instanciate clones of the filtering VI, as suggested by M_Peeker will work and is dynamic but will require some additional coding :-o.
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus