LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview or Labveiw NXG still same limits or ?

Solved!
Go to solution

Hello everyone

i have a problem with changing the value of multiple controls in the same time

as we can see in the pictures ,one from labview and i installed labview nxg today because i thought it will have a better funcions

i want to change the values of multiple controls in the same time ,using  proprety change in block diagram will not solve the problem because :

i would like to change the color of multiple color boxes randomly and this is not a solution and will consume a lot of time.

these boxes will represent pixels from image so can you imagine this editing each one alone

please help me how to do this or suggest for me a software that can edit multiple pixels 

usualy i use Labview with visa for building drivers or controling Hardware but i thought labview could help me in this also !

thanks a lot

Download All
0 Kudos
Message 1 of 15
(1,846 Views)

I'm not familiar with NXG do know whether it is able to do what you want it to do you yet.  But I'm sure you can do it in LabVIEW.

 

Why do you think you can't do what you want with property nodes?  Why would it take a lot of time?

 

Why don't you attach an actual VI with the code you want to try to execute rather than a couple of front panel screenshots, then we have a chance to guide you on how to make it work.

0 Kudos
Message 2 of 15
(1,833 Views)

This is the main VI as you asked..

suppose that i want to change the first row to gray and the middel second row to red , the quarter right of the boxes to green so weiter ...

after that i would like to change another pixels to another colors with different combinatoins...

so every time i have to change a huge amount of code or do you have any solution ?

0 Kudos
Message 3 of 15
(1,824 Views)

(I typically ignore code that has stacks and stacks of mutliframe stacked sequences but I make a rare exception here)

 

What you doing is insane! All you need is a 2D array of color boxes and the code will reduce to the size of a postage stamp!

0 Kudos
Message 4 of 15
(1,820 Views)

regradless of the way that the code has been written.. how do i change the proprety of the color?

anyway thanks for the reply

0 Kudos
Message 5 of 15
(1,810 Views)

The value of a colorbox is the color! All you need is a 2D U32 array colorbox indicator where you replace rows, columns, or elements with new values (=colors). Currently, your colors are scalar controls and I don't know why you only extract the red component.

 

In any case, make the colorbox array an indicator, initialize a 2D U32 array of the correct size in a shift register and use an event structure to manipulate the values using "replace array subset". Wire the colorbox array indicator to the wire.

 

(Of course I would use flat colorboxes from the classic palette, not shown).

 

Here's you current code using an array. I was not exaggerating with "postage stamp"!

 

ColorBoxArray.png

 

If there are not too many colors (<256), you might even use an intensity graph as display.

 

 

 

0 Kudos
Message 6 of 15
(1,806 Views)

Here's very simple example how you can replace rows and/or columns with different colors. To make the change persistent, keep the array in a shift register (not shown).

(using a flat colorbox for better cosmetics)

 

 ColorArray.png

0 Kudos
Message 7 of 15
(1,785 Views)

thank you very much for help and hints i made edit to change what i need from rows to columns numbers but i can't retain the value because of the control rechange it again please use the lamp to see how it works correctly .. how to get around this.

0 Kudos
Message 8 of 15
(1,782 Views)
Solution
Accepted by topic author MAJDGH

(Please use a new name when attaching a new and different VI. Re-using the same file name causes confusion and if subVIs are involved, can lead to incorrect dependencies if an old subVI with the same name already exists. The new one will be renamed by the browser to "subVI(1).vi" and the old one called instead).

 

Anyway, shift registers are your friend and a core skill in LabVIEW. Learn all about them!

 

(Of course you could use initialize the differently colored subset and use "replace array subset" instead. No loops (or shift registers) needed. Not shown)

Message 9 of 15
(1,779 Views)
Solution
Accepted by topic author MAJDGH

@altenbach wrote:

 

(Of course you could use initialize the differently colored subset and use "replace array subset" instead. No loops (or shift registers) needed. Not shown)


Here's how that could look like. same result, arguably simpler! 😄

 

ColorArray2.png

Message 10 of 15
(1,774 Views)