04-28-2023 04:02 AM
Hi,
All are controlls, but when I want to change the value don't work.
04-28-2023 04:34 AM
@Petros_Baghalyan wrote:
Hi,
All are controlls, but when I want to change the value don't work.
The Moment you click on the control it hits the Mouse Enter Event and executes the Event with For Loop for Position change.
if you want that Cluster Control animation it can be included at the VI Execution starts.
04-28-2023 10:22 AM
Your problem is that when you enter the control you trigger an event that exits only after the moves and the 3 second wait, after that the control goes back to its original place.
You are locking you vi in the Mouse enter event.
Tak a look at this:
https://www.ni.com/docs/en-US/bundle/labview/page/lvhowto/caveatsrecmndtnsevnts.html
You should be using a state machine design for your example
04-30-2023 10:10 AM - edited 04-30-2023 10:13 AM
Your event is set to lock the panel until it completes and since the event only completes after it has disappeared again, you cannot interact with it. So change it as follows:
While this is obviously a bandaid fix, it will solve your minor problem. A bigger problem is your code architecture which is just bad. Do a proper state machine, don't have a timeout event to poll the stop button, use an event case instead., etc.
Maybe do a "mouse enter" event to move the control, and move it back again on "mouse leave", for example. Keep state in a shift register. Creating an array of 155 redundant error clusters just to determine the loop count of the second loop seems very Rube Goldberg'ish. Right?
04-30-2023 10:55 AM - edited 04-30-2023 11:00 AM
See if this can give you some ideas....
(Note that the runtime size and position is defined in the VI properties. It is easier to work on a larger front panel at edit time.)