04-15-2020 10:26 AM
so is this the way to do direct TDMS logging using daqmx vi?
04-15-2020 10:33 AM
@SaraAl wrote:
so is this the way to do direct TDMS logging using daqmx vi?
Except you don't need to constantly start the task in the While Loop. Just start it once before that loop and do whatever it is you need to in the loop.
Do note that if you want to be reading the data and process or view it while it logs, you will need to change the logging mode to "Log and Read". Then the logging will happen with the DAQmx read (ie, the data is logged when you read it). Obviously, your DAQmx Read would be inside of your While loop.
04-15-2020 10:36 AM
i just want to save the data into a tdms file as long as the vi runs. is it necessary to add the read and log file in this case?
04-15-2020 11:22 AM
@SaraAl wrote:
i just want to save the data into a tdms file as long as the vi runs. is it necessary to add the read and log file in this case?
Read and log is only necessary if you want a "real time" plot of the acquisition. Logging directly to disk is the most efficient method.
As it was mentioned earlier, remove the start from the while loop. Replace the while loop with an event structure tied to your stop, or at least add a wait in the while loop.
Better yet, open the example finder, and use the Continuous Voltage Acquisition with Events example. Will work for you no hassles.
mcduff