LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculator

Hello,
I make calc and I have problem. I can only add if i mark "+" in constant string, if "x" only multiplay, you know what's wrong? Any idea what's wrong?

I use labview 2012
Kindest regards,
Mateusz

Download All
0 Kudos
Message 1 of 3
(2,704 Views)

Hi vudi,

 

Any idea what's wrong?

- subVI: Don't create icons as you did with your subVI. Due to its transparancy its very hard to open by clicking on it! Use a closed border - it doesn't need to be rectangular…

- subVI: Calc your factorial like this:

check.png

- MainVI: Put all boolean terminals in their corresponding event case!

- MainVI: Please do some debugging on your event structure logic: what happens when you press "6", "-", "3", "=" (in this order)?

- Main/Sub: When you use strings in your main VI you should use a string (not a RING) input in your subVI!

Best regards,
GerdW


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

It looks like you are learning LabVIEW.  Here are a few links that provide some free training.

 

NI Learning Center

NI Getting Started

-Hardware Basics

-LabVEW Basics

-DAQ Application Tutorials

 

3 Hour LabVIEW Introduction

6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training

 

Here are a few more pointers.  

 

  • Initialize shift registers unless you want to retain information between iterations (you don't in this case).
  • Avoid un-needed wire bends.
  • Don't display terminals as icons.
  • Don't wire a False to a while loop, you have no way of stopping your program exect by crashing it into a tree.  Add a proper stop button, or handle closing the program in the event structure in the "Panel Close?" event.
  • Ditto on what GerdW said.
0 Kudos
Message 3 of 3
(2,600 Views)