LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to clean static varable in a call library function node

Hi,

 

I have a call library function node in a loop of a VI. The .dll file that the  "call library function node" called is complied by a c file which was created by LabVIEW CVI. In the c file, I defined a static varable like this: 

 

static double   a = 0;

 

The problem is that once the VI is finished,  the static varable "a" still keep the last value. If you run this VI again, the static varable "a" is not 0. If you want to clean this static varable, You have to close this VI and open again. Is there any methord I can clean this varable without close VI. Thanks.

 

 Haifei

 

 

0 Kudos
Message 1 of 2
(2,330 Views)

Hi Haifei,


If you have "a" as the output variable, then modify your C code in such a way that another variable takes "0" from labview VI and feeds it in to the variable "a" (something like the initialisation process). So that your problem get solved.

 

MRK (CLAD).

Message 2 of 2
(2,293 Views)