LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Move control to turn LED on

Solved!
Go to solution

Hi, I am fairly new to labview...How do i use a control to hover over an area to light a LED in that area?

0 Kudos
Message 1 of 9
(3,598 Views)

Not sure what you mean by "move control"? And are you talking about an LED control, or a physical LED? If it's an LED control, you can click it to change value. If it's an LED indicator, your can write a boolean to it to change its value. You should probably share the code you are working with using a snippet or by attaching the VI.

 

Here are some free training tools primarily focused on LabVIEW and NI hardware to help get started.

NI Learning Center

NI Getting Started

-Hardware Basics

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-DAQ Application Tutorials

-cRIO Developer's Guide

Learn NI Training Resource Videos

3 Hour LabVIEW Introduction

6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 9
(3,593 Views)

I am trying to get an object..preferrably a picture if possible to hover over an LED control to turn it on. Here is an implementation using mouse movements but i want to replace the mouse movement with an object.

 

Mouse movement.JPG

0 Kudos
Message 3 of 9
(3,573 Views)

How is this "object" moving? Or are you wanting to trigger the mouse movement event when the mouse moves over an object?

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 4 of 9
(3,559 Views)

Uhmm I am trying to use a 2D picture to hover over an LED control to turn it on... is it possible to do that?

0 Kudos
Message 5 of 9
(3,550 Views)

Right, but how does the 2D picture move around to hover over it? Is it's position being controlled by LabVIEW and that's how it's being moved? Do you have something in the picture that is hovering around?

 

In any case, if you know the location of the picture, or you know the location of the thing in the picture, you can use those coordinates to turn on the LED if the coordinates correspond with the LED.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 6 of 9
(3,522 Views)

I was thinking about using the mouse movements to drag the 2D picture to the LED to turn it on

0 Kudos
Message 7 of 9
(3,509 Views)
Solution
Accepted by topic author assaultjoe

Ah, yes, ok. So you'll need to do a little bit of fancy stuff here to move a control during run-time because it's not quite the same as the develpment environment.

Check out this example and use his VIs to move controls around.

 

Once you have a control moving around, you can pull it's coordinate information to find out if it's over your LED. Then you can write True or False to the LED.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 8 of 9
(3,487 Views)

@assaultjoe wrote:

I was thinking about using the mouse movements to drag the 2D picture to the LED to turn it on


Sounds like you want to use the Drag Enter event.  Likewise, you could use the Drag Leave event to turn it off.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 9
(3,480 Views)