LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I set the graph on the panel as buttons?

Solved!
Go to solution

Hi all,

 

I'm trying to control a camera by sending DO control signals and acquiring AI signals. After I grab a whole image, and show it on the screen, I want to set it as 2D array of bool controls. So that I can click certain pixels, to send next controlling signals which stand for the addresses. I also want to zoom in and zoom out functions, by which I can see the pixels (buttons) clearly. Can I implement that in LabVIEW? If I build a 2D array of buttons, I cannot get rid of the spaces between the buttons. I'm using LabVIEW 8.5. Any suggestion will be appreciated.

 

Best wishes,

Bo

------------------------
My blog Let's LabVIEW.
0 Kudos
Message 1 of 14
(3,571 Views)
Solution
Accepted by topic author foolooo

I'm not clear on what the 2D array of booleans has to do with a picture.

 

If you have a picture and where you click on the picture means something.  You could use a picture control.  Use a mouse down event on that picture.  Use the mouse coordinates to determine where the picture got clicked.

Message 2 of 14
(3,562 Views)

Hi,

 

My issue is I want to output different addresses which stand for different pixels (but not all of them). So if user just click the pixels, the program will generate correspoding addresses. In another word, I want to display the image I acquired, and then click the image to tell which parts should be updated. The addresses can be converted easily from 2D array of booleans (I have done that part), so I think it may be easier to deal with picture and buttons. Thank you for your reply.

 

Regards,

Bo

------------------------
My blog Let's LabVIEW.
0 Kudos
Message 3 of 14
(3,534 Views)
Help please.Robot Happy
------------------------
My blog Let's LabVIEW.
0 Kudos
Message 4 of 14
(3,516 Views)

Hi Ravens Fan,

 

Yes, I think what you suggested makes sense. I'll try that. Thank you.

 

Best wishes,

Bo

------------------------
My blog Let's LabVIEW.
0 Kudos
Message 5 of 14
(3,512 Views)
Sorry, I think there are still some problems. When I click the pixels of the picture, I want 2 functions: 1. User can zoom in and zoom out to press the pixels more accurately, 2. The pixels pressed are different from others (in both zoom in and zoom out states), so that we're sure that the pixels are pressed. Can any one give some suggestions? Thanks a lot!
------------------------
My blog Let's LabVIEW.
0 Kudos
Message 6 of 14
(3,503 Views)

Hi foolooo,

what have you done so far? Why do you need an array of buttons? You can click into your image and read the mouse position to know where you are in the image. It´s the same as using a boolean control.

 

Mike

0 Kudos
Message 7 of 14
(3,498 Views)

Hi Mike,

 

Thank you for your reply. The things I've done is using a 2D array of 64x64 booleans on the front panel to send the addresses, and display the 64x64 pixels image after acquired. What I want is simply clicking the image instead of the buttons. My image is an intensity graph, so I can have X,Y and Z values to display 2D array. I dont konw if a picture control can display a 2D array. Besides that, I also want to make the pixels different after I click them, so that I can confirm which pixels are pressed. A simpler way came to my mind is use 2D array of booleans to do that, change the color of them by the acquired value. So the array will by a picture. But the spaces between the booleans are on the way. So is there any way:

1. Use 2D booleans, and update the color of each button after required, and get rid of the spaces between the buttons. Since the buttons should be 1x1 or 2x2 pixes big, I want to find a way to zoom in them.

2. Or, monitor the coordinates of the mouse, and use a proper graph to display, which can be zoomed in and zoomed out, and become different when pressed.

 

Thank you very much.

 

Best wishes,

Bo

------------------------
My blog Let's LabVIEW.
0 Kudos
Message 8 of 14
(3,494 Views)

Hi Bo,

i still don´t understand why you need the buttons. Use an event structure with the mouse move event to get the current mouse location. To send your command you can use the mouse up event. There you can use the coordinates from mouse move which you can store in shift registers. If you do this, then you have no problem with space between the buttons.

 

Mike

0 Kudos
Message 9 of 14
(3,492 Views)

Hi Mike,

 

 Sorry about me expression. So let's say we use the event structure to monitor the mouse, but is it possible that after I pressed certain pixels of the image, the pressed pixels turn different? I need to highlight these pixels. Which kind of graph shall I use, to display a 2D array and is able to zoom in and zoom out? Thank you.

 

Regards,

Bo

Message Edited by foolooo on 11-12-2008 09:44 AM
------------------------
My blog Let's LabVIEW.
0 Kudos
Message 10 of 14
(3,487 Views)