Go to Post We are all just pawns in FIRST's quest for global domination. - Tom Bottiglieri [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 04-03-2014, 10:00
tolefanjh tolefanjh is offline
Registered User
FRC #1585
 
Join Date: Feb 2011
Location: Manchester, NY
Posts: 8
tolefanjh is an unknown quantity at this point
Robot Mode Global Variable in LabView

I'm curious as to what other teams are setting this variable to in the Begin.vi? We have seen a few cases were our robot has done strange things (motors running and such) when first enabled in Teleop mode. We tried different settings for this variable and haven't figured out what is really causing the problem, though I highly suspect it has something to do with this, just trying to work through why it is doing it.
Reply With Quote
  #2   Spotlight this post!  
Unread 04-03-2014, 10:41
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,752
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: Robot Mode Global Variable in LabView

If you right click on the global and choose Find>>Global References, you'll find that it is assigned in two places and never read. The global is there so that periodic code, vision code, etc. can have an easy way to make code conditional. You don't really need to set the global. If none of your code is reading it, it won't have any affect. If you are reading it, do you want the value set by the DS in Robot Main, or your value?

You jerking when teleop begins likely has to do with the values that the motors are set to while the robot is disabled. When enabled, those values are "live". Shortly after that, your teleop probably reads joysticks and buttons and sets things to zero.

It is a reasonably good idea to set your motors to zero in the disabled function, but be sure that you aren't getting into a race with Periodic tasks.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 09-03-2014, 18:01
tolefanjh tolefanjh is offline
Registered User
FRC #1585
 
Join Date: Feb 2011
Location: Manchester, NY
Posts: 8
tolefanjh is an unknown quantity at this point
Re: Robot Mode Global Variable in LabView

The problem seems to be more than just a quick 'twitching' of the motors and such. It seems that some motors try to run a sequence, turning on for a couple of seconds, off for a bit and so forth.

Still working to figure out what is going on, but it is almost like the autonomous code is running, but not our code or only parts of it.

Chris.
Reply With Quote
  #4   Spotlight this post!  
Unread 10-03-2014, 08:42
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,752
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: Robot Mode Global Variable in LabView

If you run interactively, hit the run button or Robot Main, you can open panels and see what is running. Also, the charts tab and log file will show you if the auto code is running. It shows up on the graph as a green line, or actually as tightly spaced green dots.

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