From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ultrasonic Phased Array Display - anyone done this in LabVIEW?

Here is actually the more correct version of what needs to be done to plot one line.  Maximum is actually the size of the array.  Each point is color-coded to scale to the magnitude at that particular location.  But again, this does not seem to work.

 

polar.png

0 Kudos
Message 11 of 30
(3,015 Views)

Christian posted code to draw arrows using a picture control. I have attached same.

 

If i follow what you want, you want a line from the origin toward some direction that varies in color along the line. If you are using 8 bits you only have 256 colors so an y vector over 256 will have some adjacent pooints plotted in the same color. That is where Christian arrow (minus the head) come into play.

 

Moving forward, you will repeat that for other vectors starting at a diferent location and it will be the over lap between the plots that will define what you are after (I hope I'm not in left field).

 

Over-lapping points in a picture control will replace the old color at that pixel so I think you loose the over-lap.

 

It seems that you would want to render each set seperately and then average the all of the resulting colors at each pixel.

 

Not claiming to know what you are thinking, just thinking out loud on a Friday afternoon.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 12 of 30
(3,003 Views)

I think you have it mostly right but we do not want arrows of any kind.  If you go back to my original post, I even show the compass plot without arrows.  Yes, say we have a signal with 1000 points (locations along the line).  Then we want to draw a line from 0 to 999, increment of 1, along a single direction, say 45 deg.  The signal for simplicity can be scaled to between 0 and 255 as I have done (this step is not really necessary but makes the code more straightforward because of 1 to 1 correspondence with a 256 value gray scale).  Then we have a corresponding gray scale with 256 gray values varying between 0 and 255.  The color plotted at any given point (location along the line) = the magnitude of the signal at that point (location) if we have scaled the signal to between 0 and 255.  This is for line #1. 

 

Then consider that we might have 20 lines between say 25 deg and 44 deg.  So we then do the identical procedure for the next line at the next deg increment, which is what you have understood correctly.  The rest of the plot might be color-coded with a background color (black or white or middle gray).

 

I think I/we have to dig deeper into the polar plot.vi and see if there is a way to modify it so that it can do this.  But out of the box, unless there is something obviously wrong with my code, it does not seem possible.

 

There is also might be some way to using polar functions to  do this type of thing directly using an intensity graph, given some clever programming that I have not had time yet to consider.

 

I just thought it logical to first start with LabVIEW native graphs that LOOKED somewhat similar to phased array displays.

 

Have a good weekend!

 

Don

 

 

ps. will take a look at your posted code this weekend.

Message Edited by DonRoth on 05-21-2010 04:24 PM
0 Kudos
Message 13 of 30
(2,990 Views)

I had to dig into the subVIs.  For the 'Plot Polar Data' subvi, I had to use 'Draw Point.vi' vi instead of 'Draw Multiple Lines.vi', and run thru a for loop in order to plot each point.  To illustrate what I did better, I used a color table rather than a gray table but I left in the gray table on the diagram so it is available.  The draw of 1500 points is actually fairly fast.

 

You made a good point, by the way, in an earlier post.  Some averaging will have to take place between multiple lines to generate the true phased array plot since the angular lines diverge away from each other.

 

The arrows draw you guys did was pretty cool.

 

Next steps then would be drawing multiple lines, averaging on the display to fill gaps between lines, and conversion to array data for intensity graph plotting.

 

 

Don

0 Kudos
Message 14 of 30
(2,949 Views)

DonRoth wrote:

I had to dig into the subVIs.  For the 'Plot Polar Data' subvi, I had to use 'Draw Point.vi' vi instead of 'Draw Multiple Lines.vi', and run thru a for loop in order to plot each point.  To illustrate what I did better, I used a color table rather than a gray table but I left in the gray table on the diagram so it is available.  The draw of 1500 points is actually fairly fast.

 

You made a good point, by the way, in an earlier post.  Some averaging will have to take place between multiple lines to generate the true phased array plot since the angular lines diverge away from each other.

 

The arrows draw you guys did was pretty cool.

 

Next steps then would be drawing multiple lines, averaging on the display to fill gaps between lines, and conversion to array data for intensity graph plotting.

 

 

Don


In the Picture thread there is a link to a thread with an example of fading between images. It just shows how to average the three color planes sepeartely then recombine them on a pixel by pixel basis but yout porbably knew that. Smiley Wink

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 15 of 30
(2,947 Views)

So I'm walking away from this question thinking "Yes that phased array image should look just like what I used to see on my search radar with the difference being that you will have multiple plots with the origins dispalced..." when it hit me.

 

THere is a "Radar Plot.VI" available under the Pictures pallette.

 

Did you try looking at that example?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 16 of 30
(2,943 Views)

Don,

 

I have done a display similar to an Ultrasound display, or weather radar type display. I tried quite hard with the vanilla LabView components, but could not find a way. I had to use the vision toolbox change pixel value vi. Basically when the vi started, it made a look up table to convert from polar to cartesian for each pixel, then referenced this table to change the pixel values in the image to ones corresponding to data stored in a 2D array (1 axis being the scanned angle, the other being the distance from origin). It runs fast enough to be real time on a basic dell with a whole lot of other stuff going on, and looks something like an ultrasound you'd see at a doctor's office.

 

Unfortunately I cannot share the code with you 😞

0 Kudos
Message 17 of 30
(2,924 Views)

At first glance, I don't think the radar plot will do what we want....

 

radar plot demo.png

0 Kudos
Message 18 of 30
(2,923 Views)

DonRoth wrote:

At first glance, I don't think the radar plot will do what we want....

 

radar plot demo.png


 

You know you are getting old when...

 

Hmmm right name wrong code.

 

Sorry about the wild-goos chase there.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 20 of 30
(2,909 Views)