Go to Post The real question is not whether any teams have had metal in a speed controller, it's whether any teams haven't. - EricH [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 10-03-2014, 12:16
tr6scott's Avatar
tr6scott tr6scott is offline
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 520
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Setting the real time clock and date on cRio

Last year we used a data logger based on the 3096 labview data logger posted here on CD.

It worked well but if the log file already existed, it would append the data to the existing data, and then it would become a data exposition to find the data you were looking for. We also had times when the we were running the bot for log periods of time, (parades and such) that the file grew very large and we think the crio was having issues writing to the file.

This year we working on writing a new file each time we powered on, and attempted to use date and time as the filename for the log file. This code works well, but we can't seem to get the cRio date and time to stick or make sense.

Most files, (going from memory, so might be wrong) end up with a Jan 01, 1970 data and 00 00 time.

We have used the Max software to connect to the cRio and set the real time date and time on the cRio, but it seems to not match, anything we set. Saturday we set in the Max software, and we had year dates, (again from memory) like 2106?

I assume I doing something wrong, and I would guess it's a training issue, let me know if anyone has this working?
Attached Files
File Type: vi File-with-date-time-DONE.vi (21.3 KB, 20 views)
__________________
The sooner we get behind schedule, the more time we have to catch up.

Reply With Quote
  #2   Spotlight this post!  
Unread 10-03-2014, 12:30
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Electrical/Programming Mentor
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,785
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Setting the real time clock and date on cRio

Messing with the clock on there can be tricky, as I understand the clock resets every time the cRio is powered off (I'd love to be correct, if my understanding is based on wrong information!).

It might be better to number your files instead - log1.txt, log2.txt, etc. You could keep the current number for the log file in a config file and just read it in, use it, then increment and overwrite the value in the config file for next time. Then the most recent log file would have the largest number on it. For easy searching/organization, I would recommend using 3 or 4 digit numbers at all times (001 instead of 1, for example) - otherwise you'd end up with something like
log1.txt
log10.txt
log2.txt
log3.txt
etc
__________________
2007 - Present: Mentor, 2177 The Robettes
LRI: North Star 2012-2016; Lake Superior 2013-2014; MN State Tournament 2013-2014, 2016; Galileo 2016; Iowa 2017
2015: North Star Regional Volunteer of the Year
2016: Lake Superior WFFA
Reply With Quote
  #3   Spotlight this post!  
Unread 10-03-2014, 12:55
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,820
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Setting the real time clock and date on cRio

I don't believe that the 4-slot cRIO has an internal battery to maintain the clock when it's powered off. So it would have to be set each time.

The 8-slot does have an internal battery to preserve the clock.

Another alternative is to maintain logs on the DS instead.
The clock there is good and the logs are easier to access.

Data can be temporarily cached in a cRIO log file when there is no communication with the DS, then forwarded when contact is established.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #4   Spotlight this post!  
Unread 10-03-2014, 13:02
tr6scott's Avatar
tr6scott tr6scott is offline
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 520
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: Setting the real time clock and date on cRio

Thanks Gents,
We haven't played much getting the data to the DS, so I will work on sequentially numbering them, and log to a file.

Edit: and it is 4 slot Mark.
__________________
The sooner we get behind schedule, the more time we have to catch up.

Reply With Quote
  #5   Spotlight this post!  
Unread 11-03-2014, 08:28
Doug Norman's Avatar
Doug Norman Doug Norman is offline
Registered User
no team (National Instruments)
Team Role: Engineer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Austin, TX
Posts: 137
Doug Norman will become famous soon enoughDoug Norman will become famous soon enough
Re: Setting the real time clock and date on cRio

An easy alternative would be to log on the cRIO like you want to, but get your date and time from the dashboard. On the dashboard you could read the date and time on a regular basis, and then pass it to the robot using the smart dashboard VIs.
__________________
Doug Norman
National Instruments
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 02:07.

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