You are on page 1of 9

Review Exercise

Lets build a virtual


calculator ,using
the LabView
functions that we
have studied up till
now.
Review Exercise
Review Exercise
Step 1:
• Add event case for all numeric keys {0,1,2,3,4,5,6,7,8,9}.
• Use the CtRef node for obtaining the key text, using Application Control
Palette > Property Node > Boolean Text > Text
• Join the last entered key code accumulated in the shift register with
current using concatenated strings toll.
Review Exercise
Review Exercise
Step 2:
• Add new event case for the point key { . }.
• Check if any point has already been dialed.
• Join the last entered key code accumulated in the shift register with
current point using concatenated strings toll.
Review Exercise
Step 3:

• Add new event case for the Clear key { C }.


Review Exercise
Step 4:
• Add new event case for the Math operation keys { + , - , x , / }.
• Convert the accumulated in the shift register string into a float number.
• Store the float number (First Operand) into second shift register as a
float number.
• Store the math operation key text { + , - , x , / } into third shift register
Review Exercise
Step 5:
• Add new event case for the execution key { = }.
• Convert the accumulated in the shift register string into a float number and
use it as a second operand.
• Perform an appropriate math operation according to the stored operation
code in the third shift register using the case structure.
• Convert the operation result into string using the Format Into String function.
Homework 2

Extend the
previous example
to be able to
calculate more
functions as shown
right.

You might also like