03-10-2009 11:34 AM
03-10-2009 11:39 AM
Hey Milky,
It's in the block diagram of the MTS Parse.vi. The top grey box with text-based code in it.
03-10-2009 12:36 PM
03-10-2009 12:53 PM
1. Double-click on the Parse MTS400.vi in your program's block diagram.
2. Go to Window>>Show Block Diagram on the Parse MTS400.vi window that opened in the previous step.
3. Look for the dark grey outline surrounding some text-base code. This is the formula you need to verify matches the documented formula in the Crossbow pdf.
03-14-2009 05:48 PM
As I posted before I am working in a general application for the accelerometer platform using labview. I am currently not using the tools that crossbow gave but in fact my VI is inspired in them. At the moment I have problems with the data that is coming from the RS-232 port, because I am using a high sampling rate (128 Hz). I have two problems: The first one is since approximately 70sec I notice a delay that is increasing each time. The other problem is that after 150sec approximately the program stop and the following message appear:
VISA: (Hex 0xBFFF006C) An overrun error occurred during transfer. A character was not read from the hardware before the next character arrived Thanks for your help, I am attaching my VI.
03-14-2009 08:40 PM - edited 03-14-2009 08:41 PM
A couple of things about your code don't make sense.
1. Why are you reading 1000 bytes if you are only interested in about the first 20? Is there anything important in the other 980 bytes you are discarding?
2. And I believe this is causing your problem. You write out the new data to your text file on every iteration appending it to the end of the file. That is fine. But why do you read back in the entire text file on every iteration? Just to build it into a waveform to put on a waveform graph?
File operations are slow, and will get slower as the file grows. Eventually it will take longer to read an entire file than it will be for the next 1000 bytes to come in. Eventually the serial buffer will overflow giving you the error you are seeing.
03-16-2009 10:31 AM
Dear Ravens,
Thank you for replying. I am working in what you said and in fact that was part of the problem. I changed the way to see the graph of the acquired data. Now I exactly now where is the problem. When I write the data into a spredsheet I choose append file.As the file get bigger, a delay start to appear getting worst and worst until the program stop working. Is there another way to save the data without using the write to spredsheet option? or I am doing something wrong?
Thanks!
03-16-2009 10:40 AM - edited 03-16-2009 10:43 AM
You can move the write to file function to a separate loop and pass it data by way of a queue. That is called a producer/consumer architecture. You can find hundreds of examples for it on the forums. Also look at File / New... and you'll find a template for it.
However, it's not so much the writing to file that is your problem. It is the reading from the file on every iteration. There should be no reason you need to read the file at all ever in your VI.
03-16-2009 12:00 PM
Hi Ravens,
Thanks for your answer. I will look in the examples you mentioned. You are right, I am not reading the whole data in each iteration anymore, I am just saving the data with the append option turned on.
03-24-2009 02:57 PM
Hi to everybody,
I was trying to see the code of Parse MTS400.vi but I realized that is protected by a password. Does anybody knows which is the password?
Thanks