Also, check out the examples of a State Machine. That might also give you some pointers. But basically, you will include in your main while loop the conditionals that determine if the measured value matches the desired range. You may want to use some averaging here over a certain period of time, so that it sees a constant displacement before going to the next frequency or amplitude or whatever. When the measured value meets the criteria, have the program save the data, then increment to the next frequency. You'll have a single case stucture that handles all of the automatic functions.
If I may offer some suggestions on your code, there are some things you can do to clean things up a bit. For one thing, you only need (and should only use) one Event Structure, since you can Add Event Case(s) to the same structure to handle different events. The Start Signal button, for example, should be inside its Event Case. You can also create an Event Case for your Stop button, and you may be able to migrate all the code in that while loop into the one loop. The Timeout event is good for handling things that need to occur repeatedly and at regular intervals, such as the automatic measuring and changing of frequencies. This way, when you're in "automatic" mode, the program will still respond to other events, and you can stop the run at any time.
I don't have the DAQmx drivers, so I can't test your program, but some of the examples may get you further along. You have a lot of work to do, but I think you're on the right track.
Good luck, and let us know how things go!