Hello!
I have a producer/consumer pattern mixed with state machine in the consumer. I'm saving data to TDMS file with that structure. I would like to add a button, which would go to a state New File, to close the current file and continue saving into a new one. I created the state, in which I close the previous file, and try to open a new one, but when I click on the button nothing happens. The strange thing is, when I press the button the new state shows at the END of the while loop (in the shift register), but after it goes to the NEXT new iteration, the shift register has the old state in it, so that I miss the new state.
What do I do wrong? Where should I place the button, to make the state change?
Thank you in advance!