LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write a LabVIEW program for conducting selected arithmetic operation (+, ─, *, or /) of two numeric values?

On the Front Panel, it has 2 Control inputs, one selector, one display showing “The current operation is ....” and 1 output Indicator.

0 Kudos
Message 1 of 4
(1,080 Views)

Hi alyh,

 


@alyh0628 wrote:

How to write a LabVIEW program for conducting selected arithmetic operation


Are you starting the same homework as lots of students before you?

Why don't you search the forum for threads about "calculators"?

 

What have you tried and where are you stuck?

Mind to attach your code?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(1,046 Views)

I have no idea how to select different answers due to the input.

alyh0628_0-1678950700206.png

 

0 Kudos
Message 3 of 4
(1,038 Views)

Hi alyh,

 


@alyh0628 wrote:

I have no idea how to select different answers due to the input.


Then you should take a class on basic programming (not neccessarily LabVIEW)…

 

Suggestions:

  • When you want to select between several cases you should use a case structure!
  • Delete that "Selector" control and create an Enum control.
  • Create items in the Enum corresponding to your required math operations.
  • Now wire that Enum to your case structure and "Create a case for each Enum item"…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(1,021 Views)