05-19-2014 11:37 AM
Solved! Go to Solution.
05-19-2014 11:55 AM - edited 05-19-2014 11:56 AM
Two choices:
1. Don't use the File Dialog Express VI and use a file path control or constant instead that you set the filename before you run your VI.
2. Set an order of execution so that the File Dialog runs first. Take an error wire out of the File Dialog then split and feed that into your DAQmx functions. The DAQ functions then can't start until the file dialog is finished.
Be sure to use Block Diagram cleanup, or at least manually clean up your code. You have a bunch of backwards running and overlapping wires making your VI harder to read.
05-19-2014 11:59 AM
I would also recommend using the Open/Create/Replace File function to open your file before your loop. You can use the Write To Text File inside the loop and the use the Close File after the loop. This way you will be sure you keep appending data and it is easier on the file system. You also won't need the Get File Position and Get File Positiion functions.
05-19-2014 04:31 PM
Thanks for the advice. I cleaned up my diagram and am now being prompted to pick a file location before the signal is generated. However, I am still only seeing a constant voltage reading in my output file and I think it is because I was not using a trigger in my program. I have tried to add one in here, but I can't say that it is working correctly. If I am wanting to use an analog trigger, where I do I wire the return wire to if my live wire is in PFI 0/AI START TRIG (pin #11 on my E-Series SCB-68)?
05-19-2014 08:59 PM
I can't help you there. I've never done any DAQ with triggering.
05-19-2014 09:09 PM
05-21-2014 03:13 PM - edited 05-21-2014 03:33 PM
I agree. It's not required for acquisition. I think a better way of tackling the program involves some type of synchronized timing. So, I want to generate a signal (say, for example, a square wave of some frequency and voltage) and want to record both the generated signal and the acquired signal, so that I may calculate what the time difference between the first generated signal peak and the first acquired signal peak is. Any feedback regarding the attached code and dummy test? (I see only noise recorded in column 5 - my acquired signal). Thanks!