LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Detect user input and increase a counter ( Using event structure or etc)


wiebe@CARYA wrote:

Raja@Labview wrote:

User event I mean. I would like another event to run when user inserts a value into a numeric control.


Here's a quick one...

 

So the user presses a button, the event triggers a user event.


Here's the same VI, but with an option to turn the user events on or off.

 

Of course, there are easier ways to get the same result. But it seems to me you are just studying user events.

0 Kudos
Message 11 of 13
(240 Views)

wiebe@CARYA wrote:

wiebe@CARYA wrote:

Raja@Labview wrote:

User event I mean. I would like another event to run when user inserts a value into a numeric control.


So the user presses a button, the event triggers a user event.


... Of course, there are easier ways to get the same result


Exactly!

 

We still have the problem that "insert a value" is much more poorly defined compared to "presses a button".

 

Events are predominantly for user interactions and abusing them for programmatic sequencing required significant justification, something that does not exist in the original problem. If multiple things should occur in sequence after a given user action, one could queue up several states into a queued state machine for  example.

 


wiebe@CARYA wrote:
But it seems to me you are just studying user events.

It seems to me that the OP is relatively inexperienced and going down that rabbit hole is probably not useful at this state. It is always dangerous if somebody tells us how they wants to do something, instead of what needs to be done. The question "How do I boil some water for my tea" has a much simpler answer than "How do I boil some water using a nuclear reactor" and we shouldn't suggest that a pizza oven would be suitable too. 😀

0 Kudos
Message 12 of 13
(227 Views)

@altenbach wrote:

wiebe@CARYA wrote:

wiebe@CARYA wrote:

Raja@Labview wrote:

User event I mean. I would like another event to run when user inserts a value into a numeric control.


So the user presses a button, the event triggers a user event.


... Of course, there are easier ways to get the same result


Exactly!

 

We still have the problem that "insert a value" is much more poorly defined compared to "presses a button".

 

Events are predominantly for user interactions and abusing them for programmatic sequencing required significant justification, something that does not exist in the original problem. If multiple things should occur in sequence after a given user action, one could queue up several states into a queued state machine for  example.

 


wiebe@CARYA wrote:
But it seems to me you are just studying user events.

It seems to me that the OP is relatively inexperienced and going down that rabbit hole is probably not useful at this state. It is always dangerous if somebody tells us how they wants to do something, instead of what needs to be done. The question "How do I boil some water for my tea" has a much simpler answer than "How do I boil some water using a nuclear reactor" and we shouldn't suggest that a pizza oven would be suitable too. 😀


I'm not disagreeing, but what would be a good way to learn about user events without any normal events?

 

Learning new techniques without real life challenges can be hard... 

 

"insert a value" is very close to "enter a value" or "type a value". To me, there's no doubt that was the intention. But buttons demonstrated the user events better.

Message 13 of 13
(222 Views)