Go to Post Wisdom shared is priceless, isn't it? And timeless. - JaneYoung [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 22-06-2013, 21:41
Jonathan L. Jonathan L. is offline
Programmer alumnus, mentor, and CSA
FRC #1094 (Channel Cats)
 
Join Date: Jan 2013
Rookie Year: 2011
Location: St. Louis MO
Posts: 82
Jonathan L. is a jewel in the roughJonathan L. is a jewel in the roughJonathan L. is a jewel in the roughJonathan L. is a jewel in the rough
Overhead using Test Mode?

I'm looking at using the new Test Mode. Is there ANY overhead associated with it during an official match?

Also is there ANY overhead associated with bringing up a new window on the Driver Station through the Dashboard during the test?

Or using network tables to communicate between the Dashboard and robot since the robot would be turned on, on the field and would not go into the test mode, however since the code would still be sitting there in test mode, are those network table entries active, and therefore overhead?

I'm using LabVIEW.
Let me know if you need to see the code.

Last edited by Jonathan L. : 22-06-2013 at 21:45.
  #2   Spotlight this post!  
Unread 23-06-2013, 10:20
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,756
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: Overhead using Test Mode?

Test mode is an alternative to autonomous and teleop. The field will not put your robot into test mode, and on the field, your DS does not control the mode.

Test mode is intended for development, troubleshooting, and validation before you run a match, not during a match.

If you want to run a test and have the test results/progress show in another window, this should be fine. The overhead will depend on what the window does and how the code for it is written.

The test mode is implemented using network tables, but of there are no updates to a variable, there is no/little overhead.

I hope I'm answering your questions, but if not, please give more background on what you are trying to accomplish or how you are thinking of using test mode.

Greg McKaskle
  #3   Spotlight this post!  
Unread 23-06-2013, 16:49
Jonathan L. Jonathan L. is offline
Programmer alumnus, mentor, and CSA
FRC #1094 (Channel Cats)
 
Join Date: Jan 2013
Rookie Year: 2011
Location: St. Louis MO
Posts: 82
Jonathan L. is a jewel in the roughJonathan L. is a jewel in the roughJonathan L. is a jewel in the roughJonathan L. is a jewel in the rough
Re: Overhead using Test Mode?

I have attached a Robot Project and a Dashboard Project with the test code in them. You should be able to run these in the simulated mode and probe around. Note that you may want to hook up a joystick on joystick # 2.

The test: Launcher Test for testing a Launcher on a practice field, in the pit etc..

When the Launcher Test is selected from the drop-down menu in the Test tab on the Dashboard it brings up an extra window with sliders to control motor speeds, a goal for our Launcher Angle (up/down), a potentiometer readout for the same Launcher Angle, and a range control that sets the range the Launcher Angle must be in, to stop moving.



Since the Test VI is a static VI does this mean it is overhead?
I'm not for sure what static VI means.
Attached Files
File Type: zip 2013 Robot Project.zip (3.51 MB, 9 views)
File Type: zip 2013 Dashboard Project.zip (335.9 KB, 7 views)
  #4   Spotlight this post!  
Unread 23-06-2013, 21:03
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,756
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: Overhead using Test Mode?

I looked at and ran some of your code, and it seems fine to me. I didn't see the CPU usage being more than a few percent on the computer when running the popup panel for the test. I didn't run it on the cRIO or the simulator.

The general idea is to give you a way to test out a mechanism in order to validate it after work or after a match. So this seems like a good example.

As for the question -- a static VI is one that is known about at compile time, as opposed to a dynamically called VI. At least that is what I assume you are asking about. Do you have a specific location in the environment that is calling it static and confusing you?

Greg McKaskle
  #5   Spotlight this post!  
Unread 23-06-2013, 21:56
Jonathan L. Jonathan L. is offline
Programmer alumnus, mentor, and CSA
FRC #1094 (Channel Cats)
 
Join Date: Jan 2013
Rookie Year: 2011
Location: St. Louis MO
Posts: 82
Jonathan L. is a jewel in the roughJonathan L. is a jewel in the roughJonathan L. is a jewel in the roughJonathan L. is a jewel in the rough
Re: Overhead using Test Mode?

About the static VI: I'm just wondering if since the Test VI on the Main VI is static, does the program keep running it even while TeleOp is running, and/or since the Test VI is outside the main case structure?

Let me restate the main question: Does putting in test code make ANY extra overhead, NOT during the test but during an official match?

The next time I can I will probably test the time it takes for the main While Loop to run in code with and without the test code and compare the results.
  #6   Spotlight this post!  
Unread 23-06-2013, 23:09
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,600
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: Overhead using Test Mode?

You should be careful about using the word ANY. For example, the 2013 template that includes test mode adds two extra cases in the switch statement in the main while loop compared to the 2012 template. This adds several extra assembly instructions. At 400 mhz, this might add a few hundred nanoseconds. This means that test mode does cause extra overhead. However, I don't think that is really what you were looking for.

Note that this example is based purely on the template, and it doesn't matter if you've added any test mode code.

Last edited by Joe Ross : 23-06-2013 at 23:19.
  #7   Spotlight this post!  
Unread 24-06-2013, 07:30
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,756
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: Overhead using Test Mode?

Ahh. I was wondering if/how the static VI reference was causing the confusion.

The Test VI is launched when the DS starts test mode and aborted when it leaves test mode. There is no overhead when the robot isn't in test mode.

Static refers to the fact that the name of the VI is known at compile time and the VI is built into the EXE even though it is referred to dynamically. VI References work like function pointers. They are generally used for more sophisticated architectures, but are also handy when you want to run/abort a piece of code and it isn't required to cooperate.

Greg McKaskle
  #8   Spotlight this post!  
Unread 24-06-2013, 11:33
Jonathan L. Jonathan L. is offline
Programmer alumnus, mentor, and CSA
FRC #1094 (Channel Cats)
 
Join Date: Jan 2013
Rookie Year: 2011
Location: St. Louis MO
Posts: 82
Jonathan L. is a jewel in the roughJonathan L. is a jewel in the roughJonathan L. is a jewel in the roughJonathan L. is a jewel in the rough
Re: Overhead using Test Mode?

Quote:
Originally Posted by Greg McKaskle View Post
The Test VI is launched when the DS starts test mode and aborted when it leaves test mode. There is no overhead when the robot isn't in test mode
Thank You, I think this answers the question.
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


All times are GMT -5. The time now is 03:26.

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