03-09-2021 10:32 AM
I launch a Re-Entrant VI 8 times parallel, in this VI I have access to the NI-XNET driver.
Now I have a problem, something like a crosstalk, as one instance of the VI influences another instance.
The VI has the execution property "Preallocated clone reentrant execution".
To find the reason for this crosstalk, I use NI IO Trace, where I filter the events only for XNET driver. I expected, that each of the 8 instances get its own thread ID, but the IO trace shows something different. I don't see 8 Thread-IDs, I see only 6. Should it be 8?
I want to figure out, which instance influences which other instance at which XNET driver access, but as the Thread IDs are not unique, it is not so easy...
03-09-2021 01:57 PM
I've had up to 24 "clones" running at the same time without interfering with each other (my data rates were probably lower -- it was mainly collecting video at 10 or 30 fps).
One thing to check is that any sub-VI that your Clone calls also has to be Pre-allocated reentrant. As you didn't post your code, I can't check if there might be any other "gotcha's" to worry about.
Bob Schor
03-09-2021 04:30 PM
This seems like a good time to drop a link to the NI Knowledgebase article which discusses threads, and the description of the threadconfig utilit...
Getting an understanding of how LabVIEW creates and manages threads is one of those topics most developers can safely ignore UNTIL that day when an application needs to start launching N parallel instances of a VI, and that's when developers start wandering aimlessly through assigning execution systems, adjusting subVI reentrancy settings, etc.
Post back after you've had a chance to digest some of this, you'll likely have questions.
Dave