LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display colour data on a rectangular column

Solved!
Go to solution

Hi all,

 

 

I am currently using a RGB sensor to detect paint on perspex. The RGB sensor is mounted on a robotic arm and detection is carrying out a vertical motion using the robotic arm. Every motion covers a rectangular area 110mmx70mm. The value of red paint has been calibrated and is given out as a percentage. For example, no red paint is equivalent to 0%, pink is equivalent to 50% and completely red is equivalent to 100%. The value depends on the concentration of the red paint on the perspex. Each reading taken by the RGB sensor covers a rectangle of 10mmx10mm.

 

 

What I want to achieve in LabVIEW is to mimic the paint on a detected vertical section of the perspex in a similar rectangular box in the LabVIEW interface. I am able to send data serially using a Bluetooth module to LabVIEW, but I do not know how to go about in using this data to achieve my required goal. Can someone please guide me in carrying this out please? Any reference to LabVIEW examples will also be great.

 

Any help will be greatly appreciated. Thanks.

0 Kudos
Message 1 of 20
(3,485 Views)

Assuming the data covers a rectangular grid, easiest would be an intensity graph where the data is a 11x7 2D array of percentages. Set the Z scale from 0 to 100 and define a sutable color ramp.

Message 2 of 20
(3,478 Views)

Yes it is a rectangular grid. I will probably look into then.

 

I am not really great in LabVIEW, so can you please provide me with some examples that I can look into please? It will be really helpful. Thanks.

0 Kudos
Message 3 of 20
(3,438 Views)

Do you get all data at once or do you want to update the display whenever a new grid point has been measured?

0 Kudos
Message 4 of 20
(3,423 Views)

The grid will be updated once the data comes in. And as the RGB sensor data reading data column by column, data will be coming in at different times. So, the intensity graph will have to be updated when that happens

0 Kudos
Message 5 of 20
(3,418 Views)
Solution
Accepted by topic author navidahmeduom

Easiest would be to keep an initialized 2D array of the right size in shift registers and update values as they come in. Here's a quick example.

0 Kudos
Message 6 of 20
(3,411 Views)

Thanks mate. This is definitely something I was looking for. I just need to link it to the stream of serial data coming from RGB sensor now and hopefully that should work. Will let you know if I face any further problems in the future. Cheers.

0 Kudos
Message 7 of 20
(3,400 Views)

I am now currently able to read data from the RGB sensor and extract the necessary data onto the intensity graph. But the problem I am facing is that I cannot retain the data. I can only see one reading at a time on the graph. A new reading gets replaced by the current one. Ideally, I wanted to create the complete grid of data and retain all of it. What do I need to modify in order to achieve this? I have attached my VI so that you can understand what I am trying to achieve.

 

Any help will be greatly appreciated. Thanks.

 

https://www.dropbox.com/s/woktmvgq3o85ken/Serial_Test_Vald.vi?dl=0

0 Kudos
Message 8 of 20
(3,351 Views)

(Please attach the VI directly here. DropBox asks me to sign in so I cannot look at it.)

 

From what you are saying, it seems you simply forgot to add a shift register.

0 Kudos
Message 9 of 20
(3,334 Views)

Here is the attached VI. Thanks.

0 Kudos
Message 10 of 20
(3,295 Views)