LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Lag in Performance

I am using "Array Size" and "Array Index" functions to read an array file in disk so that I can obtain the array dimensions, in this case X-Rows x Y-Columns. I am doing this so that I can show the user the choices and need to INDEX through the array line-by-line and split the "," delimited fields in Indicator Controls. All worked well when the application as first RUN. The problem arrises when the task is completed and another run is started without stopping the application. The issue is with the initialization of the variables. When I set them in the Front Panel using "Make current value default", the two functions "Array Size" and "Array Index" take longer to read the file than the initialization and they get overwritten by the functions when they eventually read the file. Eventually, the functions return the correct value, but by then I am long gone doing other things with the wrong values.
Any help please.
0 Kudos
Message 1 of 3
(2,554 Views)

Hi Cyphertech,

      It would really help to see your code - can you attach it (or at least give us a JPG)?

 

Cheers.

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Message 2 of 3
(2,551 Views)
Are you using local variables? You mention "initialization of variables".  It sounds like you have a race condition.  That is code that you can't control the order of operations, yet you need to control the order of operations.  If you have a section of code that depends on the correct values of Array Size and Array index coming from the file, you need to be sure that that the section of code can't execute until that data is available.  That means using wires from one section of code to the next.
Message 3 of 3
(2,522 Views)