Hi im'saving data in a txt format by adding a each item of a list builded during an acquisition from several sensors. the problem is taht when I press the buttn it tooks too much time and used to fail even if the file seems to be correctly saved in the phone. It also give me some problem regarding permission when I create the file but at the end it creats it so I don't understand where the issue is.
the first immage is to put all the data
the second is just to crate the file
Post all relevant blocks and/or post he result of "Do it" on the block "global data".
Ok, connect to companion, right mouse click on this block (global data), "Do it" and post the result.
the 'do it' is disabled
As I said
ok I cannot do this procedures couse I don't have with me the arduino that send me the data, so I will post it next days
Yes I've notice this just after posting it, but this doesn't solve the delay to end the application
Having the Append to File in a loop is problematic.
The next Append should not be requested until the previous Append has been guaranteed to end.
Either join all the items from the data list with separator \n to get a piece of text that you can append all in one shot, or use the event that fires after completion of an append to file of a single item to append the next item, until the list is depleted.
Please post am update of your blocks and descibe the issue you are experiencing and what you want to happen instead... which delay are you talking about?
Taifun
the append happen when the disconnect button is pressed, and is in this cycle, but it used to spend lot of time and the app usually crash even if at the end I saw the file saved in the phone and seems to be correct.
Try this approach:
files.aia (2.9 KB)
I take a more conservative approach to appending to the file, not flooding it but just dribbling to it.
Yes I solve with something similar, I saw that you can save directly the list without get item by item so thanks
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.