01-09-2009 03:52 PM
Howdy All,
I am a newer user to LabView and I was hoping someone might be able to help me identify was to improve my VIs.
I am currently running LabView 8.5.
My computer specs are: 3.40 GHz and 3 GB of Ram
My lab set up is six AMTI Single Element Multi-Component Dynamometers - model MC2.5-6-1K (these are 6 channel load cells) and six MSA-6 MiniAmps (these are strain gage amplifiers). To get my data to my computer, i have a serial port from the amp going to a USB converter (we are using KeySpan USA-19HS) and then plugging into a USB port on the computer. I am not able to change my set-up.
Ideally, I want to collect all 36 channels of data simulanously at a rate of 20 Hz and write 12 text files (at the same rate) for an extended period of time (lets say 30 minutes). The attached VI - "...rev_2" is suppose to do this. This vi runs, but I get error -1073807252. Attached VI - "...rev_4" works, but is only collecting data at 10 hz and only writing 6 of the 12 files I need.
Any suggestion on how to improve my VIs would be wonderful.
Thanks!
Karen
01-09-2009 03:58 PM
01-09-2009 04:02 PM
I know my code was not attached. I can not seem to get it to upload. I am working on it.
Here is another try...
01-09-2009 04:02 PM
01-09-2009 04:03 PM
01-09-2009 04:21 PM
I can not get my main files to upload. I will need to figure out a way on Monday.
Thanks.
Karen
01-12-2009 01:06 PM
Okay. This file is smaller version of what I am described above. The attached file is a single while loop, and when I run six load cells, my vi is comprised of 6 of these while loops running. They are connected to each other using global variables for stop, start and reset.
Any suggestions on how to streamline this VI or how to get six of these to work together better would be much appreciated.
01-12-2009 08:37 PM
This is a smaller version? I'm beginning to see why you're running into buffer overrun issues. ![]()
I think your fundamental problem is that you are trying to do everything at once. You should really separate out your data acquisition from your data processing. You're doing a bunch of data processing (including writing to file), and I think that's interfering with you being able to collect data at a reasonable pace. While there are other tweaks you can make here and there, I think if you don't make this fundamental separation you're still going to be limited in your speed. One method is to have a separate loop that collects the data and puts it into a queue. Then, your data processing can pull data out of the queue.
One experiment that may be worthwhile for you to try is to set up a VI that does just the read data part and see how fast you are able to read data without running into a buffer overrun. This will give you an idea of what your top-end for speed is likely to be.
01-13-2009 02:57 PM
I have been trying to use the "Obtain Queue" block and other blocks in the Queue operations palette, however I can not get them to work. My data is in the form of a 1-D array, and it seems to want single items. Does anyone have any suggestion or guidance of how to add a queue to my current vi?
Thanks!
Karen
01-13-2009 03:47 PM
a queue should be able to take a 1D array. Did you wire a 1D array constant to the Obtain Queue element data type?