From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

submarine simulator

Solved!
Go to solution

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.

0 Kudos
Message 1 of 13
(3,498 Views)

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:)



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 2 of 13
(3,496 Views)

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 

0 Kudos
Message 3 of 13
(3,480 Views)

here are some screenshots of the front panel and block diagram

 

thanks

0 Kudos
Message 4 of 13
(3,466 Views)
Just a friendly tip. In this forum. Always post code instead of pictures of the code.


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 5 of 13
(3,451 Views)

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.

0 Kudos
Message 6 of 13
(3,450 Views)

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...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 13
(3,447 Views)

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 

Message 8 of 13
(3,442 Views)
0 Kudos
Message 9 of 13
(3,441 Views)

dennis,

 

i am just asking for some advice on how to set out the code

0 Kudos
Message 10 of 13
(3,440 Views)