Go to Post The best place for acrylic is the trash can. - Cory [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 23-01-2013, 12:13
Keyreaper's Avatar
Keyreaper Keyreaper is offline
Keyreaper
AKA: Cyrus Duong
FRC #1710 (Revolution Ravonics)
Team Role: Programmer
 
Join Date: May 2011
Rookie Year: 2011
Location: Olathe
Posts: 140
Keyreaper is an unknown quantity at this point
Not able to read DS Indicators

Hello CD. I'm working on camera processing on the dashboard and sending information back to the cRIO. I've been pretty successful up until the point where I need send data back to the cRIO regarding instructions.

The issue I'm having is the ability not being able to read from indicators on the Driver Station (which is what I plan to feed my data into).

Below is an example I've set up to test if it would read from indicators. Sadly it does not.

However, when I change the indicator to some type of control, such as a dial or slider, it works perfectly fine and sends information back to the robot to change the drive speed.

Any help would be appreciated.

Click image for larger version

Name:	Help.PNG
Views:	38
Size:	8.4 KB
ID:	13628
__________________

CTO/Head Programmer of Team 1710

Reply With Quote
  #2   Spotlight this post!  
Unread 23-01-2013, 20:12
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: Not able to read DS Indicators

The code you showed on the robot look like it reads a variable called Distance and sets the value of one of the axes. Do you have code on the dashboard that writes to the variable? If you are hoping for an indicator to be written to on the dashboard and propagate to the robot, it doesn't work that way. You need to write to the variable when you write to the indicator.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 23-01-2013, 21:32
Keyreaper's Avatar
Keyreaper Keyreaper is offline
Keyreaper
AKA: Cyrus Duong
FRC #1710 (Revolution Ravonics)
Team Role: Programmer
 
Join Date: May 2011
Rookie Year: 2011
Location: Olathe
Posts: 140
Keyreaper is an unknown quantity at this point
Re: Not able to read DS Indicators

Quote:
Originally Posted by Greg McKaskle View Post
You need to write to the variable when you write to the indicator.

Greg McKaskle
I don't believe I quite understand.

Attached in the Imgur album is hopefully a better description of my problem.

http://imgur.com/a/KWxc6
__________________

CTO/Head Programmer of Team 1710

Reply With Quote
  #4   Spotlight this post!  
Unread 24-01-2013, 07:18
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: Not able to read DS Indicators

Did you update the dashboard to bind the controls in the Camera Tracking tab?

The dashboard binding pushes user initiated value changes to the robot and it updates controls and indicators when a SmartDashboard value comes in.

By default, programmatic updates to indicators and controls will not trigger an event. This is to avoid cycles and side-effects.

The way I was recommending is to add a SmartDashboard write of double to the place you are updating distance. Explicitly update the variable when you update the indicator.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 25-01-2013, 11:42
Keyreaper's Avatar
Keyreaper Keyreaper is offline
Keyreaper
AKA: Cyrus Duong
FRC #1710 (Revolution Ravonics)
Team Role: Programmer
 
Join Date: May 2011
Rookie Year: 2011
Location: Olathe
Posts: 140
Keyreaper is an unknown quantity at this point
Re: Not able to read DS Indicators

Quote:
Originally Posted by Greg McKaskle View Post
Did you update the dashboard to bind the controls in the Camera Tracking tab?

The dashboard binding pushes user initiated value changes to the robot and it updates controls and indicators when a SmartDashboard value comes in.

By default, programmatic updates to indicators and controls will not trigger an event. This is to avoid cycles and side-effects.

The way I was recommending is to add a SmartDashboard write of double to the place you are updating distance. Explicitly update the variable when you update the indicator.

Greg McKaskle
So if I understand correctly, you want me to write to the indicator in the Dashboard using a SD Write Double Bool.vi, then read from the indicator with the SD Read Double Bool.vi, instead of directly trying to read from the indicator on the Dashboard?

Will this update the variable when I update the indicator, as you say?
__________________

CTO/Head Programmer of Team 1710

Reply With Quote
  #6   Spotlight this post!  
Unread 25-01-2013, 15:13
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: Not able to read DS Indicators

Close, if I followed your description correctly. What I'd do is when you have dashboard data that you want to send to the robot, write it to both the indicator and to the SD variable at the same time.

Greg McKaskle
Reply With Quote
  #7   Spotlight this post!  
Unread 26-01-2013, 19:06
Keyreaper's Avatar
Keyreaper Keyreaper is offline
Keyreaper
AKA: Cyrus Duong
FRC #1710 (Revolution Ravonics)
Team Role: Programmer
 
Join Date: May 2011
Rookie Year: 2011
Location: Olathe
Posts: 140
Keyreaper is an unknown quantity at this point
Talking Re: Not able to read DS Indicators

Thanks for you help Greg! I did need to write to the SD before reading it. I also figured it helps if you put them in a seperate table/or group othewise it might get confused reading a stray variable with the same name... Much appriacted.
__________________

CTO/Head Programmer of Team 1710

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 21:53.

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