Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Any way to connect to console on cRIO? (http://www.chiefdelphi.com/forums/showthread.php?t=81578)

SteveGarward 31-01-2010 06:04

Any way to connect to console on cRIO?
 
I'm new to the cRIO, so this might be basic stuff..

I understand that you can connect to the cRIO and get console output through a terminal program (say HyperTerminal) through the serial port and a null modem cable. But, is there a way to telnet (or otherwise) to it in order to read files? I'd like to be able to log data to a file (by just redirecting std out for example), and then be able to log in and read the file (or retrieve it) later.

Is that even possible? Or can you only get console output through a terminal in real time? Is there any way to capture console output over the network instead of just serial? (I know you are able to debug that way, but can I get console output over network during a match?)

gvarndell 31-01-2010 07:54

Re: Any way to connect to console on cRIO?
 
1 Attachment(s)
Quote:

Originally Posted by SteveGarward (Post 910450)
is there a way to telnet (or otherwise) to it

Your brain is going a mile a minute and, while it's great that you're exploring all these possibilities, I can only answer so many questions per post.

Have you tried telnet-ing to it?
vxWorks has a telnet server that applications can use, but I don't know if it's configured in the kernels provided to the teams.

The other thing you may be able to do, and find creative uses for, is bring up what's called a host shell.
This requires that you've first connected to the cRio with a target server connection.
I'm attaching a screen shot that should help you try it.
This was taken from a different version of Workbench.
My team uses LabView so, particularly during build season, I can't get a minute actually connected to the cRio.

SteveGarward 31-01-2010 15:41

Re: Any way to connect to console on cRIO?
 
Ahhh... Host shell is basically what I want. I tried telnet-ing but no connection. Didn't know if that was because the cRIO doesn't run a telnet daemon or not.

But for the host shell, I'll need to resolve my other issue where I can't get Workbench connected to it as a remote target.

I also found some posts and documentation around that say I should be able to FTP to the cRIO to retrieve files, which is really what I want. So I will try that today too and report back.

Radical Pi 31-01-2010 17:39

Re: Any way to connect to console on cRIO?
 
http://first.wpi.edu/FRC/frccupdates.html

Look at the NetConsole instructions. It works perfectly as a shell for the cRIO for us

Be warned though that you are much better off outputting to the User Output section of the Driver Station though. The DriverStationLCD class is what you want

jhersh 01-02-2010 02:22

Re: Any way to connect to console on cRIO?
 
Quote:

Originally Posted by SteveGarward (Post 910704)
I also found some posts and documentation around that say I should be able to FTP to the cRIO to retrieve files, which is really what I want. So I will try that today too and report back.

It sounds like you really want to write log files to the disk-on-chip and then FTP them off the cRIO after the match. The host shell and the NetConsole are both not going to work during a competition.

SteveGarward 01-02-2010 06:21

Re: Any way to connect to console on cRIO?
 
Right, I don't want to read a console as the robot is operating during a match, only write to a log I can read later in the pit to diagnose anything.

I'll be able to try all these out later in the week. Thanks for all the suggestions!

slavik262 01-02-2010 10:02

Re: Any way to connect to console on cRIO?
 
If you just want to read a file on the cRIO, you can just FTP into the robot's IP.

SteveGarward 04-02-2010 06:51

Re: Any way to connect to console on cRIO?
 
Thanks everyone for the help. Tonight I managed to successfully test a simple logging class, which writes to a file on the cRIO. We can then retrieve the file via FTP. We'll use this for diagnostics during our matches.

Also got access to the cRIO's console via hyperterminal and through Windriver Workbench as well (not at the same time :) ).

This mentor is now officially happy.

gvarndell 04-02-2010 07:28

Re: Any way to connect to console on cRIO?
 
Quote:

Originally Posted by SteveGarward (Post 913100)
Thanks everyone for the help. Tonight I managed to successfully test a simple logging class, which writes to a file on the cRIO. We can then retrieve the file via FTP. We'll use this for diagnostics during our matches.

Good work.
Depending on what you're logging, you might find logging user events in 'System Viewer' (open Workbench Help and search for it) a better and more efficient way. You can log arbitrary data (binary and string) which will be automatically time-stamped. While I'm sure you are, and you should be, proud of this break-through, the sub-microsecond resolution time stamps of System Viewer events could prove invaluable to whatever post-match analysis you're contemplating. OTOH, using System Viewer *without* being connected to the cRio in debug mode is admittedly a fair bit of programming work.

Quote:

Also got access to the cRIO's console via hyperterminal and through Windriver Workbench as well (not at the same time :) ).
The terminal in Workbench is okay.
HyperTerminal is the worst software I've ever used. :mad:
Try TeraTerm -- it's a brilliantly well behaved tool and it (easily and reliably) logs to files on the host file system.

slavik262 04-02-2010 11:00

Re: Any way to connect to console on cRIO?
 
Quote:

Originally Posted by SteveGarward (Post 913100)
Thanks everyone for the help. Tonight I managed to successfully test a simple logging class, which writes to a file on the cRIO. We can then retrieve the file via FTP. We'll use this for diagnostics during our matches.

This sounds silly, but can I see the code you're using to save info to a file? For whatever reason, my team and a few others are having serious issues writing files. Both ofstream and FILE pointers/fopen() don't work right.

The thread about it is here:

http://www.chiefdelphi.com/forums/sh...ad.php?t=79548

SteveGarward 05-02-2010 07:28

Re: Any way to connect to console on cRIO?
 
I agree HyperTerminal is one of the worst, but it's available on the Classmate without me having to look too hard. :)

I've just posted a new thread over here with our logging code. Hope this helps.


All times are GMT -5. The time now is 12:20.

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