Go to Post That's right 10 years and this is the first time ever that the school wanted anything to do with the FIRST team. - RoteAugen [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 Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 02-02-2013, 14:07
stingray27's Avatar
stingray27 stingray27 is offline
Registered User
AKA: Michael Ray
FRC #0027 (Team RUSH)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Clarkston, MI
Posts: 209
stingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to all
Dashboard in LabVIEW

Hey Chiefdelphi,

I am working on our dashboard project and ran into some problems. Here is what I am trying to do:
I need to, in disable.vi of our robot code, pull a Boolean array from the dashboard which then determines what auton to run. I also send the dashboard an array of auton files we have on the robot to be displayed.

Here is the problem I am having:
The dashboard works perfectly fine although, I can't seem to pull the boolean array in disable.vi from the smartdashboard. I have pictures attached of what my code looks like. Could someone please help me so that I can pull the results from a control in a dashboard project into code on the cRio? Thanks!
Attached Thumbnails
Click image for larger version

Name:	DashboardBlockDiagram.jpg
Views:	80
Size:	169.4 KB
ID:	13759  Click image for larger version

Name:	DashboardFrontPanel.jpg
Views:	52
Size:	121.6 KB
ID:	13760  Click image for larger version

Name:	DisabledBlockDiagram.jpg
Views:	46
Size:	6.3 KB
ID:	13761  
__________________
Michael Ray
Team RUSH 27

Driving Record: 93-64-0 Best Finish: Finalist (x4 FiM Districts)
Coaching Record: 16-7-0 Best Finish: Winner (Kettering Invitationa)l

Reply With Quote
  #2   Spotlight this post!  
Unread 02-02-2013, 14:33
stingray27's Avatar
stingray27 stingray27 is offline
Registered User
AKA: Michael Ray
FRC #0027 (Team RUSH)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Clarkston, MI
Posts: 209
stingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to all
Re: Dashboard in LabVIEW

Just as more clarification for my problem, I attached the screenshot of what I am getting. The AutonSelector Boolean Array in the smartDashboard region on the dashboard is giving False, True. Yet in the code, it gets absolutely nothing. The refresh button works though... Any suggestions?
Attached Thumbnails
Click image for larger version

Name:	Error.jpg
Views:	35
Size:	177.5 KB
ID:	13763  
__________________
Michael Ray
Team RUSH 27

Driving Record: 93-64-0 Best Finish: Finalist (x4 FiM Districts)
Coaching Record: 16-7-0 Best Finish: Winner (Kettering Invitationa)l

Reply With Quote
  #3   Spotlight this post!  
Unread 02-02-2013, 15:23
bvisness's Avatar
bvisness bvisness is offline
Programming Mentor, Former Driver
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Woodbury, MN
Posts: 181
bvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of light
Re: Dashboard in LabVIEW

We ran into similar issues, but the problem is probably this: programmatic updates to controls and indicators do not update SD blocks on the cRIO. For example, manually pressing a button will send a value to the robot, but updating a button via a block of code will not.

To fix it, just make sure to also write to an SD Write Boolean Array block when you write to your control or indicator. I've attached an example from our dashboard code showing how we send vision info to the robot.
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	45
Size:	3.4 KB
ID:	13764  
Reply With Quote
  #4   Spotlight this post!  
Unread 02-02-2013, 15:28
stingray27's Avatar
stingray27 stingray27 is offline
Registered User
AKA: Michael Ray
FRC #0027 (Team RUSH)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Clarkston, MI
Posts: 209
stingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to all
Re: Dashboard in LabVIEW

Quote:
Originally Posted by bvisness View Post
We ran into similar issues, but the problem is probably this: programmatic updates to controls and indicators do not update SD blocks on the cRIO. For example, manually pressing a button will send a value to the robot, but updating a button via a block of code will not.

To fix it, just make sure to also write to an SD Write Boolean Array block when you write to your control or indicator. I've attached an example from our dashboard code showing how we send vision info to the robot.
Where was this located in the dashboard project? Was it in a loop or seperate?
__________________
Michael Ray
Team RUSH 27

Driving Record: 93-64-0 Best Finish: Finalist (x4 FiM Districts)
Coaching Record: 16-7-0 Best Finish: Winner (Kettering Invitationa)l

Reply With Quote
  #5   Spotlight this post!  
Unread 02-02-2013, 15:39
bvisness's Avatar
bvisness bvisness is offline
Programming Mentor, Former Driver
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Woodbury, MN
Posts: 181
bvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of light
Re: Dashboard in LabVIEW

This was in a loop; loop 2 of the default dashboard code, to be specific. It wouldn't necessarily have to be in a loop in your case, but you just need to make sure that every time you write to the indicator or control, you write to the SD variable as well.
Reply With Quote
  #6   Spotlight this post!  
Unread 02-02-2013, 15:51
stingray27's Avatar
stingray27 stingray27 is offline
Registered User
AKA: Michael Ray
FRC #0027 (Team RUSH)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Clarkston, MI
Posts: 209
stingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to all
Re: Dashboard in LabVIEW

Nothing was changed by sending it to an SD Write Boolean Array.vi. I tried putting it in a loop and keeping it outside of a loop.

Sending info to the dashboard works - I can read a string array. The problem still arises when I am sending the data to the cRio. The weird thing is one of my buttons works while everything else fails...
__________________
Michael Ray
Team RUSH 27

Driving Record: 93-64-0 Best Finish: Finalist (x4 FiM Districts)
Coaching Record: 16-7-0 Best Finish: Winner (Kettering Invitationa)l

Reply With Quote
  #7   Spotlight this post!  
Unread 02-02-2013, 15:56
bvisness's Avatar
bvisness bvisness is offline
Programming Mentor, Former Driver
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Woodbury, MN
Posts: 181
bvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of light
Re: Dashboard in LabVIEW

Could you attach your Dashboard Main.vi so I can take a look at it? I'm not quite sure how you have the code set up.
Reply With Quote
  #8   Spotlight this post!  
Unread 02-02-2013, 17:03
stingray27's Avatar
stingray27 stingray27 is offline
Registered User
AKA: Michael Ray
FRC #0027 (Team RUSH)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Clarkston, MI
Posts: 209
stingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to all
Re: Dashboard in LabVIEW

DashboardMain.vi attached
Attached Files
File Type: vi Dashboard Main.vi (199.6 KB, 19 views)
__________________
Michael Ray
Team RUSH 27

Driving Record: 93-64-0 Best Finish: Finalist (x4 FiM Districts)
Coaching Record: 16-7-0 Best Finish: Winner (Kettering Invitationa)l

Reply With Quote
  #9   Spotlight this post!  
Unread 02-02-2013, 17:39
bvisness's Avatar
bvisness bvisness is offline
Programming Mentor, Former Driver
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Woodbury, MN
Posts: 181
bvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of light
Re: Dashboard in LabVIEW

Aha - I think you do need to put that in a loop. I can't test your code due to missing VI's, but I think moving the variable write inside your main loop should fix the issue.

I think what was happening is that the variable write would only happen once, but then would never run again. Changing the control does not inherently trigger the variable write, so you need to make sure that it continually writes to the variable.
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	34
Size:	25.5 KB
ID:	13772  
Reply With Quote
  #10   Spotlight this post!  
Unread 04-02-2013, 20:45
stingray27's Avatar
stingray27 stingray27 is offline
Registered User
AKA: Michael Ray
FRC #0027 (Team RUSH)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Clarkston, MI
Posts: 209
stingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to all
Re: Dashboard in LabVIEW

Thanks for the reply. I had tried doing that before, and as I did what you suggested, still doesn't work. Although, we have found something interesting that other teams may want to investigate on...

Regardless of where we put a control in the loop or outside of the loop, it still shows up inside the SmartDashboard. Any data type will work like that. HOWEVER, we found that the Boolean Array and Boolean controls have some issues. We can get the numeric, value, string array, string and numeric array SD Write and SD Read.vis to work, yet somehow we have issues with the boolean write and read related datatype. After much evaluation and time looking through this, we believe it to be some issue with the SD Write/Read blocks themselves (just for boolean associated data type). To get around this, we are just going to convert booleans to numeric (Dashboard side) and then via the robot code, convert back into boolean.

If anyone else has this problem or suggests a fix, please post! Thanks for your help!
__________________
Michael Ray
Team RUSH 27

Driving Record: 93-64-0 Best Finish: Finalist (x4 FiM Districts)
Coaching Record: 16-7-0 Best Finish: Winner (Kettering Invitationa)l

Reply With Quote
  #11   Spotlight this post!  
Unread 04-02-2013, 22:51
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Dashboard in LabVIEW

A simple attempt to send a SmartDashboard boolean from the Dashboard to the robot didn't work for us. Rather than dig deeply into the code to see what might or might not work, I tried a simple hack that ended up working fine.

Make the boolean an indicator rather than a control. Right-click on it in the block diagram and choose Create >> Property Node >> Value (Signaling). Wire up whatever value you want to send to that property node. That'll let you change the indicator value.
Reply With Quote
  #12   Spotlight this post!  
Unread 05-02-2013, 07:16
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: Dashboard in LabVIEW

Do the checkboxes in the default dashboard and robot code not work? Do you have more specifics at to what Boolean, which side was reading, which was writing?

Greg McKaskle
Reply With Quote
  #13   Spotlight this post!  
Unread 05-02-2013, 08:06
stingray27's Avatar
stingray27 stingray27 is offline
Registered User
AKA: Michael Ray
FRC #0027 (Team RUSH)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Clarkston, MI
Posts: 209
stingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to all
Re: Dashboard in LabVIEW

Quote:
Originally Posted by Greg McKaskle View Post
Do the checkboxes in the default dashboard and robot code not work? Do you have more specifics at to what Boolean, which side was reading, which was writing?

Greg McKaskle
I do not know if the checkboxes work because I removed them right off the bat but the sliders work. And the driver station side is the side that works correctly, regardless of the control. It is the robot code side that is failing to pull the data
__________________
Michael Ray
Team RUSH 27

Driving Record: 93-64-0 Best Finish: Finalist (x4 FiM Districts)
Coaching Record: 16-7-0 Best Finish: Winner (Kettering Invitationa)l

Reply With Quote
  #14   Spotlight this post!  
Unread 05-02-2013, 08:20
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Dashboard in LabVIEW

Checkboxes (i.e. controls) work fine to send information to the robot by clicking on them manually. Indicators work fine to receive information from the robot.

We were reading the keyboard in the Dashboard program and sending a status flag back to the robot. Our tests had the desired keypress controlling a boolean indicator on the front panel, but the robot wasn't reading it. I suppose we should have used a simple Smart Dashboard write function, but we were in the mindset of using unconnected controls and didn't think it through.
Reply With Quote
  #15   Spotlight this post!  
Unread 05-02-2013, 08:30
stingray27's Avatar
stingray27 stingray27 is offline
Registered User
AKA: Michael Ray
FRC #0027 (Team RUSH)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Clarkston, MI
Posts: 209
stingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to allstingray27 is a name known to all
Re: Dashboard in LabVIEW

Quote:
Originally Posted by Alan Anderson View Post
Checkboxes (i.e. controls) work fine to send information to the robot by clicking on them manually. Indicators work fine to receive information from the robot.

We were reading the keyboard in the Dashboard program and sending a status flag back to the robot. Our tests had the desired keypress controlling a boolean indicator on the front panel, but the robot wasn't reading it. I suppose we should have used a simple Smart Dashboard write function, but we were in the mindset of using unconnected controls and didn't think it through.
Even if you did use a SD write function I am unsure if it would work... we tried the function and STILL had issues
__________________
Michael Ray
Team RUSH 27

Driving Record: 93-64-0 Best Finish: Finalist (x4 FiM Districts)
Coaching Record: 16-7-0 Best Finish: Winner (Kettering Invitationa)l

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 23:00.

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