Visit our LabVIEW Wiki Hardware Portal
Tags |
(This content has not been tagged yet)
|
![]() |
Oct 21 2004, 11:40 PM
Post
#1
|
|||
|
I've come back for more. Member Posts: 2 Joined: 14-September 04 Member No.: 677 LV:7.0 |
Hello. Thanks for looking in on my questions. Let me first describe what I am trying to accomplish. I am building a telemetry system for a radio controlled helicopter. The system will include an onboard unit to sample data and transmit it to my laptop. Labview will be the interface for the user: a virtual instrument cluster with gauges, etc showing the status of the aircraft. The onboard system is a PIC microcontroller. It is sampling data from four sensors (temp, RPM, Acceleration,Altitude). The data is then sent out serial, rs232, to my computer.
I have controll over what the microcontroller trasmits, so: Is there a certain way I should format the data so that my life is easier? Currently, I am sending a letter to signify the data point (T) and then the data (69.02) . The serial stream looks like ...T69.88R100T69.97R120..... (Only two data shown for simplicity) The stream never stops as the microcontroller is set into a loop and samples and transmits. I am able to read in the data using the measurement and automation explorer, but when I try to use the I/O Assistant, it does seem to read the data and drops a timeout error. The error says "timeout before completion". I am imagining that the I/O assistant is having problems deciding where the string begins and ends. Thus, my next question, Do I need an end of transmission identifier in the stream (/r/n)? I have all of the serial parameters matched up(baud, parity, etc). I have created a vi that runs to some extent using VISA operations(I/O, Bytes at port.vi, VISA Read, split string, etc). It only works right on step by step mode. Once I try to run it normally, it seems like none of the VISA operators are working right. Essentially, the string does not seem to get passed through the VI. I think I have a good idea of what to do with the data once I get it coming in correctly. It just seems like what I have set up is ghetto and simply doesnt work right. Other details, I am not using a DAQ, as they cost a fortune. I have an rs232 to USB adapter. It essentially emulates a serial port. It seems to work fine as I am able to read in data in a Measurement and Automation explorer VISA session. Let me know if you have some advice. Thanks for reading. Jeremiah.
|
||
|
|
|||
| Ad |
Oct 21 2004, 11:40 PM
Post
#
|
||
|
|
|
||
|
|
|||
Oct 22 2004, 03:43 AM
Post
#2
|
|||
![]() Very Active Member Posts: 124 Joined: 17-January 03 From: Southern California Member No.: 37 Using LabVIEW Since:1988 LV:8.0.1 ,. ,.
|
I would recommend a 'packet' format so telemetry is emitted in bursts. Using \r\n termination is good to know where a packet ends - you should consider unique characters or a fixed packet length to know where a packet begins.
Fixed length is better - even if you have to padd with zeros. Then you configure the serial port get 2x the packet size with the proper termination. This way you'll get a full packet. Sound like a nice project! you should include a GPS!
|
||
|
|
|||
Oct 22 2004, 02:54 PM
Post
#3
|
|||
|
I've come back for more. Member Posts: 2 Joined: 14-September 04 Member No.: 677 LV:7.0 |
Thanks for your reply. When you say to configure the serial port to get 2X the packet size, is that accomplished with a particular function, say VISA configure serial port, or is that something that the I/O Assistant will help me with once it reads in properly? Thanks. Jeremiah
And GPS is a distinct possibility. I have found a GPS module that is inexpensive and I have found the Microcontroller code already written. I think once the other sensors are functioning, I will add GPS. This is my senior project for EE at San Jose State, so little extras like GPS help secure a good grade. JP This post has been edited by karmapayback: Oct 22 2004, 02:56 PM
|
||
|
|
|||
![]() ![]() |
| Time is now: 22nd November 2008 - 02:22 AM |