LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using NI 9219 to read a Lion precision capacitive sensor signal

Hi,

I am using an NI 9219 (mounted on cDAQ-9188) to read voltage output (+/-10V) from a Lion Precision Capacitive sensor (connected to terminals 4& 5 on the NI 9219 connector for voltage measurement). And I am running into issues reading the signals correctly using LabVIEW. I am also reading the position using another sensor-encoder for comparison. Please see below  

Test 1: Noise characteristics (no Voice coil effort, time axis in seconds- Sampling rate- 100Hz for all 3 signals)

Figure1.png

  1. Cap sensor data appears to be highly discretized (some kind of voltage resolution issue- need to verify if this is coming from ADC-NI9219 or from the cap-sensor itself)
  2. There appears to be some kind of delayed response of cap-sensor (probably a coding issue)

I tested the sensor readings using NI MAX and those readings did not have any delay. I also checked the sensor readings using an Oscilloscope to verify if the sensor has gone bad but the oscilloscope readings were fine (did not have any delay, were matched to +/-10V).

 

Test 2: Stepping in position (roughly 7-7.5um steps, 2s wait @ each step, 100 Hz sampling for all signals)

  1. Cap sensor did not register all the steps
  2. Bandwidth issue (too large of a step in very short time- unlikely)- I am not sure why it did not register all the steps- mismatch between +/-10V AO of sensor and +/-30V AI of ADC.  or Does the delay in cap-sensor response cause a problem in registering these steps accurately ?

Figure2.png

Again, testing with NI MAX I was able to register all these steps.

So, there are two problems I am trying to find the answers to-

1. Why and how does +/-10 V differential signal from the cap sensor translate to +/-30V range when reading with the NI 9219 (both NI MAX and the VI)

2. How to read these cap sensor readings in the VI more accurately (similar to NI max) ?

 

I have attached some documentation about cap sensor and the VI that I am using. 

Any help would be appreciated.

 

Thanks,

 

0 Kudos
Message 1 of 3
(2,612 Views)

Here are the two readings from the sensor (differential) using an oscilloscope (validation that the sensor is working fine):

TEK00002.PNG

Each step in both signals is 1.14 V for motion steps of size 6.3 microns.

0 Kudos
Message 2 of 3
(2,495 Views)

1.a- Your delay issue is indeed a coding problem. You set up your Read task as continuous with a 1 kHz sample rate, but you're only reading one sample at a time. Look in the Example Finder for better information on how to do continuous tasks. I would suggest you remove the Wait until next ms multiple function and only rely on your DAQmx Read function to do your timing for you. Basically, your Read task is filling a buffer at 1000 Hz, and you're removing one every 25 ms (40 Hz). Eventually you'll get a buffer overflow error.

1.b- The sequence structure isn't doing anything for you. I'd recommend you clean up your diagram and "think dataflow" to get your program laid out more cleanly.

 

2.a- Your sample rate is too high for this card; its conversion time is 10 ms for all channels, thus the max sample rate is 100 Hz. Your discretization is probably coming from reading the same sample multiple times, not an actual issue with the sensor resolution. I'm surprised this didn't throw an error to be honest. With a delta-sigma converter, I don't know how it'll respond when trying to oversample.

2.c- A +/-10V differential signal has a range of +/-20 V total. In other words, with leg A at +10 V and leg B at -10 V, your measurement is 20 V. With leg A at -10 V and leg B at +10 V, your measurement is -20 V. This is where your higher signal measurement is probably coming from.

0 Kudos
Message 3 of 3
(2,491 Views)