|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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.
Last edited by Owen Makin : 25-01-2014 at 19:25. |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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.
|
|
#4
|
|||
|
|||
|
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 |
|
#5
|
|||
|
|||
|
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
|
|
#6
|
|||
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|