# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Re: Question: How to make a radar simulation on XY Graph?

Hi,

Go from a value higher than 59 (< 60), say from 100 to 10, the "dot" should flash (show up) once.
Then you must once again go over 100 to do the same again.

The reason for this is when the "sensor" detects an object within the range, less than 60, a "dot" should appear.
(The measured values is normally around 100 when its not detecting anything).

________________________________________________
Message 41 of 52
(1,822 Views)

## Re: Question: How to make a radar simulation on XY Graph?

I would start by examining the differences between yours and LocalDSP's code, as his seems to be working correctly on my end.

Lindsey Nestor
Program Manager, Hardware Services
National Instruments
Message 42 of 52
(1,795 Views)

## Re: Question: How to make a radar simulation on XY Graph?

Hi,

Thanks For the initiation. I did my RTS (RADAR Tracking System) based  on your inputs.  However I  have  three things (or questions)  still to be done.  Can you help  me

1. What  will  happen when "i" reaches 2^32-1, which is odd and not divisible by 360? At 20  milli seconds  per degree,  how many hours it can run and what  will  happen next?
2. The vi display starts  from East  and circles  in anti-clock wise  direction.  How  to  change it  to Start  from North and circle clock wise
3. At 0,90,180,270 Degrees  show  distance as attached png picture

Can you help

Message 43 of 52
(1,693 Views)

## Re: Question: How to make a radar simulation on XY Graph?

Hi SarmaHari

1 - First of all the loop counter is a signed integer so its highest positive value is 2^31-1. It will then run for (2^31 - 1) / 50 seconds which is approx. 500 days. It will then simply stop counting and your radar will stop scanning (but the display will still decay until totally black). If 500 days isn't enough for you just create your own counter by incrementing for example a U64 by 1. The solar system will disappear before you reach 2^64-1

2 - The display starts from east because your counter starts at 0 = 0 degree. It then runs ccw because you are adding +1 (increasing your angle). Try to replace your loop counter 'i' with '90 - i' instead.

3 - Can you clarify what you mean? Don't you want the distance to be updated when it actually hits a target? But to achieve what you want use just divide your counter value by 90 and check when the reminder is zero.

Hope this helps.

Message 44 of 52
(1,670 Views)

## Re: Question: How to make a radar simulation on XY Graph?

Hi LocalDSP,

Thanks for the reply. I attach my files (saved for LV16).

Starting from North  and going clock  wise, did  not work as  expected. Starts  rotating from North  and  goes clockwise. However, Labels (Degrees) on the circle confuse. Radar Starts  at 90, goes  to 0 (Degrees), then to 270  and then to 180 and finally to  90. How to re-arrange labels?

I did  not understand relevance  of "feedback node".As  per comments, it is meant for displaying dot for some longer time (Next set of lines  should  not overwrite). I increased "in range" to  100. But I still see the same impact. If  I give  inputs (for display) as 65,10000 (Angle and distance) AND 66,10000  (next degree) both are being displayed one after one (that is,  65 Angle dot  disappears before 66 dot  presents)

Thanks

Sarma Hari

Message 45 of 52
(1,637 Views)

## Re: Question: How to make a radar simulation on XY Graph?

The four cardinal points on your polar plot are correctly labeled according to the definition of polar coordinates and there is no easy way to change this. The simplest you can do is probably to overlay your plot with free labels in the four locations.

If you want to control display decaying of your background and your dots independently the best is probably to work on two independent image arrays and combine these right before you display the result. The 'combination' can however be a little tricky since you can't simply add color values together so you'll have to work with masks and replace values (often done faster using AND and OR logic).

Message 46 of 52
(1,633 Views)

## Re: Question: How to make a radar simulation on XY Graph?

@SarmaHari wrote:

I did  not understand relevance  of "feedback node".As  per comments, it is meant for displaying dot for some longer time (Next set of lines  should  not overwrite).

Feedback like in the .vi attached.

But,

if you do it like this, and increase the point size to 50, this will happen:

Message 47 of 52
(1,603 Views)

## Re: Question: How to make a radar simulation on XY Graph?

Hi alexderjuengere ,

Thanks for the help. I too modified as attached  (saved for 16). Instead of (66,10000) and (66,15000) input (80,10000) and (80,15000). Keep rest as Default. Run and observe. Thanks everyone for your help.

Thanks

Sarma Hari

Message 48 of 52
(1,568 Views)

## Re: Question: How to make a radar simulation on XY Graph?

@LocalDSP wrote:

If you want to control display decaying of your background and your dots independently the best is probably to work on two independent image arrays and combine these right before you display the result.

I'd say that too, think in layers.

@LocalDSP wrote:

The 'combination' can however be a little tricky since you can't simply add color values together so you'll have to work with masks and replace values (often done faster using AND and OR logic).

A very lazy approach using an overlay of two independently created images could look like this:

attached with subvis, all converted to 2016

Message 49 of 52
(1,560 Views)

## Re: Question: How to make a radar simulation on XY Graph?

@SarmaHari wrote:

Hi alexderjuengere ,

Thanks for the help. I too modified as attached  (saved for 16). Instead of (66,10000) and (66,15000) input (80,10000) and (80,15000). Keep rest as Default. Run and observe. Thanks everyone for your help.

Thanks

Sarma Hari

I'd say this looks also pretty good (without green pixel decay)

Message 50 of 52
(1,542 Views)