03-17-2006 12:03 PM
03-18-2006 03:58 PM
Hi,
I have deleted the file i/o parts of your generously donated vi and have converted the for loop to while loop. At least I am learning something . I have a problem trying to wire the serial terminal I am using with your graphing vi.If I can send the data to the chart then 95% of work is done. The 5% would involve exporting the plot data to a csv file when I am finished with a measurement.
Regards,
Frank
03-20-2006 10:25 AM
03-26-2006 10:43 PM
Hey,
Been trying to get this thing done and have looked at other serial port vi examples but the one I found from this website is the one that behacves most like the hyperterminal program. http://sthmac.magnet.fsu.edu/labview/vi_library.html
The spec of the sensor I am using and the way it cmmunicates through the serial cable is talked about in this file:
http://www.sparkfun.com/datasheets/Acceler...SerAccel-v5.pdf
Other serial read vis even in the labview examples do not seem to read continiously or have other issues which prevent me from graphing the output of the sensor. To be honest, my labview experience is beginner level and i excited at all the possibilities of the program but I need to try and get this thing done soon as the volunteer group i am helping needs it.
I have a serial program that gets the data from the sensor. I have the graphing part of the vi which you so generously gave me. I am including the full libray of the serial terminal. The newbie forgot you needed the extra files for it to work!. So I would like it to take the output of the response box and graph it versus time. I would the graph to refresh it self after x number of seconds (30-60secs). I could tell the rower the last peak of accelleration data was good, repeat it a couple of times. So having previous data on the graph would be useful. The rate of data from the sensor could vary from 15-50 points per sec.
Another suggestion made by a labview coder was to use the serial terminal vi above but add the extract numvers.vi (a sample string vi in the labview program) as a SubVI to parse the data.
Add the chart vi to the loop if the serial terminal vi and feed the string from the latest output of the sensor in the String Server read into the Extract Numbers.vi subvi, take the output array from Extract Numbers.vi and put it into an Array to Cluster conversion node and then into the Chart. I have trying that as well but wiring errors are making me go nuts :-0
Hope you can help again. Life would be easy if I did not need to graph the output of the sensor while the rower takes a stroke but its the only way the person can learn to react to the feedback from the accelerometer sensor.
Frank
03-27-2006 05:01 PM
03-28-2006 06:29 PM
Thank you for the link to the course and I look forward to using it 🙂 Your serial reader with the appropriate settings reads the data from my sensor. But the line feed termination does not seem to work and it reads the whole line of data one time and then the next time it reads only part of the data. X=0.2 Y=0.01 Z=0.322 is shown when it reads the data properly but then it reads only X=0.3 while rest of the line is missing. I found that the termination character used was the $ sign. ax0 was for line feed and I tried to ax24 ($) as the termination character but that did not seem to solve the problem.
If the vi could be set to start at # and terminate at $ would that solve the inaccurate of the data from the sensor? The sensor can also output the data in raw format rather than numbers. X=0x01A2 Y=0x0255 Z=0x0340
Maybe this might be easier to deal with it than the other format? Thanks again for all your help and suggestions.
Frank.
03-28-2006 06:34 PM
oopps forgot this piece of information about the data output of the sensor.
Byte Description
0 Start Char- #
1 Data output designator- @
2 Sample No High Byte
3 Sample No Low Byte
4 X Hi Byte
5 X Lo Byte
6 Y Hi byte
7 Y Lo byte
8 Z Hi byte
9 Z Lo byte
10 End Char- $
03-29-2006 10:58 AM
03-29-2006 11:18 AM - edited 03-29-2006 11:18 AM
This does not make sense even if the protocol is fixed length.
Since the ascII values of "#", "@", and "$" can be contained in the data field of this packet there is no way to distinguish the envelope from the data.
Ben
Message Edited by Ben on 03-29-2006 11:18 AM
03-29-2006 12:38 PM