LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

question about shared variables and report generator

 

I have a project with about 200-250 shared variables and at every 12 hours i want to make a report containing information about some boolean and double front panel variables linked to the shared variables... Now, i've tried with both the "Write Trace to SpreadSheet File" function from DSC->History and with different functions from NI Report Generation Toolkit. My problem is this: i would like to get my xls file to contain just the timestamps when my shared variable changed value. As it is, the number of rows in the file depends, obviously, on the sampling interval given as input. As an example, in 12 hours, my shared variable would change value maybe 5-6 times. Thus i would like my xls file to contain just 5-6 rows with those 5-6 changes. If i set the sampling interval to say, a matter of seconds, that would mean too much unneeded information in my xls file. Instead, if i set it to let's say 15 minutes, i would probably lose the moment the shared variable changed value. Is there a way for me to achieve my desired functionality with functions from DSC or Report Generation Toolkit? Thanks in advance, Sabin 

0 Kudos
Message 1 of 4
(2,572 Views)

Hi Sabin,

for me it sounds like the only problem for you is to get the change event of your variable. I´m not sure if there is a build in solution for you, but you can write your own engine for it. You can for example check it before setting the new value for the variable.

 

Hope it helps.

Mike

Message 2 of 4
(2,565 Views)
Hi Mike and thanks for the reply. Actually, my first idea was exactly this: in an event case structure, whenever my variable changed value, i would retain the relevant data in an array and then at the 12 hour period write all of it in a report. However, my boss deeemed it memory unefficient and compelled me to use only one function. Thus my predicament... If you have more advice on this new info, i would be grateful... Cheers, sabin
0 Kudos
Message 3 of 4
(2,563 Views)

Hi Sabin,

what do you mean with only one function? You can create an array off all old values and check with the new one. If the value is different, then you can write your value to your file. Maybe you have to store the last row number of each element.

 

Mike

Message 4 of 4
(2,546 Views)