LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

LABVIEW FOR LEGO MINDSTORMS

Solved!
Go to solution

Hallo I need help. Pls help me with control motors of NXT Robots with NXT Buttons. I need change power of motors with NXT Buttons. How I realize this function??

 

Thank you so much for your answer!

 

 

 

- In attachment is same program but in NXT-G

0 Kudos
Message 1 of 5
(6,123 Views)

Are you looking to do this in LabVIEW with the NXT module? If so, there is a VI called Read Brick Buttons found under NXT Robotics>>NXT I/O>>Complete>>Sensors. You can use this VI to poll the values of the buttons on the brick. 

 

Then, you can use a case structure to change the motor power value when the button is pressed and connect that to the Motor VI.

 

I've attached a VI with this basic implementation. Please let me know if this is what you are talking about.

Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(6,095 Views)

Yes, it is one of solve the problem. But when I need write value of power in the variable and then read this variable from another part of VI. How to it?

Thank you

0 Kudos
Message 3 of 5
(6,086 Views)
Solution
Accepted by topic author Noro

The prefered method is always to directly connect the wire to wherever else you may need to use it. However, if it is within a different loop, you could write it to a shared variable and read it in from the second loop. 

 

http://www.ni.com/white-paper/4679/en/

 

 

Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(6,083 Views)

Thank you so much, for your answer 🙂

0 Kudos
Message 5 of 5
(6,081 Views)