LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

coin weighing problem using usb 6008

Hi there

 

Ive previously had problems using a DAQ to read in data from a load cell which is being used to measure the strain a coin tray puts on it. The loadcell is connected to a low pass filter which Fc is 100Hz (to try and reduce noise interfernece). Using values gotten from testing i feel ive created a system which will determine how many coins then display the number in pounds for the user. 

 

It uses a basic case structure using a enum. Each case has different values of division and multiplication for the coin value. The problem im having is determining the DAQ settings to get accurate readings as it needs to be as accurate as possible. Also if anyone could give advice on anything else that might need to be added to the program or recommend anything to improve it i would much appreciate it.

 

Below is the project panel of the case study. 

Many thanks

Project block dia

0 Kudos
Message 1 of 24
(4,006 Views)

Nobody can tell anything from a picture of a DAQ Assistant.  You need to post your actual code...

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 2 of 24
(3,990 Views)

Thanks for your reply,

 

The problem im having is setting up the DAQ assistant to supply a reasonable output. The minimum value im looking to read in is roughly 5mV maximum of 2 volts. Its the sampling rate and samples to read. I used an example program from NI to try get a rough idea of what is actually happening with the signal. Its powered from mains so taking 50hz into account. I think the problem im having is that a DMM which ive been using to get values for the step inputs of one coin to determine to voltage it creates, uses some form of averaging. Now when i run a DAQ program (cont Acq&graph voltage-analog sw trigger) it gives me this kind of output. All i wish to know is how to set up the correct sampling rate and number of samples and a way to get a constant number out rather than this ever changing value

Many thankssetup.jpg

0 Kudos
Message 3 of 24
(3,980 Views)

Have you tried looking at the signal with an oscilloscope?  That's the best way to make sure your DAQ is behaving correctly.


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 4 of 24
(3,971 Views)

Thanks for the reply,

 

Ive checked it on the oscilloscope. and attached the result. (settings were 5ms / div and 2v/div) I understand im obviously sampling possibly at a faster rate but the signal does appear similar to that of the DAQ. However what im looking for is to set up the sampling rate correctly and to then try and get some form of averaging to get similar values to those acquired with a DMM. Would this even be possible as the DMM must do more than just average it out? 

 

Many thanks

0 Kudos
Message 5 of 24
(3,940 Views)

Based on your 100Hz filter, Niquist states you need to be at least 2x that.  I would probably go a little higher, say 500Hz in this case.


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 6 of 24
(3,932 Views)

Your signal appears to be mostly power line frequency interference (50 Hz).  I suspect that you do not have your sensor and AI connections correct.  Look at pages 15-18 of the NI USB-6008/6009 User Guide and Specifications for information about how to connect.  You probably should be using differential mode for the inputs unless your sensor has its own signal conditioning.  Also check to make sure that grounds and retunrs are connected correctly.

 

Lynn

0 Kudos
Message 7 of 24
(3,901 Views)

Thanks for your replys.

 

@ crossrulz thanks thats a good starting point to work from. The amount of samples shouldnt matter or wil that be a value aswell. Like 1k?

 

@ johnsold See thats what i felt so i changed the filter to try filter out as much noise as possible and get to as close to 50hz as possible yet it still made no difference. I got given the 6008 of a friend so unfortunately i dont have the guide, is it online? There is only one input for it, at later stages i hope to take multiple but this is just a prototype to show how it would work so shouldnt i use the RSE setting? By grounds and returns connected correctly what do you mean?

 

Many thanks

0 Kudos
Message 8 of 24
(3,885 Views)

You asked if the USB 6008 manual is on line. As with most NI kit, extensive documentation is on-line.

go to ni.com/uk

Enter USB 6008 in the search box.

It's the first answer!

0 Kudos
Message 9 of 24
(3,877 Views)

Thanks for your reply Rod. I appreciate it. I did realise a potential problem that i had, i used copy and paste thinking it would use the same settings over n over, as it turns out this doesnt apply to number displays. So i just went back to the first 'case' and managed to get an output. However there is an awful offset and no form of stability. The range changes from approx +/- .5v which comes into major effect as i need it to be a stable number. Any suggestions?

0 Kudos
Message 10 of 24
(3,858 Views)