Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

reading pulses from encoder with NI9237

Dear all
 
 
I'm trying to count pulses frome a quadrature encoder with NI9237. First i reduce de output voltage with resistance to 14mv, so with this value i can measure a quadrature wave
with NI9237 between 0 and 14mv.
I can get the pulses as you can see in the example attached, but i need a hight rate and after some seconds the software give me a error with buffer.
I'm trying to use it with other sensores (load cell and a lvdt). I have a problem because if i get samples to a write measure file and if i only want get about 10 samples/sec i don't know how i can do it?
 
Can you please give me a simple solution than mine?
 
 
Best regards
 
Carlos Palha
0 Kudos
Message 1 of 4
(3,388 Views)
Hi Carlos,
What is exactly your error message? I think that you do not read enough data from the buffer. In you DAQ assitant you have to enter a higher number of samples (for example 10 or 100).
Manuel R
AE dans une autre vie
0 Kudos
Message 2 of 4
(3,359 Views)

Dear Manuel

I send you attached the error from the buffer.

If i put more sample and when i rotate the encoder i lost some pulses. In the configuratio samples=2 or 1 and saple rate=1k it works good, but when i try to start saving data, the buffer give the error.

Apparently it works good until i press the saving data.

Best regards

 

Carlos Palha

 

0 Kudos
Message 3 of 4
(3,356 Views)
Hi,
The module 9237 is not the best solution for your application. This module is used for analog measurements. For your application you will need a counter module.
The error message is explicit, the buffer is to smal if you are not reading quick enough the data. If you are doing datalog you will not read fast enough data in the buffer.
If you do not want to change module I advise you to read more data each time, 100 data  for example. You will be able to analyse these data and you will not loose data.
Regards.
Manuel R
AE dans une autre vie
0 Kudos
Message 4 of 4
(3,323 Views)