09-08-2013 04:14 PM
Apologies. I forgot to attach the files.
You may have a race condition on the decision making for the value of Collect Data. The two case structures wired to Collect data may execute in any order. So the size of EMG may be the size from the current or previous iteration. Note that I combined the two case structures into one and eliminated the local variable (and the EMG indicator in the .3 VI). The Collection Time (s) control should probably be moved outside the loop. If the value is changed after data collection starts, the program may do unexpected things.
I have worked with a few sports physiolgists and most of them preferred to let me do the programming for them.
I recommend that you take a few hours to work through the free online tutorials for getting started with LabVIEW.
Lynn
09-08-2013 06:05 PM
09-08-2013 09:17 PM
^^ Well I can't answer yes to any of those, however I am in a situation where I need to read up to 160 analog channels (which I don't have the capabilities), unless I can figure out how to read straight into labview via usb. Unfortunately the software provided to collect and analyze data with the Delsys Trigno system is not the greatest and I prefer to have complete control of how I am collecting and analyzing the data. Thanks for the help and guidance.
09-09-2013 11:36 AM
Ok, I see what you're referring to now. Yeah, I've been using Labview for all of 2 weeks now so I'm not comfortable optimizing the developer's code at this point.
I have 2 goals: Stream data from a single channel and save to a binary file, Then verify that the data has saved by reading it in labview.
From there, I would like to be able to save data from all 16 channels into a single file.
My problem is even without the dynamic data type, I can't save data from one channel as if it were a waveform.
So I'm asking if there is a way to save data that is constantly streaming that is different than saving a pregenerated waveform.
This works:
This doesn't. And the file path/ref num is generated in the same way.
09-09-2013 11:48 AM
turtl,
I see that you are saving your data to a spreadsheet. Is that working to any degree? Although I'm trying to save to binary, do you think I need to pull the data directly from the EMG and ACC VIs rather than after the channels are indexed?
09-09-2013 11:49 AM
Even though my code was not optimal, I just save straight to a csv file and then when I go to analyze, I just open the spreadsheet in labview. What is the benefit of saving it as binary data? I am always looking for the optimal method of collecting data, so would love to learn the diffrence between binary and non-binary.
09-09-2013 11:52 AM
See you replied as I was replying. Yes take the 2D array straight into the spreadsheet, this then saves the data for each channel in one row. You just index the array so you can view the data in real-time as a waveform.
09-09-2013 01:24 PM - edited 09-09-2013 01:43 PM
Ok, that makes a lot more sense than the way I was doing it. My group has chosen binary over the csv format because we will most likely store data for long collection times with most or all of the 16 channels and if we can figure out binary right away, we don't have to worry about the size limitations of saving to a spreadsheet. I would also like to process the data in Matlab and it'd be easier to use binary.
09-11-2013 03:53 PM
Turtl,
Is that working for you? can you save the data successfully now? I've tried writing to binary, .csv, and text from a single channel or from the double array and I'm not getting anything in the files.
09-11-2013 04:21 PM
My original file worked fine, collected many hours of data. Are you getting a raw signal in? Not sure why it is not working for you.