04-11-2013 05:22 PM
Hello,
I would like to write a VI that starts taking data when I push a button, and then stops taking data when I press another button. Ultimately, I would like to write this data to a file (*.csv) so I can analyze it later.
I know how to acquire a finite (pre-determined) number of samples at the push of a button and also I know how to write this data to a CSV file. The piece I am missing is the ability to record as long as I wish, and stop when I press a button.
Can LabVIEW do something like this? If so, can someone please point me in the right direction?
thanks!
04-12-2013 01:49 AM
Have a look at the example VI named "TDMS Logging - Cont Log Data Only.vi".
Help > Find Examples: Search for "TDMS Cont Log".
TDMS is a very good way to stream data to the harddrive.
04-12-2013 01:15 PM
What you're looking to do is very similar to what I asked in one of my first questions to the forum. Apok gave me a starting point for a VI that does exactly what you seek. Check out this thread.
Jeff
@souperman1985 wrote:
Hello,
I would like to write a VI that starts taking data when I push a button, and then stops taking data when I press another button. Ultimately, I would like to write this data to a file (*.csv) so I can analyze it later.
I know how to acquire a finite (pre-determined) number of samples at the push of a button and also I know how to write this data to a CSV file. The piece I am missing is the ability to record as long as I wish, and stop when I press a button.
Can LabVIEW do something like this? If so, can someone please point me in the right direction?
thanks!
04-12-2013 01:46 PM
Here's another example of a VI (LV2011) that collects data until the STOP button is pressed. I use this frequently to collect voltage from a PXI-4071 DMM and current from a PXI-4141. The VI plots the results in the front panel and logs a text file of the results that can be brought into Excel for analysis or compilation. The text file is named based on the current timestamp and the various input fields on the front panel.
Hope this help!
Jeff
04-12-2013 03:36 PM
Thanks everyone who has responded so far.
I tried opening "indefinite data collection.vi" in LabVIEW 2012 but I got some errors about missing VIs. Is there a version I could open in LabVIEW 2012 instead?
thanks!
04-12-2013 08:08 PM
It is likely that you do not have either NI-DMM or NI-POWER installed. That message is not related to the version of LabVIEW.
I suggest that you look at the structure of my VI and tailor it to your data collection application using the modules is your system. Or install the DMM and SMU drivers and run them "virtually" with my program.
Jeff
@souperman1985 wrote:
Thanks everyone who has responded so far.
I tried opening "indefinite data collection.vi" in LabVIEW 2012 but I got some errors about missing VIs. Is there a version I could open in LabVIEW 2012 instead?
thanks!
04-12-2013 09:51 PM - edited 04-12-2013 09:55 PM
@TroyK wrote:
Have a look at the example VI named "TDMS Logging - Cont Log Data Only.vi".
Help > Find Examples: Search for "TDMS Cont Log".
TDMS is a very good way to stream data to the harddrive.
Troy-- Did you mean -- Have a look at the "continious measument and logging example project template?"
The rest of you that have not become familliar with it --- I recommend you catch up a bit. Project templates have a lot of power to educate!
04-16-2013 12:49 PM
In the attached version of my VI, I have removed the DMM and SMU instruments and replaced them with random number generators. Enjoy!
Jeff