03-18-2002 04:02 AM
03-18-2002 12:41 PM
03-19-2002 12:14 PM
LabVIEW, C'est LabVIEW
08-01-2002 01:00 PM
08-25-2003 08:55 AM
08-23-2016 04:28 PM - edited 08-23-2016 04:30 PM
How the fucntional global effects when i try to run multiple instance of same VI?
08-23-2016 04:43 PM
A lots changed in LabVIEW in 13 years. One of them is the improvement in calling reentrant and asynchronous VIs. Here is an example I did a while ago that demonstrates some of the more scalable, and manageable ways of doing this.
But to answer your question directly. A VIG in every normal situation is non reentrant. So if you call a write in one VI, but also call write in another VI in parallel, they will share the same memory space which is generally not what you want. There are several solutions but the best in my mind, is to create a unique reference to memory for each clone VI ran. And the easiest way to do that is with a Data Value Reference or DVR. You can pass in a reference to a DVR to each clone VI ran, and they can use that as their private data space. You can also create the DVR in the clone, but I like to create it outside, and then periodically check to see if it is no longer valid, and to close my clone if that happens. A reference will get cleaned up if the VI that made it goes idle, so this can help clean up running code if you used the Abort button during development.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord