LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What does this error mean?

Solved!
Go to solution

Hi

 

I have built my almost first and simple program that reads the NXT 2 color sensor value and present it on the brick display and also (when I use debug mode should be displayed on the PC.

 

Since the new NXT toolkit does no allow to set if to generate light , I used the case structure connected to a toggle switch control

 

See attached program screen shots

 

 

During Runtime i get the following error message :

 

Problem: Booleans with a latch mechanical action are not supported by the debugger.

 

Suggestions: - Change the boolean to have a switch mechanical action. Right-click the boolean and under Mechanical Action, select a switch mechanical action.

 

 

I do not understand this meaning nor did I find any mechanical action when i pressed tright-click on that icon?

 

Any idea?

 

Thanks 

 

Moshe 

Download All
0 Kudos
Message 1 of 16
(4,231 Views)

I don't have any real experience with NXT, but generally, boolean controls in LV can have one of several modes of operation when you click them. The error window tells you how can fix this - right click the boolean control (on the front panel) and select a different mechanical action.

 

This is a fairly basic concept in LV. It sounds to me like you should try looking at some of these tutorials.

 

Also, there's an NXT board here. I assume they might point to more tutorials.


___________________
Try to take over the world!
0 Kudos
Message 2 of 16
(4,185 Views)

Hello

 

I found the machine setting for the bolean and tried all avaliable options but neither worked, I did not use any latch option

 

Moshe

0 Kudos
Message 3 of 16
(4,176 Views)

Try right clicking on the stop button on the front panel, expand Mechanical Action and select Switch when Pressed. Please post back if that fixes the error.

Verne D. // Software R&D // National Instruments
Message 4 of 16
(4,125 Views)
Solution
Accepted by topic author Mepshtain

This error is most likely refering to the Stop button you have to stop your code.  Right click on the stop button on your front panel and go to "Mechanical Action->Switch when pressed" That should fix your issue.

National Instruments
Applications Engineer
0 Kudos
Message 5 of 16
(4,120 Views)

Thanks

 

The stop button indeed was not set Stop when pressed, I am not sure if it was setting it in a latch position or was it initially created that way. but anyhow the error gone now.

 

 

But, this leeds me to a second question : when i run the program in debug mode the program starts with the led on or off depending on the toggle switch position. but why is the switch not affecting the light during execution?

 

 

Moshe

0 Kudos
Message 6 of 16
(4,075 Views)

You should probably add a wait (ms) vi to your loop so as not to overtax the processor. This will lead to better responsiveness of the UI.

Verne D. // Software R&D // National Instruments
0 Kudos
Message 7 of 16
(4,046 Views)

Hello

 

Let me clear the question (see attached vi)

 

There are two similar Vi's. Both need to do the same function: measure light intensity and disply the value on the chart with an option to the user to switch (during debug run) the flood light on or off.

 

The first vi is working ok and the second is not Smiley Sad

 

The vi that is not working is using the new NXT color sensor sub vi (that has no input for light on/off) and therefore i used a case structure to check the control.

 

What am I missing here? is it the use of the case structure?

 

Thanks

 

Moshe

Download All
0 Kudos
Message 8 of 16
(4,025 Views)

Hello

 

Just found out that if I take the control icon out of the loop in the second vi everything is working OK (see atached vi)

 

How come that in the first program the control was working OK inside the loop but on the second (the one that uses case structure) I had to take the control out of the loop ?

 

Can anyone help

 

Moshe

0 Kudos
Message 9 of 16
(3,969 Views)

If you place the control outside of the loop it will read once then use that value for every iteration of the loop. If you put it in the loop it will read the current value after each iteration.

Verne D. // Software R&D // National Instruments
0 Kudos
Message 10 of 16
(3,945 Views)