11-21-2022 09:11 AM
@altenbach
Did you mean implementing a state machine within subVI for saving code?
11-21-2022 09:30 AM
NO, I mean more like an "action engine". (Sorry for the poor terminology). Yes, everything is in the subVI.
11-21-2022 09:35 AM
@altenbach
That is interesting. I am not familiar with "action engine" but I will learn more about it and try to implement it in the code. Thank you for the input.
11-21-2022 09:47 AM - edited 11-21-2022 10:02 AM
Here's a very rough draft of what I had in mind:
(Very rough! Needs more TLC to be safe to use, so modify as needed. You can use a feedback node (shown) or a shift register in a dummy loop. "Mode" should be a typedef, of course. "Save" is the default, so you typically don't need to wire the mode in the caller)
11-21-2022 09:50 AM
@altenbach
Thank you, I will look into it. This looks interesting.
11-21-2022 10:05 AM
Also note that since the ref is kept open, it will keep track of the file position and always correctly write right after the previous data. I would probably turn off "convert EOL", less overhead.