Go to Post REMEMBER - there ARE things more important than robots... false - Botwoon [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 07-02-2016, 13:33
BitTwiddler's Avatar
BitTwiddler BitTwiddler is offline
electronics/programming mentor
AKA: Mr Tanguay
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Sierra Vista, AZ
Posts: 251
BitTwiddler is on a distinguished road
Network tables not syncing?

Yesterday we were testing our boulder shooter. We use a motor and we want to control the motor speed using a slider control on the custom tab of the LabView dashboard.
We noticed some strange behavior using this control which I assume is using network tables to communicate with the robot. When we first start the driver station and the robot the speed control would work perfectly to modify the motor speed but then after trying new speeds it would suddenly no longer update the speed setting on the robot.
We looked at the variables tab on the dashboard and we could see the speed control variable following the slider setting but when we probed the same variable on the robot side it would not change. It seems like that variable stopped getting updates on the network table server. The NT connected indicator on the dashboard is lit solidly green.
I am not really all that familiar with the network tables to do any really in-depth troubleshooting of this problem.
Any ideas what we should look at next? FYI, the game controller data is getting to the robot OK.
Thanks,
Dave
Reply With Quote
  #2   Spotlight this post!  
Unread 07-02-2016, 15:47
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: Network tables not syncing?

If the variables have a diamond symbol in the left column, the variable is no longer synched. I haven't seen the issue this year, in my own use or in the beta. So if you have some idea of what might cause this, please post. Be sure that your are running the DS since the DS lets the dashboard know the robot IP.

It looks to me like the connected Boolean should be verified a number of times each second. Is it possible that this variable is not being updated in a loop and is not in a tab that makes it be bound?

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 07-02-2016, 16:10
BitTwiddler's Avatar
BitTwiddler BitTwiddler is offline
electronics/programming mentor
AKA: Mr Tanguay
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Sierra Vista, AZ
Posts: 251
BitTwiddler is on a distinguished road
Re: Network tables not syncing?

Quote:
Originally Posted by Greg McKaskle View Post
If the variables have a diamond symbol in the left column, the variable is no longer synched. I haven't seen the issue this year, in my own use or in the beta. So if you have some idea of what might cause this, please post. Be sure that your are running the DS since the DS lets the dashboard know the robot IP.

It looks to me like the connected Boolean should be verified a number of times each second. Is it possible that this variable is not being updated in a loop and is not in a tab that makes it be bound?

Greg McKaskle
1. I'll look for the diamond tomorrow and let you know.
2. I believe the slider to NT write number wiring is inside of loop one of the DB but I'll check that also to be certain. I'm not sure if the custom tab is explicitly spelled out in the DB block diagram so I can't explore the binding issue.
Dave
Reply With Quote
  #4   Spotlight this post!  
Unread 07-02-2016, 19:02
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: Network tables not syncing?

The default dashboard has code above the orange comment that calls the Get Tab Control Refs for two tabs, Basic and Custom. This code appends all of those control refs and does name binding between the control name and variable name. You can add other tabs or control refs if you like by adding them to the array. You can also add read/write subVI calls to either the top loop or the vision loop.

Please update once you have more details.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 10-02-2016, 01:54
BitTwiddler's Avatar
BitTwiddler BitTwiddler is offline
electronics/programming mentor
AKA: Mr Tanguay
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Sierra Vista, AZ
Posts: 251
BitTwiddler is on a distinguished road
Re: Network tables not syncing?

I just figured out the problem. Bad assumptions on my part.

What we were doing was creating and naming a control on the custom tab of the dashboard then going into the dashboard's block diagram and wiring it to a WPI NT Write VI. That step is superfluous and would just confuse the robot. All we needed to do was carefully read and follow the instructions on the custom tab.

In other words all we had to do is create the controls/indicators and give them names then go to the robot and use the WPI NT Read/Write VIs with those names.

Arrgh! I've agonized for hours over this simple mistake. I really thought we had to have complementary NT Reads/Writes on both the robot and the dashboard.
Reply With Quote
  #6   Spotlight this post!  
Unread 10-02-2016, 10:55
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: Network tables not syncing?

The bound controls don't need this, though it shouldn't hurt to put in your own code and publish it to a variable too. I am happy to look into it if you have some code that shows it or a brief description of it.

Greg McKaskle
Reply With Quote
  #7   Spotlight this post!  
Unread 10-02-2016, 13:20
BitTwiddler's Avatar
BitTwiddler BitTwiddler is offline
electronics/programming mentor
AKA: Mr Tanguay
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Sierra Vista, AZ
Posts: 251
BitTwiddler is on a distinguished road
Re: Network tables not syncing?

Quote:
Originally Posted by Greg McKaskle View Post
The bound controls don't need this, though it shouldn't hurt to put in your own code and publish it to a variable too. I am happy to look into it if you have some code that shows it or a brief description of it.

Greg McKaskle
I've attached an earlier version of the dashboard main so you can see how we had been binding the controls/indicators to the names on the robot. The control labeled "Shooter Speed" (at the top of loop 1) is where we noticed the problem but we've had problems with the encoder and gyro reset buttons also.
I've also attached a copy of Teleop.vi so you can see how we handle the "Shooter Speed" control on the robot.
Attached Files
File Type: vi Dashboard Main.vi (283.4 KB, 16 views)
File Type: vi Teleop.vi (21.9 KB, 10 views)
Reply With Quote
  #8   Spotlight this post!  
Unread 10-02-2016, 20:50
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: Network tables not syncing?

I replicated the dashboard with both bound and loop updates and I saw the value changes sometimes update on the robot and sometimes not. It appears the this is a race condition. I need to debug further to understand if the implementation can get rid of this. Thanks for bringing it to my attention.

Greg McKaskle
Reply With Quote
  #9   Spotlight this post!  
Unread 10-02-2016, 23:43
BitTwiddler's Avatar
BitTwiddler BitTwiddler is offline
electronics/programming mentor
AKA: Mr Tanguay
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Sierra Vista, AZ
Posts: 251
BitTwiddler is on a distinguished road
Re: Network tables not syncing?

Greg,
Thanks for taking the time to look at it. Now I feel somewhat smug knowing that it is a real problem and not something stupid I did.
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: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