LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

Inline C code and the LEGO NXT Toolkit

Hello!   We have an important question for you all!   We have a LEGO NXT robot programmed using the LabVIEW development system.   But the problem is we need it to be more responsive to its sensors.  We are trying to make it operate as fast as possible but still function in a reliable manner.

 

We see a lot of text about "Inline C Code" in the Help topics but so far, we have not been able to get a block of inline C code added to any of our VI's.   We are hoping we can use finely tuned C code to help with some of the time sensitive calculations to improve our robot's behaviour.

 

My question is simple:   Does the LEGO NXT Robot Toolkit allow "Inline C Code" to be used in the VI defination ?

 

I sure hope so!!!   And if so...  Can somebody provide the steps necessary to get get an "Inline C Code" block added to a VI ?

 

Thanks so much!!!

 

0 Kudos
Message 1 of 3
(5,833 Views)

No... unfortunately the NXT compiler does not allow use of inline C node. This is why you are unable to add it to your diagram.


If you post your VI we may be able to offer suggestions on possible speedups though.

 

 

0 Kudos
Message 2 of 3
(5,828 Views)

And just as a follow up so people interested in the topic know the facts...   An attempt was made to use the C like capabilities of the Formula Translation block to handle complex logic.   The documentation pretty much says it should be possible in an NXT environment, but as it turns out...  No Go!  

 

Probably the Inline C Code compiler is also used in the Formula Translation block and  it doesn't work either...

 

It's time to ask the Open Source crew to step in and fix things....

 

0 Kudos
Message 3 of 3
(5,807 Views)