LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

coin weighing problem using usb 6008


@Colinw88 wrote:

When you say round to nearest integer how do you do that? 


Round to Nearest Function


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 21 of 24
(587 Views)

Thanks for your help and replies. 

 

Ive tried that but because its working with decimals it makes it increasingly difficult to get it correct. I understand that the 6008 is according to some people isnt known for its accuracy but for these last two im struggling to get an accuate reading. For 50p im having the problem of the signal varying from say 16.3 up to 16.8, which to me obviously would sugest the middle point. 

 

Would it be worthwhile getting the output into an array of say 10 values, taking the average of the output then trying some form of rounding to get a better value? Also i tried to create a prompt and created well a never ending loop (My bad). For the default of the enum i just would like a prompt that asks the user to select a value of coin. 

 

Many thanks

 

 

 

0 Kudos
Message 22 of 24
(569 Views)

Colinw88 wrote:

Ive tried that but because its working with decimals it makes it increasingly difficult to get it correct. I understand that the 6008 is according to some people isnt known for its accuracy but for these last two im struggling to get an accuate reading. For 50p im having the problem of the signal varying from say 16.3 up to 16.8, which to me obviously would sugest the middle point. 

 

Would it be worthwhile getting the output into an array of say 10 values, taking the average of the output then trying some form of rounding to get a better value?


Yeah, that does sound like you are at the middle point.  Averaging of values is a very common way to reduce your noise.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 23 of 24
(560 Views)

So best way to do it is put values into array, and then average it again and display the average?

0 Kudos
Message 24 of 24
(544 Views)