Example Code

My Weight on Other Planets

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
To Demonstrate a VI to Measure the Immediate Weight of the Given Weight on Earth

Description:
Ever wondered how much you would weigh if you stood on the surface of another planet in our solar system?
Well, wonder no more! I am pleased to bring you the InterplanetWeight.vi! This is the application you have all be “weighting” for.

If you have not closed your web browser in disgust, following that awful pun... you may be interested in the attached application. The code is simple, but hopefully it will introduce you to a sleek and intuitive, context-sensitive user interface.

You enter your “Earthly Weight” then hover your mouse cursor over one of the planets. As you do this, a custom information box (built using a cluster) will appear next to the planet, informing you of the name of the planet and your approximate weight on it's surface.

The code is event based – allowing us to maximize efficiency, without sacrificing interactivity. But the selected architecture is also incredibly scalable. Adding an additional planet, moon or star will take just a couple of minutes.

Instructions:
To implement this example:

  1. Run the VI
  2. Hover the Mouse to Find Out the Result of the Weight Calculation


To execute this example:

  1. Install the required software.
  2. Open the VI and refer the Implement Steps


Requirements
Software
LabVIEW 2012 or compatible

Hardware
-

bd.pngfp.PNG

**This document has been updated to meet the current required format for the NI Code Exchange.**

Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
syang
Member
Member
on

eh don't think your mass will change by location -_-

-------------------------------------------------------------
LabVIEW 2011 newbie >.<

Certified LabVIEW Developer
RER
NI Employee (retired)
on

Ha Ha! You raise an interesting point here Syang. Ofcourse you are correct, Kg is technically a measurement of mass. But, in everyday use, the Kg is often used as a measurement of weight... but, Weight given in Kg is technically known as the kilogram-force. (a non-SI unit of force, defined as the force exerted by a one kilogram mass in standard Earth gravity - equal to 9.80665 newtons).

To be quite honest, it doesnt actually matter which unit of weight you use with my example code. They will all scale my the same factor!

Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/
teodorescu
Member
Member
on

Hello!Very interesting project RER.Please can you say me how can I add the moon,I need to say me the steps for make this,I work in Labview 14.Thank you in advance!