LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

adding results of an array to an output

Solved!
Go to solution

I've already tried looking for a solution but am unable to get it right. do pardon me as i'm quite new to this.

 

I'm trying to build a VI that randomly generates a whole number for an array of 8 by 8.

and once that is done, to add up the total amount to one numeric indicator.

 

so far I have this.

 

http://i35.tinypic.com/35i8u2q.jpg

 

however it's not working correctly. can someone kindly point me in the correct direction?

 

much appreciated. 🙂

0 Kudos
Message 1 of 10
(3,672 Views)

quarzi wrote:

http://i35.tinypic.com/35i8u2q.jpg

 


Please post your image directly to the forum here. Don't give outside links. Use Add Attachments located at the bottom of your composer box.

 

Mathan

0 Kudos
Message 2 of 10
(3,670 Views)
I know it's a little excessive, sorry about that.
0 Kudos
Message 3 of 10
(3,665 Views)
Solution
Accepted by quarzi

Is this what you are looking for?

 

sum.png

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
Message 4 of 10
(3,662 Views)

quarzi,

 

I cant see any image in the link.Just a dot.

 

 

0 Kudos
Message 5 of 10
(3,660 Views)

Adnan, I'll try out your solution. however, are you able to tell me where I can locate the icons for the summation? I can't seem to find it. I'm using LabVIEW 8.6 Student edition.

 

 

edit: found. tryig it out now.

Message Edited by quarzi on 10-06-2009 12:53 AM
0 Kudos
Message 6 of 10
(3,656 Views)
I should have labeled that; it's called Add Array Elements and is located in the Programming -> Numeric palette.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 7 of 10
(3,652 Views)

1.png

 

Since you said you need whole number, try inserting "Round to Nearest" located in the Programming -> Numeric palette.

Message 8 of 10
(3,641 Views)

Thanks Adnan! It works for me.

 

Also, thank you all for your replies. 🙂

 

 

0 Kudos
Message 9 of 10
(3,639 Views)
The above solution is statistically flawed, because 0 and 10 will only appear with 50% of the probablilty of all other numbers. To get equally distributed numbers, you need to multiply with 11 and round to -inf instead.
Message 10 of 10
(3,565 Views)