LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

limitting the bounds of a circular screen?

Use a property node with the Visible property set to False.
In the loop where you're setting the plane's position, compare the position to where you want the plane to disappear. You might want to check only the X or the Y or you might want to check them both within a range. You can use a case structure to set the Visible property to False at the desired position. After you set the Visible property to False, you have to decide when you want to make it visible again. (Probably not just as soon as the plane is not at the position where it disappeared or it will just seem to blink once).
0 Kudos
Message 11 of 19
(1,246 Views)
THANKS AIS FOR YOUR REPLY AND ATTACHED IS WHAT I GOT TO SO FAR ,IF YOU THINK SOME THING NEEDS TO BE FIXED LET ME KNOW AND YOU CAN ADD OR CHAINGE ANYTHING .
THANKS AGAIN.
0 Kudos
Message 12 of 19
(1,145 Views)
AIS THANKS FOR THIS BUT I REALLY CAN'T GET IT AS MY SCREEN HAS MORE AND MORE PLANES OR MAYBE I DID NOT UNDERSTAND WHAT YOU ARE SAYING.
ALL I NEED NOW IS TO HAVE THE CENTER OF THE CIRCLE AS (0,0) AND HAVE ALL PLANES VISIBLE INSIDE THE CIRCLE ONLY, SO IF YOU HAVE TIME CAN YOU JUST MODIFY MY VI AS YOU ARE SAYING..MANY THANKS
0 Kudos
Message 13 of 19
(1,145 Views)
If the formula you created for the plane's motion doesn't keep the plane on the screen the whole time, you may want to create a sub-VI the verifies that the plane is on the screen.
SubVI inputs:
1. Circle dimensions: Center X, Center Y, Radius (either separately or in a cluster).
2. Position cluster from the formula calculating the plane's position).
SubVIs output:
Boolean showing whether or not the plane is in the specified circle.
The sub-VI can use Pythagorean's Principle to calculate the distance from the center of the circle to plane. If the distance is less than or equal to the radius of the circle, the plane is within the circle: make the output TRUE. If the distance is greater than the radius of the circle, the plane is outside of the circle: make the output FALSE.
Using Pythagorean's Principle, distance of the plane to the center of the circle = the square root of ((position X - center X) squared + (position y - center y) squared).
You'll calculate the circle dimensions (radius and center x and y) using a property node of the radar screen indicator. Center x =left + width/2; Center y = top + height/2. If the indicator is a circle, the radius of the circle = width/2 = height/2.
Calculate the circle dimensions once before you start your loop. For easier wiring, bundle them into a cluster and make the subVI's input a cluster.
On each property node you're using to set a plane's position, right-click and select Add Element. Right-click on the new element that was just added and select Properties >> Visible. Place an instance of your new subVI close to the property node, wire the desired position and the circle's dimensions to the subVI. Wire its boolean output to the Visible property you just added to the property node. Add the visible property and the subVI for the property node for each plane.
This way, when the plane reaches the edge of the radar screen, the plane will disappear. It will appear back on the screen as soon as the formula puts it back within the radius of the circle. Depending on the formula, it may never come back on the screen, but that's a legitimate case: a plane flying through and continuing will be on the radar screen as it passes through, and then it's gone.
Double check your formula for calculating the position of EK 781. In the Position cluster to the property node, the top element is Left; the bottom element is Top. For EK 781, you're calculating its Left based on the Top and Height of the radar screen. You're calculating its Top based on the Left of the radar screen. Your formula for EK 781 Top = radar screen left + (2 / radar screen left). I don't think any of that is what you intend to do. What is this formula supposed to do?
For BM 110, you use the radar screen Left in the calculation for BM 110 Left and BM 110 Top.
I would expect that the plane's left is based on the radar screen left and the plane's top is based on the radar screen top.
0 Kudos
Message 14 of 19
(1,145 Views)
Thanks AIS for this information and I attempted to do what you said but it even created other problems to my VI maybe I am not familier with pythagorean principles because I never used them in labview can you just do this bit and I will then do the rest....thanks
0 Kudos
Message 15 of 19
(1,145 Views)
See the attached LabView 6.1 VI. Look at its help info.
0 Kudos
Message 16 of 19
(1,145 Views)
Thanks for you time but I still can't do it ?
0 Kudos
Message 17 of 19
(1,145 Views)
Here's one last attempt. Look at the attached VI. It uses InCircle.vi that I posted earlier. It incorporates it as I described earlier.
It uses InCircle just on one plane. I modified the formula for that plane to run in a straight line sometimes on the screen, sometimes off. I also included a button to show that plane even when it's off the screen. That button is for demonstration purposes only. Normally, you should wire the output of InCircle.vi directly to the Visible property on the property node.
If you're not understanding my comments, maybe you should take some time to go through the LabView tutorial or even take a LabView class. It seems like you're too quick to respond that y
ou can't do it. Give yourself a chance. Take some time and experiment. Have fun!
0 Kudos
Message 18 of 19
(1,145 Views)
Thanks AIS for your time and just to let you know I have just started learning labview last May and I want to know if it's good for me I will try to buy my own labview software and maybe some hardware as well and I have an offer that will end this Sep which makes me a bit in a hurry. anyway thanks again
0 Kudos
Message 19 of 19
(1,145 Views)