LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Store the Data

Jean-Pierre, here your VI is broken with the an error that "String: Cannot find valid type definition".

In this particular case, it probably also needs a shift register containing the current "watermark", i.e. the insert point up to which real data has been filled. Then we can just call an "append" mode case, filling the next suitable row, and the caller does not need to know the actual insert point.

That's what I love about functional globals. They can contain quite a bit of intelligence and are not just a pile of data!
Message 21 of 23
(895 Views)
Yeah I forgot to disconnect one typedef; just ignore it, it is a simple string.
It is just a quick example and indeed its functionality can be improved with all kind of state variables.


LabVIEW, C'est LabVIEW

Message 22 of 23
(897 Views)
Excellent discussion. I am eagerly waiting to try out LV2 globals.
I have some questions,which follow:
 
1) When does LV flush the copies of the globals and local variable it has made? Is it when the vi is closed? If yes, then let us assume my control was in a subvi and I created many copies due to a lot of local variable usage within that subvi. Now, when I close this subvi, do my copies get flushed?
2) Can I force flush copies of globals?
3) When I close my LV2 global subvi, what happens to the shift register containing my array? Will the data not get lost on closing the subvi? How about when I close all calling VIs?
4) Now, if I am inserting 5000 rows one at a time, will my LV2 global subvi get called 5000 times? Will that not affect the speed?
5) If I call my LV2 global vi a few times and on some occassions, i have reinitialised the array, will my previous arrays be lost?
6) When does the LV2 global first create the memory allocation for the array? At compile time or when it is first called?
 
Rgds and thanks,
Gurdas
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 23 of 23
(769 Views)