Go to Post Real engineers don't need sleep... Just ask our bosses! - Mike Betts [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 25-01-2014, 18:43
Owen Makin Owen Makin is offline
Registered User
FRC #1972
 
Join Date: Jan 2013
Location: CUHS El Centro
Posts: 50
Owen Makin is an unknown quantity at this point
How to implement vision to crio

This is me and mentor's first year doing vision in Lab-view. After many hours of reading the guide on how to vision coding we have gotten to the last step, and are now lost. We have been able to modify the dashboard to show the distance a target is away. Though we are not sure how to keep it reading when the horizontal goal is introduced. We are stuck on how to send the code from the dashboard to the CRIO. Here are some pictures that show our code.
Attached Thumbnails
Click image for larger version

Name:	Untitled.jpg
Views:	24
Size:	434.3 KB
ID:	15951  Click image for larger version

Name:	Untitled2.jpg
Views:	28
Size:	155.5 KB
ID:	15952  Click image for larger version

Name:	Untitled3.jpg
Views:	26
Size:	44.1 KB
ID:	15953  

Last edited by Owen Makin : 25-01-2014 at 19:25.
Reply With Quote
  #2   Spotlight this post!  
Unread 25-01-2014, 21:17
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,751
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: How to implement vision to crio

You are getting pretty close. Next, you want to wire up the type that the string should be unflattened as. You can construct it carefully to match, or you can copy and paste from the dashboard. You may not need to cast the array to cluster either. Once on the global, you can share data via a global variable or other communication mechanisms.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 25-01-2014, 21:26
Owen Makin Owen Makin is offline
Registered User
FRC #1972
 
Join Date: Jan 2013
Location: CUHS El Centro
Posts: 50
Owen Makin is an unknown quantity at this point
Re: How to implement vision to crio

So how do you set it to a type? Sorry its our first time doing anything that's other than pretty basic. Does it matter that our crio code and dashboard code is located in two different folders? We tried to open a dashboard and crio project in the same folder but one will always delete the other.
Reply With Quote
  #4   Spotlight this post!  
Unread 25-01-2014, 21:38
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,751
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: How to implement vision to crio

I've been speaking with someone from your team, and the wizard misbehaves when both projects are built into the same directory. You can do it by hand once the folder is generated, but there is no reason you need to.

If you have both projects and VIs open and copy/paste, it should be fine. If you expect the type to change in the future, it would be better to define a typedef and have a shared file, but this is simpler and the type is unlikely to change.

The unflatten from string has an input on the top left called Type. If you wire up a Cluster of two numbers, that is what LV will try to cast it to. If the type doesn't use all the data, it will return an error and defaults for the type.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 25-01-2014, 22:20
Owen Makin Owen Makin is offline
Registered User
FRC #1972
 
Join Date: Jan 2013
Location: CUHS El Centro
Posts: 50
Owen Makin is an unknown quantity at this point
Re: How to implement vision to crio

What are we supposed to copy and paste and where? Where do find the cluster to wire that to the unflatten? Is the unflatten that we use on the project supposed to look like the one in the example finder? Here is a picture of what we have done, i dont think the type is correct though but i dont know what else to put there, or how to find what needs to go there. Yes i remember you helping our team figure out the PID loop but that was abandoned due to us being off-season
Attached Thumbnails
Click image for larger version

Name:	Untitled4.jpg
Views:	20
Size:	61.8 KB
ID:	15963  
Reply With Quote
  #6   Spotlight this post!  
Unread 26-01-2014, 08:35
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,751
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: How to implement vision to crio

On the dashboard, you take a collection of typed data -- numbers, Booleans, etc. and turn it into a string. On the robot code, you need to reverse that operation. You need to tell the unflatten what you put into the string. You also need to match not he endian-ness setting. I generally don't wire either of them. But if you wire it be sure it is the same on both sides.

You now have a Distances type wired to the correct terminal. Does it match what is on the dashboard in the vision processing loop? If those names match, and hovering over the wire shows the same info in the context help, you are probably good.

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 09:49.

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