04-05-2017 01:44 PM - edited 04-05-2017 01:44 PM
This is bad! Never hide interactive event structures inside three loops inside case structures! If any of the events are triggered while the code is not inside that small inner while loop, it will lock up irreversibly. (All your events are set to lock the front panel until complete, but in many cases they cannot complete due to dataflow!)
All you need is a single outer loop and a better state machine architecture!
04-05-2017 03:48 PM
I've taken your advice and changed how the machine states are handled. I am still puzzled about the event structure controlling the window scales. I'd like to be able to use the "Disp (s)" variable in both the acquisition and analysis modes, but right now it is freezing in acquisition mode like you said. I've been banging my head trying to work this out for a few hours and don't know what to do. The only idea I have is to make two "Disp (s)" variables, overlay them, and make them (in)visible when needed. I know there has to be a better way though. Any ideas? Thanks.