LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple instances of the same VI running in parallel

Hi,

I have a timestamping subVI that looks at a counter channel and applies timestamps. I want to create multiple instances of this subVI (8 to be exact) and have them all run in parallel (looking at 8 different channels). Someone gave me the following advice:
>>
Also, in case you want to call multiple instances of the same SubVI, and you want these multiple instances to execute in parallel, you will have to set the SubVI to execute in reentrant mode. Do this by opening the SubVI and going to "Edit >> VI Properties >> Execution" and enable "Reentrant execution".
<<
I've tried this but only my second instance (I started simple with only 2 instances) seems to monitor its channel and pass data along to the queue. I've included my code below, I have two signal simulators which simulate singles coming in on channels 2 and 3. I'm using a PCQI 6602 counter/timer card.

Any help would be greatly appreciated, thanks in advance,
Chris
0 Kudos
Message 1 of 3
(2,907 Views)
Hi,

The problem is even a little weirder then I thought. I thought it was just the last subVI that was running. But I added one more so I had 3 subVI's going and it was only the first one that never ran, the other two run fine. I've included code. Any thoughts on why the 1st instance isn't working?

Thanks,
Chris
0 Kudos
Message 2 of 3
(2,900 Views)
good news! Your reentrant VI is working and all three instances are running (as execution highlighting clearly shows). The problem is going to be an error that is occuring but you don't see because you are ignoring the error clusters internally in the timer. It looks like at one point it was set to quit if an error occurred. That still needs to be there.

Always hookup error clusters...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 3
(2,889 Views)