Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
1 ratings:
 5 out of 5     Rate this Document

Why Can't I Connect to my NXT via Bluetooth Using my LabVIEW .exe

Primary Software: LabVIEW Development Systems>>LabVIEW Professional Development System
Primary Software Version: 8.5.1
Primary Software Fixed Version: 8.5.1
Secondary Software: N/A

Problem:
I am using the NXT toolkit with LabVIEW, and within my project, I am able to communicate to my NXT using Bluetooth. If I update any controls within my LabVIEW VI, they are executed down on the NXT. When I build this VI in to an executable, why does it no longer have communication to the NXT?

Solution:
The issue is that the version of findNXT.vi distributed with the NXT Toolkit includes some additional logic to ensure that Bluetooth is available on your system, and an important piece of that logic doesn't get built into your executable by default.  To resolve the problem, you need to add a VI to the list of VIs that are called dynamically in your built executable. 

The path for the VI in question is:
 \vi.lib\addons\NXTToolkit\shared\NXTToolkit.BluetoothLibraryReferences.vi

From this point on, these instructions are LabVIEW 8.x specific; if you're using LabVIEW 7.1, look for similar options when creating your Build Specification.
  1. Add NXTToolkit.BluetoothLibraryReferences.vi to your project. 
  2. Double-Click your Build Specification and select the Source Files category on the left. 
  3. Select  NXTToolkit.BluetoothLibraryReferences.vi.
  4. Add it to the list of Dynamic VIs and Support Files using the blue arrow
With this added logic, your executable should now have Bluetooth functionality, but it is important to remember that any computer using this .exe will still need the NXT Driver installed.




Related Links:
LabVIEW Fans of LEGO Discussion Forum


Attachments:





Report Date: 11/03/2008
Last Updated: 11/05/2008
Document ID: 4R2EG8S0

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit