LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

calling a vi multiple times makes the timer "crash"

I use a subvi for writing data from a profibusnetwork. In this vi I can set a timer for the "update" to write away the data. I use a global variable to remember the last time the writing was done. The problem I encounter here is that when I use this subvi multiple times only the data I want updated fastest will be written away.. My question is: Is it possible to use just this one vi multiple times instead of renaming it for every datasource I want to write away?

Thx in advance,
0 Kudos
Message 1 of 3
(2,366 Views)
Under VI properties-Execution. Select Reentrant Execution. You may have to change the global variable and use something like a uninitialized shift register to remember the previous number.
0 Kudos
Message 2 of 3
(2,366 Views)
Use a while loop with an uninitialised shift register instead of a global,
and build it into a function marked "re-entrant". This way different data
exists in each different copy of it in the code.

henk007 wrote in message
news:50650000000800000002190000-984882144000@quiq.com...
> I use a subvi for writing data from a profibusnetwork. In this vi I
> can set a timer for the "update" to write away the data. I use a
> global variable to remember the last time the writing was done. The
> problem I encounter here is that when I use this subvi multiple times
> only the data I want updated fastest will be written away.. My
> question is: Is it possible to use just this one vi multiple times
> instead of renaming it for every datasource I want to write away?
0 Kudos
Message 3 of 3
(2,366 Views)