06-23-2011 05:28 AM
Hello,
I have a color sorting machine controlled by an NXT Mindstorms brick. I believe that Labview has a module to communicate with the Lego brick, but I was wondering if the Vision Builder (which we are currently using for another application) could also communicate with the brick (we don't have Labview). Ultimately, after insecting the object with Vision Builder, I would like to send a variable (based on the inspection) to the NXT mailbox, preferably via usb, otherwise BT, that would serve as a motor command for the servo. If there is no such communication module, is there a code that I could insert into the Vision Builder program that would allow for such a communication?
Solved! Go to Solution.
06-23-2011 01:36 PM
Hi there,
As far as I know, Vision Builder will not be able to "target" the Lego Mindstorms brick.
The LabVIEW add-on for Lego Mindstorms can be found here: http://zone.ni.com/devzone/cda/tut/p/id/4435
I'm assuming you're planning on connecting your camera to a PC?
Although I just found a camera that can connect directly to the Lego brick here: http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=78
If your LabVIEW code is running on your PC, you should be able to use either vision builder or vision assistant and then have your brick "do something" based on the results. You'll have to choose your PC as the "target" for your code and you will need LabVIEW and the Mindstorms add-on to make this work.
06-23-2011 01:43 PM
After thinking about this a little more, there is a color sensor for the NXT. You probably won't be able to use Vision Builder for it. But it does plug directly into the brick and you should be able to use any of the many programing interfaces to use it.
06-24-2011 04:20 AM
Thanks for your reply Patrick!
Actually I need a high resolution camera and video processing capability, so yes I have a camera connected to my PC and was hoping to process the video with Vision Builder, which I have a license for. Unfortunately, I don't have Labview. If I downloaded a trial version of Labview, I believe I could create a custom VI that could be called from Vision Builder. The question is, would this VI still work once the trial period is over? It kind of doesn't make sense to buy Labview just for this one piece of functionality. Otherwise, I guess I would need to find another solution...
Thanks again for your suggestions.
Jonathan
06-27-2011 09:59 AM
VBAI is using the run-time engine of LabVIEW. So If I'm correct, you shouldn't need an active labVIEW just to use the step. You do need an active version of LabVIEW to build the actual VI.
I've tested locally and it runs with a deactivated LabVIEW installed.
06-29-2011 08:24 AM
Once you have a VI made, you don't even need LV installed to have VBAI use it in a Run LV step. VBAI doesn't need LV licensed or even installed to run LV VIs. If you need to make changes to the VI, then you need LV though.
Hope that helps,
Brad
07-03-2011 08:12 AM
Thanks Brad - that does help! Now all I need to do is figure out how to create that VI...
07-11-2011 10:17 AM
If you're doing stuff with the Run LV step, you should have LV installed on your development machine, but you won't need LV installed on your deployed systems to have VBAI successfully use that VI you created. We provided a way in VBAI 2010 to create LV UIs without LV and you can create simple LV block diagrams in the Calculator step without LV, but I don't think we'll ever have the full programming power of LV block diagram included with VBAI 😆
09-06-2012 03:20 PM
Ok, just in case anybody needs another solution to this, I was able to find a workaround (without the need to install LV). I am using a communication bridge that listens in for commands received over the TCP/IP protocol (available within the Vision Builder) and passes them onto the NXT brick (USB or BT). You can find more information about it on Anders' Mindstoms Page. If you have any problems with the software, feel free to reach out to the author - he's a great guy and amazing developer!