Hello, readers welcome to the new post. In this post, we will discuss How to Sum N Numbers using LABVIEW. I have started tutorial seris of LABVIEW where we will learn different parameters of LABVIEW and solve different projects. In this LABVIEW we will learn how you can add any quantity of natural numbers. First of all, you must know about what is natural numbers.
Such numbers system in math that started from 1 and continue to in sequence like Natural numbers are 1, 2, 3, 4, 5….. So if you want to get the sum of any natural numbers just put the values of that numbers in LABVIEW and get the sum till that number.
Like if you put 6 then in a result you will have 1+2+3+4+5+6=21. So let get started.
How to Sum N Natural Numbers using LABVIEW
- To perform this project you must have LABVIEW installed on your computer.
- First of all move to the front panel and press right then control palette and choose numeric option place in the front panel and its correspondent will shown block diagram.
- Move to block diagrams press right then according to figure choose while loop in structure option.
- Now press right at the end of the while loop and select the shift register. according to the below figure.
- In block, diagrams select the numeric button and choose constant and connect it to register shown below.
- COnnect this numeric constant with the register
- Now performing the previous work select the add button from the numeric tab
Now select the increment option from the numeric tab.
- After making final joining we will have our projects look like this
- Now will add the ending terminal of the while loop function means when our desired number will come our function will stop.
- Move to comparison and select the greater or equal tab.
Now our project will look like this
- At right side shift register press right and select indicator from creates and i have given name to it output
- Now move to front panel and put the values of any N natural number and you will get the sum of numbers till that number.
- can see here
That is all about the How to Sum N Natural Numbers using LABVIEW i have each and every step with the details.If you have any further query ask in the comments. thanks for reading have a good day.