05-28-2015 03:14 PM - edited 05-28-2015 03:15 PM
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.
Solved! Go to Solution.
05-28-2015 03:24 PM
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.
05-29-2015 09:50 AM
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.
05-29-2015 11:58 AM
Do you get all data at once or do you want to update the display whenever a new grid point has been measured?
05-29-2015 12:27 PM
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
05-29-2015 12:41 PM
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.
05-29-2015 02:47 PM - edited 05-29-2015 02:47 PM
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.
05-31-2015 07:40 PM
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
05-31-2015 09:24 PM
(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.
06-01-2015 06:41 AM
Here is the attached VI. Thanks.