08-18-2015 12:21 PM
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?
Solved! Go to Solution.
08-18-2015 12:23 PM - edited 08-18-2015 12:24 PM
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.
-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)
Learn NI Training Resource Videos
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> ---'
08-18-2015 12:33 PM - edited 08-18-2015 12:35 PM
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.
08-18-2015 12:42 PM
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> ---'
08-18-2015 12:54 PM
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?
08-18-2015 01:07 PM
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> ---'
08-18-2015 01:22 PM
I was thinking about using the mouse movements to drag the 2D picture to the LED to turn it on
08-18-2015 01:31 PM
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> ---'
08-18-2015 01:34 PM
@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.