LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

How to shorten the running time of NXT brick (TETRIX & MATRIX toolkit)

Solved!
Go to solution

Hi


How to shorten the running time of NXT brick ?

(TETRIX & MATRIX toolkit running time)

 

Software is LabVIEW 2012 for LEGO MINDSTORMS

Thanks.

 

 

 TETRIX.jpg

 

 

 

MATRIX.jpg

 

 

 

 

 

 

 

 

 

 

Download All
0 Kudos
Message 1 of 3
(5,695 Views)
Solution
Accepted by topic author 40123157

Hi 40123157,

 

You are using the module in an appropriate way, and there is no easy way to improve the loop iteration time beyond what you have done. Here are my suggestions:

 

1) i2c commands do take a long time. In your application, it may speed up if you only execute Move Motors only when the motor speed has changed.

2) For this particular example, you are not using the output of Motor Status. If this VI doesn't need to execute it may be removed.

3) If you must speed up execution beyond this, as an advanced user of LabVIEW, you can create a copy of the Move Motors VI and modify it as you choose. All you have to do for the 'DC Motors' input is use cluster to array on the cluster, as shown below. I think you can speed it up by executing all setup before the loop (set connection type and setup sensor), and removing calculate power value if you're only sending values between -100 and 100.  

4) Drawing to the screen may be slowing you down here.

suggestion.PNG

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

Hello garrett8357,

Thank  for your prompt reply.

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