LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to create an interactive rectangular grid in labview.

Solved!
Go to solution

Hello everyone I want to create a grid in labview in which If I click in any block it should change colour and say it changes from intially white to red, than blue. And I want to save the data representing the colour like 0, 1, 2 , 3 to an array. Can anybody help me, where should I start with?? Can you please direct me towards any example.

0 Kudos
Message 1 of 7
(5,368 Views)

Use an array of picture rings.

0 Kudos
Message 2 of 7
(5,364 Views)
Solution
Accepted by topic author GJAKLDFJG

Like this

Tim
GHSP
Message 3 of 7
(5,358 Views)

Thank you guys for your reply (Tim & altenbach ), I would like ask one question. How did you create Red and blue coloured color box without using any additional vi. Because whenever I try to create it I end up creating something else. I know this is silly and If I want to have it in different shapes than I shoud simply use make rectangle and other vi right ??Smiley WinkUntitled.jpg

0 Kudos
Message 4 of 7
(5,322 Views)

right-click the picture ring array terminal and select "create constant" You get a diagram constant of the array of picture rings. Now drag the element out of the array container to the diagram and you got yourself a diagram constant of the picture ring. Make as many copies you like using ctrl-drag.

0 Kudos
Message 5 of 7
(5,313 Views)

Ah sorry, the posted VI has an array of pictures instead on an array of picture rings as I suggested. Thus my reply does not apply directly.

 

I recommend a array of picture ring indicators, since there is only a small set of possibilities.

You coulds use code similar to the one shown in the link of this post:

 

A full featured 4x4 Tic Tac Toe Game

 

Alternatively, you could make the entire grid as one big picture.

0 Kudos
Message 6 of 7
(5,303 Views)

If it were me, I would get the color and numeric value in one place by using an intensity graph.

 

RectGridFP.PNG

 

Rectangle.png

 

Easy to change the grid size, number of colors you want as well as the colors themselves.

Message 7 of 7
(5,290 Views)