Sherif Posted March 9, 2007 Report Share Posted March 9, 2007 Hello everybody, I need to know how to build the radar screen PPI on labView. if you please can tell me how can i do this. i'd be greatfull thanks in advance. ... Quote Link to comment
Mikkel Posted March 9, 2007 Report Share Posted March 9, 2007 You can use the Picture Control for making these kinds of custom indicators. -Mikkel Quote Link to comment
LAVA 1.0 Content Posted March 10, 2007 Report Share Posted March 10, 2007 QUOTE(Sherif @ Mar 8 2007, 04:38 PM) Hello everybody,I need to know how to build the radar screen PPI on labView. if you please can tell me how can i do this. i'd be greatfull thanks in advance. ... here is an example code... http://eurserveur.insa-lyon.fr/wwwEur/LesC...p8/preview.html http://eurserveur.insa-lyon.fr/wwwEur/LesC...8/download.html Quote Link to comment
Mikkel Posted March 10, 2007 Report Share Posted March 10, 2007 QUOTE(martin@aerodynamics @ Mar 9 2007, 07:45 AM) here is an example code... As far as I can see (and it's no simple task understanding code, where all comments and text is in french, as a non-french speaking person) this only loads a nice looking radarpicture from a jpg and updates shippositions (?) on top of the loaded picture. So it doesn't really create the radar picture. -Mikkel Quote Link to comment
LAVA 1.0 Content Posted March 10, 2007 Report Share Posted March 10, 2007 QUOTE(Mikkel @ Mar 9 2007, 09:29 AM) As far as I can see (and it's no simple task understanding code, where all comments and text is in french, as a non-french speaking person) this only loads a nice looking radarpicture from a jpg and updates shippositions (?) on top of the loaded picture.So it doesn't really create the radar picture. -Mikkel I just googelt the result... Quote Link to comment
Mikkel Posted March 10, 2007 Report Share Posted March 10, 2007 QUOTE(martin@aerodynamics @ Mar 9 2007, 09:44 AM) I just googelt the result... No problem I was just a bit disappointed, when I looked at the code, expecting it to draw the cool radar image shown on the homepage... -Mikkel Quote Link to comment
Mike Ashe Posted March 10, 2007 Report Share Posted March 10, 2007 Open the Find Examples dialog and search for Polar Plot Demo.vi You'll have to do a little work to modify it and make a customized version of the Polar VI inside, but it has the basics of drawing the polar grid. You can then use the polar <-> rectangular VIs for coordinate conversion and draw a line from the center to the perimeter of the graph, sweep that around. If you wanted to get a little fancier and simulate actual data you'd put down an array of color points/pixels along the current trace line. Just before you write that line you take the current Picture and "fade" it very incrementally by lightening (or darkening more likely) the whole picture in the direction of your background color. Remember to refresh from the basic polar grid/background, otherwise, if you simply keep adding to the Picture control it gets bloated data wise. Quote Link to comment
Sherif Posted March 12, 2007 Author Report Share Posted March 12, 2007 OK thank you all for your replies , i tried to construct a simple radar screen. but now the needle scan a green circle which is generated form the Indicator. How can i add more than One circle and details to have more realistic view also i need to add a scale on the screen. if there anyway to draw the Picture in any other Program like Photoshop then insert it as a Ground instead of green circle of the indicator .... please try to elaborate how can i insert an external Pic. Thnx in advance Sherif Quote Link to comment
Mikkel Posted March 13, 2007 Report Share Posted March 13, 2007 QUOTE(Sherif @ Mar 11 2007, 05:34 PM) please try to elaborate how can i insert an external Pic. You can use the 'Read JPG File.vi'* (or 'Read PNG File.vi'*), and convert the image data to a picture with the 'Draw Flattened Pixmap.vi'. -Mikkel * Note: The helpfile says that these vis are missing in the Base Package of LabVIEW. Quote Link to comment
Mike Ashe Posted March 13, 2007 Report Share Posted March 13, 2007 QUOTE(Sherif @ Mar 11 2007, 11:34 AM) How can i add more than One circle and details to have more realistic view also i need to add a scale on the screen. if there anyway to draw the Picture in any other Program like Photoshop then insert it as a Ground instead of green circle of the indicator .... please try to elaborate how can i insert an external Pic. Look in the ..\LabVIEW\Examples\Picture folder for examples. If you're willing to study them they show you how to do multiple circles, scales, etc. Look for the "Polar Plot Demo.vi" I told you about. Go down into the subVIs inside. You will find a VI called, "Draw Polar Grids.vi" Inside that VI there are VIs for drawing multiple circles (PG circles.vi) and drawing scales etc. As for getting an image file into a picture control you'll find an example http://zone.ni.com/devzone/cda/epd/p/id/1815' target="_blank">here. You're lucky my is tasting good today. Quote Link to comment
Sherif Posted March 24, 2007 Author Report Share Posted March 24, 2007 I'd like to thank both of you so much ..... YOu really helped me alot Hope i could help you oneday Thanks again Sherif Farouk Quote Link to comment
Sherif Posted June 13, 2007 Author Report Share Posted June 13, 2007 Hello everybody I'm building a radar Screen using LabView 8.0 all i could do till now is to do a green circle with centered needle scanning i need now to add a picture as a Background to this circle in order to have more realistic view. I tried to insert a picture using (READ JPEG file.vi) but each time i do run for my project it asks me to specify the location of the pic. and when i specify where nothing shows up and simulation not completed. i don't know where's the problem. i need to insert a radar screen Pic. in front of the green circle and make it transperent. if anyone could tell me how or do it for me , i'd be greatful Here's the file taking Sample Period 0.01 with any RPM (Revolution per minuite) you want. Thanks in advance. Quote Link to comment
osvaldo Posted June 13, 2007 Report Share Posted June 13, 2007 QUOTE(Sherif @ Jun 12 2007, 12:35 PM) Hello everybody I'm building a radar Screen using LabView 8.0 all i could do till now is to do a green circle with centered needle scanning i need now to add a picture as a Background to this circle in order to have more realistic view. I tried to insert a picture using (READ JPEG file.vi) but each time i do run for my project it asks me to specify the location of the pic. and when i specify where nothing shows up and simulation not completed. i don't know where's the problem. i need to insert a radar screen Pic. in front of the green circle and make it transperent. if anyone could tell me how or do it for me , i'd be greatful Here's the file taking Sample Period 0.01 with any RPM (Revolution per minuite) you want. Thanks in advance. Hi Sherif, On my system the JGP file was loaded correctly, but your problem, in my opinion, is in the way you use the load JPG vi... In your code, you try to load a new image every time the loop run!! Try to place the load image code outside the loop so it would be executed once at the beginning of the program or insert this code into a case structure that execute only if the interaction counter is 0... Quote Link to comment
ohiofudu Posted June 13, 2007 Report Share Posted June 13, 2007 QUOTE(osvaldo @ Jun 12 2007, 05:55 AM) Try to place the load image code outside the loop so it would be executed once at the beginning of the program or insert this code into a case structure that execute only if the interaction counter is 0... Sherif, Osvaldo is right.I spent some time on your code.Take a look at the Vi. http://forums.lavag.org/index.php?act=attach&type=post&id=6078''>http://forums.lavag.org/index.php?act=attach&type=post&id=6078'>http://forums.lavag.org/index.php?act=attach&type=post&id=6078 Quote Link to comment
Sherif Posted June 13, 2007 Author Report Share Posted June 13, 2007 Thank you osvaldo for your fast response. and for you ohiofudu for the time you spent. but i want to ask you wt does the 'Signalverlaufsdiagramm' displays ?! another Question .... After inserting the Pic. successfully How can i make it transperent infront of the green circle OR Vice versa ? Or do you know how can i add grids and scales for raduis and distance on this green circle Thank you so much Quote Link to comment
ohiofudu Posted June 13, 2007 Report Share Posted June 13, 2007 QUOTE(Sherif @ Jun 12 2007, 08:27 AM) Thank you osvaldo for your fast response.and for you ohiofudu for the time you spent. but i want to ask you wt does the 'Signalverlaufsdiagramm' displays ?! another Question .... After inserting the Pic. successfully How can i make it transperent infront of the green circle OR Vice versa ? Or do you know how can i add grids and scales for raduis and distance on this green circle Thank you so much Hi Sherif, I have giving your code another short,Hope this is what you want?? http://forums.lavag.org/index.php?act=attach&type=post&id=6079''>http://forums.lavag.org/index.php?act=attach&type=post&id=6079'>http://forums.lavag.org/index.php?act=attach&type=post&id=6079 Quote Link to comment
Sherif Posted June 14, 2007 Author Report Share Posted June 14, 2007 OK ohiofudu thank you but i want to add the pic. to use it in the radar screen. not just to display it so i need to make it transperent to the green circle. you know that i already made a target on the screen so to detect it we have to specify it's angle and distance [polar representation] ... as you can see in my code the green circle provides the angle in radians and in degree so what about the Range (distance) ... that's why i want to add pic. or even grid to specify the range of the target. Anyway thank you for your efforts ... but still no solution to my problem so if can anyone help i'd be greatfull Thank you all Sherif (",) Quote Link to comment
Grampa_of_Oliva_n_Eden Posted June 14, 2007 Report Share Posted June 14, 2007 Have you tried the "Create Mask.vi"? Ben Quote Link to comment
Sherif Posted June 15, 2007 Author Report Share Posted June 15, 2007 QUOTE(Ben @ Jun 14 2007, 12:01 AM) Have you tried the "Create Mask.vi"?Ben Never tried it Before, i'll try it now Thank you for directing me. Regards, Sherif (",) Quote Link to comment
Sherif Posted June 16, 2007 Author Report Share Posted June 16, 2007 OK thank you all .. The problem is solved now ... i tried [creat mask.vi] you told me about BEN thank you, but finally i made it by drawing the Radar screen in Office with all details required and then copy and paste my drawing inside LabView front panel directly, after then you are able to scale it to fit the area required to be covered. this Method is too fast and simple ... you can also change the appearence of your knobs and sliders or whatever you want ... hope this can help anyone .... Best regards Sherif Farouk (",) Quote Link to comment
Grampa_of_Oliva_n_Eden Posted June 16, 2007 Report Share Posted June 16, 2007 QUOTE(Sherif @ Jun 15 2007, 08:35 AM) OK thank you all .. The problem is solved now ... i tried [creat mask.vi] you told me about BEN thank you, but finally i made it by drawing the Radar screen in Office with all details required and then copy and paste my drawing inside LabView front panel directly, after then you are able to scale it to fit the area required to be covered. this Method is too fast and simple ... you can also change the appearence of your knobs and sliders or whatever you want ... hope this can help anyone .... Best regards Sherif Farouk (",) Expediency is good! Unfortunately, I was not told about "Create Mask.VI" and I wrote my own version before I stumbled across that one. Does anyone (PJM, Captain) have any idea why the mask has to have an even number of bytes for each row of pixels. Ben Quote Link to comment
crelf Posted June 16, 2007 Report Share Posted June 16, 2007 QUOTE(Sherif @ Jun 15 2007, 10:35 PM) OK thank you all .. The problem is solved now ... Can you please post your solution so we can all benefit from it? Quote Link to comment
Sherif Posted June 16, 2007 Author Report Share Posted June 16, 2007 QUOTE(crelf @ Jun 15 2007, 04:30 PM) Can you please post your solution so we can all benefit from it? Sure with Pleasure ... Quote Link to comment
ohiofudu Posted June 16, 2007 Report Share Posted June 16, 2007 QUOTE(Sherif @ Jun 15 2007, 10:29 AM) tried to insert a picture using (READ JPEG file.vi) Sherif, What about the Picture Issue?? in your first post you said you want to "insert picture in center of your circle and make it Transperent" Quote Link to comment
Sherif Posted June 16, 2007 Author Report Share Posted June 16, 2007 well ohiofudu the picture is inserted successfully but the problem is when it became transperent . when it becomes transperent you can see the needle scanning the circles but you can't see the Moving targets i don't know why ....??!! but all i know is that the targets are more important than the needle . Anyway the soln. i used is applicable and so simple as you can draw the screen with all details you want evenif you insert a pic. form file into office then edit it and control the transperency Percentage then copy the final PIC. and Paste it inside you front panel. But for sure if you have any other solutions or ideas ... please share them with us so that we can all benefit. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.