LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem displaying sensor values on front panel

Hi,

 

I'm new to LabVIEW and I'm having trouble with some of the examples given. In all the examples I've tried I can't get the sensor data to display on the front panel. It runs fine and the sensor values show up on the NXT brick, but not on the front panel. The example with graphing sensor values from the light sensor does work so I'm not sure what the problem is. I'm running LabVIew 2009 with the latest update of the NXT add on.

 

Thanks!

0 Kudos
Message 1 of 8
(7,685 Views)

oswong,

 

First are you selecting Run or Debug.  If you've been selecting Run try Debug.

 

Also, try  placing a "Specify NXT.vi" at the start of the code and connect it to your Reset Timer.vi.

 

Let me know if this helps.

Justin Parker
National Instruments
Product Support Engineer
0 Kudos
Message 2 of 8
(7,668 Views)

Hi Justin,

 

I just tried running it in debug mode and it worked.

 

Thanks!

0 Kudos
Message 3 of 8
(7,666 Views)

Hello everyone, 

 

I've got the same problem. The debug mode works fine, but I've still in mind some doubts about this topic.

First, with a Main Application Instance of the VI, I can read sensor values (I'm using the rotation sensor) but it don't stop when it reaches a certain rotation value, the comparison doesn't work.

Second, with a NXT[USB] instance of the VI, the comparison works but no sensor's value is displayed in the front panel (the robot moves a certain distance). Why it's only working with debug mode, with this VI instance?

 

Is there any way to solve this problem?

 

Thanks!

Francisco José Gómez López
Software Engineer
0 Kudos
Message 4 of 8
(7,599 Views)

Hi fran_jo,

 

The behavior you are seeing with a NXT[USB] instance is expected. You will not see sensor updates unless you are in Debug mode. As far as the robot not stopping after a specified distance, that is interesting. Which sensor are you reading from to make this decision? What are you comparing to? How are you making this comparison?

 

Aaron P

National Instruments

Applications Engineer

http://www.ni.com/support 

0 Kudos
Message 5 of 8
(7,575 Views)

Hi Peñata,

 

I use Reset Rotation, Motor on and Read Rotation from NXT Robotics>NXT I/O>Complete>. For the comparison I use the Programming>Comparison>Greater or Equal? instead of the Equal? one, because this didn't work. I compare the value from the Read Rotation.vi with a value from a numeric control.

 

With the Main Application instance it works fine, using a Specify NXT.vi, from NXT Robotics>NXT I/O>Advance 

 

Thanks.

 

Francesc Gómez

Sofware Engineer 

Francisco José Gómez López
Software Engineer
0 Kudos
Message 6 of 8
(7,570 Views)

Hi Francesc,

 

The way you are doing it now (greater than or equal) is the preferred way.  This forum thread explains why it is not a bug (please ignore the arguing that is going on an enjoy the solid content).

 

The fact that it happens to  work in one case is more of a fluke than expected behavior.

Justin Parker
National Instruments
Product Support Engineer
0 Kudos
Message 7 of 8
(7,546 Views)

Hi again, 

 

Thanks for the answer. With this behaviour in mind would be more easy to going on with the programming.

 

 

Francisco José Gómez López
Software Engineer
0 Kudos
Message 8 of 8
(7,542 Views)