LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Incrementing cluster values on a loop to draw lines on a .bmp

Hi,

 

I have a piece of code that I am using to:

 

1. create a bitmap file 100 x 100px,

2. open the bitmap file

3. draw a white rectangle the size of the image

4. draw a black line at a set height (Line Distance - y) - in this case 10.

 

What I would like it to do is to loop through for as many times it will fit in the image (e.g. 20, 30, 40, etc.) until it reaches the end of the image. I just cant see how to edit or increment the value in the cluster?

 

Also, is it possible to link the 'y' value on both 'Line Distance' and 'end point'? Is it possible to link the 'x' value on end point to the right side of the image? I was trying to bundle and unbundle with no success.

 

I've highlighted the section I believe should be looped but without being able to change the values I'm lost!

 

Regards,

 

Aidan

 

 

Download All
0 Kudos
Message 1 of 3
(2,342 Views)

Hi Aidan

Apologies in advance if  I have got the wrong end of the stick, but is this what you are after?

 

Change Cluster Values 2.png

Or using Bundle and Unbundle By Name

Change Cluster Values.png

 

Steve

0 Kudos
Message 2 of 3
(2,332 Views)

Hi Aidan,

 

Also, is it possible to link the 'y' value on both 'Line Distance' and 'end point'?

Yes.

 

Is it possible to link the 'x' value on end point to the right side of the image?

Yes.

 

I was trying to bundle and unbundle with no success.

What exactly have you tried?

 

I've highlighted the section I believe should be looped

Yes.

 

check.png

Added a loop using a shift register to store the image, added BundleByName to change point inputs for both draw functions…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 3
(2,329 Views)