Guard a power calculation

Mark Yourself Question

  1. Grab a piece of paper and try this problem yourself.
  2. When you're done, check the "I have answered this question" box below.
  3. View the solution and report whether you got it right or wrong.

A LabVIEW program calculates electrical power from voltage VV and resistance RR:


P=V2R.P=\frac{V^2}{R}.


Resistance is either zero or positive. Two outputs are required: numeric Power in watts and Boolean Computed. The requirements are:

  • If Enabled is False, output 0.0 W0.0\ \text{W} and Computed=False without executing the division.
  • If Enabled is True and R>0 ΩR>0\ \Omega, calculate power and output Computed=True.
  • If Enabled is True and R=0 ΩR=0\ \Omega, output 0.0 W0.0\ \text{W} and Computed=False without executing the division.

Use an outer Boolean case selected by Enabled and an inner Boolean case for checking resistance. Use Default If Unwired is disabled on every output tunnel.


The schematic is a blank planning aid; each frame shows one unspecified case.


A blank nested-case schematic shows selector placeholders and output tunnel locations without wires.


a) Specify the inner selector condition and where the squaring and division nodes belong.


b) Describe how to wire both outputs on every execution path, including the connection between the two structures.


c) Find both outputs for Enabled=True and V=12.0 VV=12.0\ \text{V} when R=8.00 ΩR=8.00\ \Omega, and then when R=0 ΩR=0\ \Omega.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More The Case Structure Questions: