|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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 |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
||||
|
||||
|
Re: Network tables not syncing?
Quote:
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 |
|
#4
|
|||
|
|||
|
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 |
|
#5
|
||||
|
||||
|
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. |
|
#6
|
|||
|
|||
|
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 |
|
#7
|
||||
|
||||
|
Re: Network tables not syncing?
Quote:
I've also attached a copy of Teleop.vi so you can see how we handle the "Shooter Speed" control on the robot. |
|
#8
|
|||
|
|||
|
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 |
|
#9
|
||||
|
||||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|