Go to Post Pictures are worth a thousand words... cell phone pics are worth 750. - kramarczyk [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-01-2007, 20:30
Orborde Orborde is offline
Registered User
FRC #1747
Team Role: Mentor
 
Join Date: Apr 2004
Rookie Year: 2003
Location: Indianapolis, IN
Posts: 44
Orborde has a spectacular aura aboutOrborde has a spectacular aura about
Send a message via AIM to Orborde
Telemetry

We're trying to get a real-time graph of the PID system we're working on. Currently, we're using Hyperterminal to log the data sent back over the program port, and then importing it into Excel for graphical goodness.

I'm open to any suggestions on how to make this real-time. I was looking into LabView and getting horribly confused; anyone have any good tutorials on this?

All I really need is something like the UNIX read/write functions; from there, I can hack up a graph in SDL or something. So I'd be perfectly happy with a C serial port interface tutorial.

Any other teams doing this?

Thanks!
  #2   Spotlight this post!  
Unread 23-01-2007, 23:19
Shinigami2057 Shinigami2057 is offline
Slackware Is Your New God (Mentor)
AKA: Harry Bock
FRC #1350 (Rambots)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Johnston, RI
Posts: 106
Shinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really nice
Re: Telemetry

I'm not quite certain what you're looking for - are you looking for help on writing serial I/O programs on Windows, or UNIX?

I recently wrote a decent, very simple serial API wrapper that compiles and runs on both. The code should be simple enough to read (it is extremely similar to the POSIX read/write functions) that you can learn the TTY API for both OSes quickly and modify it to suit your needs.

Attached are the files, it should compile just fine with default options to MSVC or gcc. If that wasn't what you need or if you have any questions, feel free to PM me
Attached Files
File Type: c serialio.c (6.0 KB, 34 views)
File Type: h serialio.h (1.4 KB, 24 views)
__________________
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.

Last edited by Shinigami2057 : 23-01-2007 at 23:24.
  #3   Spotlight this post!  
Unread 23-01-2007, 23:46
Uberbots's Avatar
Uberbots Uberbots is offline
Mad Programmer
AKA: Billy Sisson
FRC #1124 (ÜberBots)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Avon
Posts: 739
Uberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond repute
Re: Telemetry

probably the best way to do this would be with LabVIEW...
if you look at some VISA examples for LabVIEW online im sure you could get a working serial communication working just fine. from there it is just parsing the output string.

If you want to do it wirelessly though... well good luck. the only thing i can think of is to send the OI a user byte, but that wouldn't be real-time-y enough for this application
__________________
A few of my favorite numbers:
175 176 177 195 230 558 716 1024 1071 1592 1784 1816
RPI 2012
BREAKAWAY
  #4   Spotlight this post!  
Unread 24-01-2007, 00:19
TimCraig TimCraig is offline
Registered User
AKA: Tim Craig
no team
 
Join Date: Aug 2004
Rookie Year: 2003
Location: San Jose, CA
Posts: 221
TimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to behold
Re: Telemetry

If you're looking to plot the data from the serial port in real time so you can quickly adjust your PID gains, I use DataMaster2003.

http://www.datamaster2003.com/

You have to write a small program in VBScript to interpret the data coming from the serial port and set up the plot but it's pretty easy.
  #5   Spotlight this post!  
Unread 24-01-2007, 02:32
Orborde Orborde is offline
Registered User
FRC #1747
Team Role: Mentor
 
Join Date: Apr 2004
Rookie Year: 2003
Location: Indianapolis, IN
Posts: 44
Orborde has a spectacular aura aboutOrborde has a spectacular aura about
Send a message via AIM to Orborde
Re: Telemetry

I'm really just looking for any way to visualize this in real-time. Shinigami2057, that C interface is pretty nice; I'll probably end up just using that and SDL.

TimCraig, I'll have to give DataMaster a shot, though. After all, it IS free.

Quote:
Originally Posted by Uberbots View Post
probably the best way to do this would be with LabVIEW...
if you look at some VISA examples for LabVIEW online im sure you could get a working serial communication working just fine. from there it is just parsing the output string.
I figured LabVIEW was the logical choice, but I'm dumb and couldn't figure it out or find any good tutorials. Thanks for the pointer, though.
  #6   Spotlight this post!  
Unread 24-01-2007, 19:14
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,082
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Telemetry

Use the Dashboard port.

Look up the Dashboard spec at IFI, and put whatever variables you need in the packet. Then just link up with any serial-enabled program (like Sean Witte's .NET based Dashboard viewer) and you have the data at your disposal. You can then put it into a spreadsheet, graph it in realtime, etc.
  #7   Spotlight this post!  
Unread 24-01-2007, 22:36
Noah Kleinberg Noah Kleinberg is offline
Registered User
FRC #0395 (2TrainRobotics)
Team Role: Driver
 
Join Date: Jan 2006
Rookie Year: 2006
Location: New York
Posts: 196
Noah Kleinberg is a splendid one to beholdNoah Kleinberg is a splendid one to beholdNoah Kleinberg is a splendid one to beholdNoah Kleinberg is a splendid one to beholdNoah Kleinberg is a splendid one to beholdNoah Kleinberg is a splendid one to behold
Send a message via AIM to Noah Kleinberg
Re: Telemetry

If you haven't made something for this yet yourself, I've almost finished a java program that graphs information sent over the dashboard port (I was planning on using it for tuning PID). If you're interested send me a PM and I'll be able to upload it tomorrow.
  #8   Spotlight this post!  
Unread 24-01-2007, 22:52
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 803
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: Telemetry

Quote:
Originally Posted by Orborde View Post
\]\
All I really need is something like the UNIX read/write functions; from there, I can hack up a graph in SDL or something. So I'd be perfectly happy with a C serial port interface tutorial.
Thanks!
Knoppix or Cygwin? In all seriousness, you could take advantage of the UNIX read/write functions using knoppix to boot your machine into linux, or cygwin to emulate UNIX. From your post, it sounds like you are looking for a way to use UNIX read and write functions in windows, and both of those options should work. I am not 100% sure about Cygwin, but it "Should Work".
  #9   Spotlight this post!  
Unread 25-01-2007, 09:07
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Telemetry

The dashboard port is great if you need high-level debugging (eg, is your arm at the end of its travel). By the sound of it, some kinda of serial stream from the RC is the best way for you to go.

As for the PC side, it depends on how you want to use it. I've never used Labview, but for just real-time graphs, it may not be necessary. I'd be willing to bet that there is OSS that can take a stream. (Under unix, you can probably do some FIFO/piping magic so that you can point software to it and the software will read it like an endless file. )

I've never had a serious need for this, so I've haven't done the research. I do know, though, that SourceForge has a project for practically everything. Do some digging on there.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:55.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi