06-07-2012 04:07 PM
If you don't care about the value, then a numeric control is probably the wrong choice, and you should be using a pair of booleans.
06-07-2012 04:15 PM
@AndyN wrote:
Goal->to check if the button is being pushed. Solution based on the value change - > fail due to value limit.
Then don't have an explicit limit for the button. Control it programmatically agains a preset limit. An example would be if the numeric limit is 10 (determined by you, not the control), as soon as 11 is reached, it resets the control back to 0. Would this not work?
06-07-2012 04:18 PM
Nathan. Numeric control gives me a ready to use control with two buttons and no latch.
This was my logic behind it:
Is the button depressed?
{Yes - zero tthe vale.}
ELSE - do nothing
{}
{Use the vale (only for direction) to spin the motor - positive, negative or stop (zero).}
In this sense I have a three state button with its defauls position at zero that does not latch and no cost on my side to develop it.
The only proglem I do not know how to check it for depresing.
06-07-2012 04:30 PM
@AndyN wrote:
Nathan. Numeric control gives me a ready to use control with two buttons and no latch.
Change the latching behavior on the booleans. If they're true, they're pushed. Easy. Right-click the boolean, find "Mechanical Action" and change to "Switch Until Released."
06-07-2012 04:31 PM
@AndyN wrote:
Nathan. Numeric control gives me a ready to use control with two buttons and no latch.
This was my logic behind it:
Is the button depressed?
{Yes - zero tthe vale.}
ELSE - do nothing
{}
{Use the vale (only for direction) to spin the motor - positive, negative or stop (zero).}
In this sense I have a three state button with its defauls position at zero that does not latch and no cost on my side to develop it.
The only proglem I do not know how to check it for depresing.
It seems you do not care about the increment or decrement presses, only that there is a press (you alluded to this earlier).
I'm with Nathan here. You are using the wrong control. A boolean would be a better fit with a Latch When Released action. Or you could use a toggle switch for directional control. You won't be able to check if the inc/dec arrows are pressed on a numeric control without testing the value. It seems you want a control to plop down on the fp with no effort what so ever on your part to make it work.
06-07-2012 04:32 PM
How about If I have an array of enums.
Each enum has 3 Booleans. Two without a latch and one default - is it possible?
If I stop pressing any of the button it goes to zero state on its own.
06-07-2012 04:41 PM
An enum boolean...no such thing. An enum is numeric. Do you mean a cluster of boolean arrays?
06-08-2012 06:05 AM - edited 06-08-2012 06:07 AM
Here's a rough approach to determining if the increment/decrement buttons are being pressed. I say rough because it's possible to click on the control, but off of the buttons and get the wrong answer.
06-08-2012 07:39 AM
Would a "Mouse Up" filter event help?
Ben
06-08-2012 08:40 AM - edited 06-08-2012 08:40 AM
Thank you all guys, you are by far better than NI technical support. I think I am going to have an array of clusters with two Booleans set to "Switch until released". What is weird this option has to be set in the cluster before put in the array-> array wont let to you change the mechanical action. With two cases of "Select" I will get the functionality.
Mo,
Enum Boolean... was a shortcut in description. In terms of variables it does not exist. In the terms of fp I had before an Enum with front panel changed to radio buttons and the buttons changed to LEDs...
The closest worry free solution I found was a radio button but that thing does not have an option of "Switch until released". Why? It allows for no selection...