11-26-2009 07:37 AM
Hi all
i am creating a submarine simulator in labview
i want to include .
· A depth gauge showing how deep the submarine currently is.
· A chart showing the depth as time progresses.
· A pressure gauge showing the current pressure acting on the hull of the submarine. This can be calculated by the following formula:
Where P is pressure, is the density of sea water, g is acceleration due to gravity, and h is the depth of the submarine.
Use the Internet to find the values of and g
· A mechanism to increase and decrease the depth of the submarine.
· A safety feature which causes a warning to be displayed if the submarine depth is greater than 100m
A mechanism to raise and lower the periscope only when the depth is less than 15m.
Solved! Go to Solution.
11-26-2009 07:46 AM
This is school assignment I guess. And you have no Labview experience 😉 The first thing to do, is to post some code. Then we may give a push in the correct direction. This is the way this forum works. A complete application will require a signed contract.
We are all looking forward to see your code, so do no hesitate to post it:)
11-26-2009 08:35 AM
Also start step-by-step, the specs are pretty easy to go through:
* Make a FP with all the gauges, the alarm, an end simulation button...
* Define the events for this...
* Make SubVis for calculating the pressure, switch on/off the depth warning, Block/unblock the periscope...
Felix
11-26-2009 09:15 AM
here are some screenshots of the front panel and block diagram
thanks
11-26-2009 09:24 AM
11-26-2009 09:24 AM
Why would you take screenshots and then imbed those into some word document instead of attaching them directly?
What is the point of the screenshots? There's no real code there and you have not asked a question. You've made a couple of statements but nothing else.
11-26-2009 09:26 AM
Hi lfc4life,
the frontpanel looks nice!
Now you have to do as told by your teacher: Use the internet to find the formula for pressure calculation!
Once you have found it, you should code it using LabView functions...
Next time please attach the vi itself instead of including screenshots in proprietary file formats...
11-26-2009 09:30 AM
It is better if you attach the pictures as png instead of embedding them in a doc.
* Try to get used to the event structure, e.g. the Rais periscop button would go inside a value change event. The comparisson with the value property makes no sense at all.
* Use the timout event to calculate the depth...
* If you do not use the event structure, place at least a wait inside the loop in order not to spinn at 100% CPU load.
* Have a stop button to stop the loop, then your program should be running and you can test the functionality you implemented thus far.
* The warning dialog should go into a case when the depth is too low. But be aware that your program will be iresponsible if you display it again and again (and thus not allowing to raise the sub again).
Felix
11-26-2009 09:30 AM
11-26-2009 09:32 AM
dennis,
i am just asking for some advice on how to set out the code