Go to Post Pulling off an off season during a hurricane isn't easy. - Arefin Bari [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-02-2011, 21:55
CapnKernul CapnKernul is offline
Registered User
FRC #1515
 
Join Date: Feb 2011
Location: Beverly Hills
Posts: 3
CapnKernul is an unknown quantity at this point
Non-volatile memory?

I was looking through the Javadocs and couldn't find any class that mentions non-volatile memory on the robot. I'm not even sure if the cRIO has a filesystem that the user programs can access.

Anyone know if there's any way for a robot Java program to read and write values to any form of non-volatile memory?
Reply With Quote
  #2   Spotlight this post!  
Unread 09-02-2011, 00:09
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,186
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Non-volatile memory?

Look at the FileConnection class. Use Connector to get a FileConnection.

this may help
Reply With Quote
  #3   Spotlight this post!  
Unread 09-02-2011, 14:24
CapnKernul CapnKernul is offline
Registered User
FRC #1515
 
Join Date: Feb 2011
Location: Beverly Hills
Posts: 3
CapnKernul is an unknown quantity at this point
Re: Non-volatile memory?

Awesome, thank you!
Reply With Quote
  #4   Spotlight this post!  
Unread 21-05-2011, 20:11
mdrouillard mdrouillard is offline
Registered User
FRC #0772
 
Join Date: May 2011
Location: Canada
Posts: 29
mdrouillard is an unknown quantity at this point
Re: Non-volatile memory?

As I am not too familiar with Java but am trying to do file io to the crio's non-volatile memory using C++. In the 2011 wplib I simply do not see an equivalent class as fileconnector, as suggested by Ron in the Java suggestion. Therefore does anyone have sample code that could write something to the crio in c++ . Perhaps I simply need to include stdio.h or a basic library, but then I must as the question of whether writing to the filesystem is allowed or if there are certain FRC restrictions on methods regarding this.

Thanks to, and thoughts from everyone are welcomed.

Michael
Reply With Quote
  #5   Spotlight this post!  
Unread 23-05-2011, 03:05
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Non-volatile memory?

Quote:
Originally Posted by mdrouillard View Post
As I am not too familiar with Java but am trying to do file io to the crio's non-volatile memory using C++. In the 2011 wplib I simply do not see an equivalent class as fileconnector, as suggested by Ron in the Java suggestion. Therefore does anyone have sample code that could write something to the crio in c++ . Perhaps I simply need to include stdio.h or a basic library, but then I must as the question of whether writing to the filesystem is allowed or if there are certain FRC restrictions on methods regarding this.

Thanks to, and thoughts from everyone are welcomed.

Michael
In C++ you can use the typical file i/o library functions to access the disk. There are no limitations related to FRC. It is a flash disk, though, so very high numbers of writes will damage the flash.

-Joe
Reply With Quote
  #6   Spotlight this post!  
Unread 25-06-2011, 15:32
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,077
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: Non-volatile memory?

Quote:
Originally Posted by jhersh View Post
It is a flash disk, though, so very high numbers of writes will damage the flash.

-Joe
Joe,

Do you have a ballpark figure of what this number tends to be? We have, in the past, written logger classes that make several writes to "disk" per second. Sounds like a longer buffer might be in order to preserve our cRIOs...

Thanks.
Reply With Quote
  #7   Spotlight this post!  
Unread 27-06-2011, 22:07
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,561
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Non-volatile memory?

Quote:
Originally Posted by Jared341 View Post
Joe,

Do you have a ballpark figure of what this number tends to be? We have, in the past, written logger classes that make several writes to "disk" per second. Sounds like a longer buffer might be in order to preserve our cRIOs...
Typical flash memories are on the order of 100,000 to 1 million writes. I'm not sure if the cRIO does wear leveling, but that could extend it by another order of magnitude or more.
Reply With Quote
  #8   Spotlight this post!  
Unread 28-06-2011, 12:24
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Non-volatile memory?

Quote:
Originally Posted by Joe Ross View Post
Typical flash memories are on the order of 100,000 to 1 million writes. I'm not sure if the cRIO does wear leveling, but that could extend it by another order of magnitude or more.
The cRIO uses a disk-on-chip from M-Systems (the M-DOC G4)... it does wear leveling internally.

-Joe
Reply With Quote
Reply


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 10:39.

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