LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Execute While Left Mouse Button is pressed

Solved!
Go to solution

Hello all.

 

I'm a super-newb at Labview, but not to programming (been doing that for years, C++ etc...)

 

I have a project that I'm trying to do that I hope that somebody can point me to some tutorials or something.

 

The idea is that I want to be able to press the left mouse button and a dial will start to spin.  It will then stop when I release the mouse button.  I intend to put an 'indiator' randomly around the dial where the user is to stop, but not until they start pressing the button.

 

Attached is my code so far.  Very basic to some experts like you guys, but... this is my first try at Labview.

 

Thanks.

 

Greg

0 Kudos
Message 1 of 11
(3,922 Views)

Here is one way to do it.  I didn't do anything with the boolean LEDs, except create an array of references for them.  I assume you will want them to flash as the dial goes around.  Use the reference array and the current value of the dial to do something with that. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 2 of 11
(3,884 Views)

Argh...

 

I tried to load your example and it says my version is older than your version and won't let me load the file.

 

I'm going to have to check to see if I can update this.

 

Greg

0 Kudos
Message 3 of 11
(3,842 Views)
Solution
Accepted by GregNoseworthy

Here is a 2011 version.  I haven't opened it to see if any functionality was lost.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 4 of 11
(3,835 Views)

You, my friend, are a steely eyed missile man!

 

Perfect for what I need to do.

 

My next step is to provide a 5 second count down before moving the gauge and to randomly iluminate one of those lights....  then we need to see how close to that light the operator can release the button.  I'll try to figure this one out myself.

 

However, I think something clicked with the cases... I hadn't noticed the little 'pull down' menu at the top.

 

Thanks again!!

 

Greg

0 Kudos
Message 5 of 11
(3,828 Views)

I'm curious how you managed to get the gauge to show zero at the top. When I place a gauge its default condition looks more like a spedometer with zero in the lower lefthand part. Is it a special control or did you have to change a setting?

0 Kudos
Message 6 of 11
(3,812 Views)

Grab the tick marks and rotate them.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 7 of 11
(3,808 Views)

Thank you. I didn't realize that functionality existed.

 

If I wanted to, say, make 24 and 0 occupy the same place, how would that be accomplished? Right now, there's a large gap between the two.

0 Kudos
Message 8 of 11
(3,806 Views)

Move it, same way you moved 0.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 9 of 11
(3,803 Views)

You can also specify the start and range programmatically in radians.  12 o'clock position is PI/2.  Range is 2PI.  This will put 0 and 10 at the 12 o'clock position.

Capture.PNG

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 10 of 11
(3,799 Views)