Hi nwiman,
I looked a little into your code and I want to point a few things out to you. I think you now have the Write to Measurement File almost worked out correctly. Firstly, I want to let you know you are using a DAQmx task, and because we don't have you MAX configuration, we don't know what that is. I chose to simulate a USB-6351 to get some analog inputs, it is titled Dev1 in my MAX. Also, to avoid a buffer overflow error from DAQmx while it is waiting for the user to determine the file path, I used a File Dialog express VI to get the path before the While Loop starts. Lastly I unchecked "Ask user to chose file" in the properties of Write to Measurement File and chose "append to file. I also want to point out that your code has Tab constants, but the Write to Measurement file is set up for Comma delimited. To show you the functionality of the write to measurement file, I wired the signal after the DAQmx read to the write to Measurement File, and it works how I think you would expect it to. I recommend using charts for your output signals and when they look like you would expect them, wire them into Write to Measurement File.
To run the snippet I have attached, you must simulate a USB-6351 in MAX. Follow this link to add the simulated device to MAX, once it is in MAX you should not need to create a task or anything, just make sure it is named "Dev1".
Regards,