Go to Post If the pattern holds, it's a bizarro year. - GeeTwo [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 29-03-2010, 11:30
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Custom Dashboards and the Driver Station Software

This is mostly for the NI guys, but anyone else who knows the answer can feel free to jump in as well.

Whenever I replace the default dashboard on the Classmate (in C:\Program Files\FRC Dashboard\Dashboard.exe), it starts up twice when either logging into the Driver account or when running the Driver Station program in the Developer account. Also, when I replace the default dashboard with a command line program (a TCP forwarder I wrote that just uses printf() for some diagnostic information) command prompt never shows up.

Summarized, my questions about the Driver Station software are:
  • Why would it start custom dashboards twice?
  • Does it redirect stdin or stdout from the custom dashboard? Why wouldn't a command line program not display?
__________________
  #2   Spotlight this post!  
Unread 30-03-2010, 09:40
buchanan buchanan is offline
Registered User
FRC #2077 (Laser Robotics)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2007
Location: Wales, WI
Posts: 68
buchanan is just really nicebuchanan is just really nicebuchanan is just really nicebuchanan is just really nice
Re: Custom Dashboards and the Driver Station Software

We've also experienced the "two instances" problem.

Is there detailed documentation or source code (ideally something that could be read without doing a LV install) available for the classmate-side DS/dashboard software? Plugging into the remote and/or custom dashboard mechanism has been a continuing series of little surprises like this. Some more concrete information would be most helpful.
  #3   Spotlight this post!  
Unread 30-03-2010, 14:54
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Custom Dashboards and the Driver Station Software

I have also had the two instances problem. I solved it by checking if another instance was running. my only guess is that they want to make sure it runs

EDIT: It appears LV builds a one instance application, so it could also be to focus the dashboard, or make sure it runs
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib

Last edited by byteit101 : 30-03-2010 at 15:08.
  #4   Spotlight this post!  
Unread 30-03-2010, 20:43
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Custom Dashboards and the Driver Station Software

Maybe I misunderstood the original question. Is the issue that two DBs run when the Driver starts, or is the issue that fast-user-switching results in a DB running in both Driver and Developer?

If it is the second, then you can solve this similar to how the DS does. You identify a resource owned by the DB -- it can be a file or a network connection. When the second app fails to acquire the resource, it sends a message to the first instance to commit hara-kiri. The second then sleeps and tries again until the first releases the resource. As a fallback, the second can give up and decide it lost the battle and exit with a message or something.

Greg McKaskle
  #5   Spotlight this post!  
Unread 30-03-2010, 22:31
buchanan buchanan is offline
Registered User
FRC #2077 (Laser Robotics)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2007
Location: Wales, WI
Posts: 68
buchanan is just really nicebuchanan is just really nicebuchanan is just really nicebuchanan is just really nice
Re: Custom Dashboards and the Driver Station Software

Only logged in once, as driver.
  #6   Spotlight this post!  
Unread 30-03-2010, 23:47
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,856
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: Custom Dashboards and the Driver Station Software

It happens when we replace the dashboard with a non-LabVIEW program that allows multiple versions of itself.

For instance, point the DS ini file to start wordpad instead of a traditional LabVIEW Dashboard exe and you'll see what they're talking about.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #7   Spotlight this post!  
Unread 31-03-2010, 07:38
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: Custom Dashboards and the Driver Station Software

Until we get an "official" solution, I threw together a launchpad of sorts that fixes this. It's just a C# program that you set as Dashboard.exe

When the DS runs it, it creates a file on the C drive. Additional instances check if this file exists, and if it does, exit right away. The program then launches the your dashboard (renamed to DashboardActual.exe), waits for it to close, and deletes the file. Simple.

I'm heading off to the North Star regional today. I'll try to put this up if I can get internet access at the hotel. If anyone wants to check this out, find me (Matt Kline) in the Team 537 pit and I'll be happy to set you up with it and any of my other software such as the CARDS Video Dashboard or video forwarder.
__________________

Last edited by slavik262 : 31-03-2010 at 07:40.
  #8   Spotlight this post!  
Unread 31-03-2010, 08:21
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Custom Dashboards and the Driver Station Software

I'm still confused. Does one launch of the DS launch two instances of the dashboard, or simply launch one more? In my test, I see one more.

Greg McKaskle
  #9   Spotlight this post!  
Unread 31-03-2010, 08:56
buchanan buchanan is offline
Registered User
FRC #2077 (Laser Robotics)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2007
Location: Wales, WI
Posts: 68
buchanan is just really nicebuchanan is just really nicebuchanan is just really nicebuchanan is just really nice
Re: Custom Dashboards and the Driver Station Software

Quote:
Originally Posted by Greg McKaskle View Post
I'm still confused. Does one launch of the DS launch two instances of the dashboard, or simply launch one more? In my test, I see one more.

Greg McKaskle
If the DS is launching "one more," that means some other mechanism launched the first, right? It's unclear to me why there are two different ways to start the same program, with both enabled in the system. If the DS is explicitly launching the second, how and why was the first started? Can one of these launch mechanisms be disabled without breaking the other?

If it's indeed by design, that makes it a specific requirement for a custom dashboard that it contain logic to handle redundant instances. Certainly doable, but again, if the intent is to support custom components here, it's good to be clear about such things.
  #10   Spotlight this post!  
Unread 31-03-2010, 09:02
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: Custom Dashboards and the Driver Station Software

I'm pretty sure that the DS itself starts two instances, because not only does the "two instance" problem arise when you log in as Driver, but also when you start the DS in the Administrator account.

Also, where is the .ini file everyone keeps talking about for the Driver Station software?
__________________
  #11   Spotlight this post!  
Unread 31-03-2010, 10:07
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,856
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: Custom Dashboards and the Driver Station Software

C:\Documents and Settings\All Users\Documents\FRC DS Data Storage.ini
Most people just keep the Dashboard.exe name and replace it with their own program, like you're probably doing.
For instance, create a shortcut for wordpad, rename it "Dashboard.exe", and put it in C:\Program Files\FRC Dashboard.


Greg,
The launch of the DS attempts to start two instances of the dashboard, but the LabVIEW default dashboard only allows one to appear.
Replace the LabVIEW default dashboard with a non-LabVIEW custom Dashboard (or some other program) and you'll get two copies when you launch the DS.

I happen to use wordpad on occasion when I want to copy/paste and save the Diagnostic Tab error messages.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 31-03-2010 at 10:12.
  #12   Spotlight this post!  
Unread 31-03-2010, 17:16
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Custom Dashboards and the Driver Station Software

Quote:
Originally Posted by Greg McKaskle View Post
I'm still confused. Does one launch of the DS launch two instances of the dashboard, or simply launch one more? In my test, I see one more.

Greg McKaskle
when you login to Driver, it starts the DS, which then starts two instances of the DB. this also works in Developer and on a different computer

launching DS
launching DB
launching DB
launched DS

Mark, I don't see this file
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
  #13   Spotlight this post!  
Unread 31-03-2010, 18:23
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,856
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: Custom Dashboards and the Driver Station Software

Here's where the file is on our Classmate
Attached Thumbnails
Click image for larger version

Name:	DS-ini-location.jpg
Views:	51
Size:	121.3 KB
ID:	8954  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #14   Spotlight this post!  
Unread 31-03-2010, 21:59
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Custom Dashboards and the Driver Station Software

I'll look again, and because LV catches and prevents multiple instances automatically, it would mask such a bug pretty well. This morning I tested with wordpad in the ini file and I received only one copy. I guess I'll look at the source on the server.

Greg McKaskle
  #15   Spotlight this post!  
Unread 31-03-2010, 22:43
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Custom Dashboards and the Driver Station Software

Edit: Found it.

Grrr, left in some debugging code. Still doesn't explain why wordpad test didn't show the issue. It should be fixed for next year, possibly the next rev if one occurs this season. I can't think of an easier workaround than to make your DB a singleton using a wrapper or using a build setting to catch launch events.

Greg McKaskle
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get cRIO to connect to Driver Station Software greatman05 FRC Control System 2 13-02-2010 22:33
Custom Driver station app for classmate mtndurbin Programming 4 07-02-2010 10:32
pic: Custom Icons for Driver Station Accounts Phreadumb Extra Discussion 1 02-02-2010 20:58
2010 Driver Station Netbook Driver Account and Java joshholat FRC Control System 2 10-01-2010 15:04
paper: Set and display your Auto-Mode using LabVIEW and the Driver Station PhilBot Extra Discussion 0 11-02-2009 12:32


All times are GMT -5. The time now is 23:21.

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