Overview
This example VI shows how to use nested case structures to realize the weight and distance converter. .
Description
This VI uses nested case structures to select what type of conversion to use and what units to convert. Three enumerated controls are used in this VI, one for selecting Weight or Distance, the other two are used for choosing the units to convert. The mathematics use a single multiplication which times the conversion value by a constant that represents the conversion of a single unit.
The result is created by a Format Into String VI, which formats and appends the Convert To enumerate text to the resulting double numeric holding the converted value.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Block Diagram of "Conversion 2012 NIVerified.vi"
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
This does not appear to be a state machine.