LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Toolkit for LEGO MINDSTORMS NXT bugs

James,

I tried several things on this, running 7.1.1f2 and 8.2 under XP SP2. I concentrated on "findNXT.vi" in the fantom driver interface. My top level VI looks like this:

 

Under 7.1.1f2 the resulting exe is able to find the NXT via BT within 15 seconds, whereas built under 8.2 the exe behaves as Miki describes it: within a few ms it returns without having touched BT (NI Spy shows nothing looking like accessing BT).

BUT: If I remove "findNXT.vi" (distributed in the toolkit) and instead of that use the version distributed by LEGO in fantomSDK1.0.2f0 (...\fantomSDK1.0.2f0\fantom\includes\labview\win32\findNXT.vi, directory mass compiled for 8.20), the resulting 8.20 .exe behaves like the exe built using LV7.1.1f2: it also finds the NXT within the same 15".

Regards

Ulf

Message Edited by UlfM on 12-18-2006 11:46 PM

Message 31 of 139
(17,965 Views)
Miki, Ulf, and others:

I think I've got the "Bluetooth not working in built executable" problem solved!  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:

<LabVIEW>\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.

First, add the VI above to your project.  Then, edit your Build Specification and select the Source Files category on the left.  Select the VI, then add it to the list of "Dynamic VIs and Support Files" using the blue arrow.  Now, that VI will get built into your executable, the extra logic will be there, and Bluetooth searches will work.

Thanks to Ulf for the debugging info and to Brady Duggan for his help in tracking this one down.
------
James Blair
NI R&D
Message 32 of 139
(17,915 Views)

Thank you, James (+ others)!

I checked it out for 7.1.1, 8.0.1 and 8.20 - works great and can be done easily!

Ulf

0 Kudos
Message 33 of 139
(17,903 Views)
Thank You! It works great now!

Best regards,

Miki

0 Kudos
Message 34 of 139
(17,893 Views)

I had a chance to play with NXT and it's quite cool.

After a short experiment with the Mindstorms software, I gave up and switched over to the toolkit, since it seems to give you a lot more control over execution of parallel tasks.

Anyway, I wrote my first piece of code as a state machine, implemented using a string array, which was how I ran into my bug - attempting to index an array element which does not exist in the array causes the program to crash with a "File Error!" message. This should of course be handled by the Index Array primitive, but a workaround is to write a wrapper which will check the index against the array size and return the default value if it's out of that range.

BTW, given my experience with the PDA module, I was surprised it took me as long as it did to actually find the bug. At first I thought my program was simply stopping after the first state for some reason. Only after looking at the display did I realize it was crashing. I should have known better. Smiley Very Happy


___________________
Try to take over the world!
Message 35 of 139
(17,757 Views)
Hello,
 
I have the same problem with LabView 8.2, German version like Daniel (reply 23):
 
"I'm using a German version of LabVIEW (8.20) too. And I have a problem in transferring NXT Toolkit code to the NXT brick. I've just written a little program for displaying a short text on the brick (see the picture). Then I started Tools\NXT Module\NXT Terminal but there's no program to choose for uploading it."
What make I wrong, gives at this moment a solution?
 
Regards
Manfred
 
0 Kudos
Message 36 of 139
(17,673 Views)


@mannitwo wrote:
Hello,
 
I have the same problem with LabView 8.2, German version like Daniel (reply 23):
 
"I'm using a German version of LabVIEW (8.20) too. And I have a problem in transferring NXT Toolkit code to the NXT brick. I've just written a little program for displaying a short text on the brick (see the picture). Then I started Tools\NXT Module\NXT Terminal but there's no program to choose for uploading it."
What make I wrong, gives at this moment a solution?
 
Regards
Manfred
 


Right

I was facing the same issue with another localized version of LV (French one). After installing the english version, all comes back into order. I believe this to linked with localized versions.

Regards,

Daindim

0 Kudos
Message 37 of 139
(17,664 Views)


Daindim wrote:

Right

I was facing the same issue with another localized version of LV (French one). After installing the english version, all comes back into order. I believe this to linked with localized versions.

Regards,

Daindim


 

Hello Daindim,

thanks for your answer, but I do not have the English version, I only have the German version.

I hope, that NI will bring out a patch in the near future, which will solve the problems.

Regards,

Manfred

0 Kudos
Message 38 of 139
(17,652 Views)
Hello to all: I have a small problem, I am creandome my own blocks with Labview but when compiling the error appears following error 1073807247 generates fantom if somebody knows like solving it agradeceria that it said to me like. A greeting.
0 Kudos
Message 39 of 139
(17,572 Views)
Hi Pau:

I looked up that error code using LabVIEW's Explain Error tool (Help -> Explain Error...), and it indicates that the size of a memory buffer is incorrect.  Fantom is very picky about user-specified buffers.  In most cases, you must pass it an empty buffer and a size of zero, or a valid buffer and the (non-zero) size of that buffer.

If you provide a little more information about which VIs you are calling, or what information you are trying to send / receive from the NXT, I can provide more details about what might be wrong.
------
James Blair
NI R&D
0 Kudos
Message 40 of 139
(17,552 Views)