10-14-2016 01:44 PM
What do you mean by opening and closing every time?
Thanks,
SM
10-14-2016 01:46 PM
The write to spreadsheet vi will open the file, write the data to it and then close it, EVERY time you run it. In effecient logging you should open the file, perform all of the logging and then close the file. In this manner you only open and close it once. I displayed this in the example I gave you.
10-14-2016 01:49 PM
Ok I think I understand. Also adding stuff to the cluster is a no-go. The cluster unfortunately cannot be changed... Where I have the 1D string array going into the delete from array is all I have to go on... I have to take the messages coming from there and do what I need to do... Any other suggestions?
Thanks for all the help and patience,
SM
10-14-2016 01:51 PM
put a string array shift register on the loop, outside of the cluster. You need to store that data or read from the file and then write to it in that case.
10-14-2016 01:55 PM - edited 10-14-2016 02:15 PM
By cluster are you meaning case structure? Or are you referring to the data cluster that is coming inside the case structure?
Thanks,
SM
10-14-2016 01:57 PM
Back to what y'all were saying earlier about storing all the messages and then when the program is done, delete all but the last 5, how can I do that?
thanks,
SM
10-14-2016 03:13 PM
Matt,
I tried doing a string array shift register but I couldn't really get it to work... Did you have a more specific idea in mind?
Thanks for any help,
SM
10-14-2016 03:20 PM
@Sman29 wrote:
I tried doing a string array shift register but I couldn't really get it to work... Did you have a more specific idea in mind?
Show us what you did and we will try to fix it. (attach the actual VI).
10-14-2016 03:52 PM
Alten,
As previously mentioned (though embedded in the conversation) I cannot post my actual VI for several reasons, one of which being proprietary... Attached is 3 screenshots of my attempt at a shift register.. The first is my actual code, the last 2 are the errors I am getting...
Thanks for any help,
SM
10-14-2016 04:00 PM - edited 10-14-2016 04:02 PM
feed the array into "reverse 1d array" then "delete from array", keep the length to 5 and index 0,take the "deleted portion"