Log in

View Full Version : Telemetry


Orborde
23-01-2007, 20:30
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!

Shinigami2057
23-01-2007, 23:19
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 :)

Uberbots
23-01-2007, 23:46
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

TimCraig
24-01-2007, 00:19
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.

Orborde
24-01-2007, 02:32
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. :)

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.

Jared Russell
24-01-2007, 19:14
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.

Noah Kleinberg
24-01-2007, 22:36
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.

AustinSchuh
24-01-2007, 22:52
\]\
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".

Astronouth7303
25-01-2007, 09:07
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. :rolleyes: )

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.