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

The issue here stems from the fact that the Flatten/Unflatten from String primitives changed between LabVIEW 7.1 and 8.0 (and higher).
 
The Flatten/Unflatten palette items in the NXT Toolkit palette still reference the old 7.1 version of the primitives (which is why you get the "???" in the context help). Since the NXT Toolkit is a single set of files that has to work in 7.1, 8.0 and 8.2, the items in the palette reference 7.1 primitives. In LabVIEW 8.0 and higher, support for these old primitives have been depricated to the point where they no longer propogate the type that you wire in to the output of Unflatten. (Usually we would mutate the old 7.1 version of the primitive to the new one when you load the VI, but since the VI you're writing is already saved in 8.x and not 7.1, the mutation mechanism doesn't kick in).
 
The workaround is to use the new 8.x version of the Flatten/Unflatten primitives. They can be accessed from the regular palettes under Numeric>>Data Manipulation. Hope this helps.
 
Brady Duggan
National Instruments
Message 51 of 139
(16,056 Views)

One other weird NXT Toolkit palette issue with LabVIEW 8.x. If you grab the "Initialize Array" primitive from the Addons>>NXTToolkit>>Array palette, it will drop as an "Index Array" primitive instead. This has a similar workaround in that you can just drop the Initialize Array primitive from the standard Programming>>Array palette.

Brady Duggan
National Instruments

Message 52 of 139
(16,052 Views)
Aaah... that should do it.  Thanks for your help Brady!
0 Kudos
Message 53 of 139
(16,044 Views)
Thanks Brady

I am still using the 7.1.1 with the toolkit
Maybe something for the documentation
greetings from the Netherlands
0 Kudos
Message 54 of 139
(16,034 Views)
Hallo.

I would like to ask for some help. I am new to Labview and to NXT.
Although i construct a program to the Labview 8.0 ( Win XP) and it runs correctly, when i try to download it to my NXT, through the NXT Terminal,
the program is being compiled, downloaded but it is not running. I read the message "Error File" at the screen of my NXT.
I use the usb cable and the NXT is found from my PC.

I have the same results when i try to run the program that is being described at the getting started with LV Toolkit guide.

Excuse me if my question is too easy but i need to move on..

Thank you on advance.

0 Kudos
Message 55 of 139
(15,905 Views)
Hi Folks,
Apologies if this is documented elsewhere...

There appears to be a bug related to NXTComLSRead when reading multiple bytes - it's not clear whether the problem is in the firmware or in NXT-G (we're using the most recent firmware as of this date.)

I recently helped interface the NXT and NXT-G to an I2C device that returns 12 bytes during NXTComLSWrite.  The device repeatedly sent the same 12 bytes (as confirmed on a logic analyzer) but the byte's-ordering changed in NXTComLSRead.  We follow the Ultrasonic-sensor example - doing the Write, waiting for the 12 bytes to be ready, then reading.  The byte corruption happens in four-byte groups - that is, ony four of the 12 bytes are wrong - either the first 4, the middle four, or the last 4. 

The work-around was to follow "LowSpeed.GetStatus.vi" with three NXTComLSReads of 4 bytes each instead of one read of 12 bytes.  Reading 12 bytes just wouldn't work accurately/repeatedly.  Reading 8 then 4, or 4 then 8 didn't solve the problem.  It seems Reading 4 then 4 then 4 consistently allows us to retrieve the 12 bytes transferred during NXTComLSWrite.

Cheers!


"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 56 of 139
(15,800 Views)
I am a beginner in LabVIEW but very fluent in NXT-G.  When I wire the ultra sonic distance to a text box on the VI, the value is always 255.  I use the number to decimal string function in a loop.  What is the right way to do this?

Using Labview 7.1 Student
 
0 Kudos
Message 57 of 139
(15,619 Views)
I have been working with the Labview toolkit all summer and have not run into any problems.  Yet recently I have had many problems with bluetooth. 

I am working with twelve computers and four mindstorms education sets.  The computers can use bluetooth to connect with each other and the NXTs can use bluetooth to connect with each other.  The computers can even see the NXTs using bluetooth by itself.

When in labview I am able to use findnxt.vi just fine but when I use the createnxtobject.vi the VI returns an error (sorry I don't know the error because I can't even get that far now).  Now I can't even use the NXT terminal to connect to the NXTs using bluetooth.  When using direct connect the VI usually gets stuck on findnxt.vi or createnxtobject.vi and it will not abort until 60 seconds after I press the abort button.

The only think that could have changed since everything worked fine was Windows update.

Does anyone know what could be happening?

Thank you
Kyle
0 Kudos
Message 58 of 139
(15,606 Views)
As an update to the prroblem I have narrowed down the error even more.

Of the four NXTs one NXT was giving me problems.  Any time I tried to connect to that NXT with that computer it would then become unable to find any NXT through bluetooth.

I tried using another NXT with a different Computer and everything worked fine.  Then the NXT kept having internal computing errors, then the program kept having errors at createnxtobject.vi.  After restarting the NXT the FindNext.vi spits out the error -142017.  Possible Reason(s): Fantom: No more items found.  Now two of the four NXTs are unable to communicate with Labview and they also corrupt any computer they touch.

Anything would help,
Kyle
0 Kudos
Message 59 of 139
(15,575 Views)
Enathalion - I don't think any of your problems are related to Windows Update.  Although rare, I have seen Bluetooth on some NXTs get in a weird state that prevents them from playing well with other Bluetooth devices.  The only resolution I've found is to leave the suspect NXT alone for about a day, and then come back to it.  For any computers that have become "corrupted," the best thing to do is delete all of the Bluetooth pairings and recreate them.

The error you're seeing (-142017) doesn't sound very out of the ordinary; "no more items found" is a perfectly reasonable condition to end up in when you are searching for items.  What is the full path to the FindNext.vi that you are using?
------
James Blair
NI R&D
0 Kudos
Message 60 of 139
(15,571 Views)