Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Counter output jumps when power to encoder is cut

Hello all,
 
I am using a PXI-6251 DAQ board and a SCB-68 to read, via a LabVIEW DAQmx task, an optical encoder (720 counts / rev.) in radians.  The data read from the encoder is nice and smooth while the encoder is running, but when the power to the encoder is cut abruptly, there is a jump in the number of radians read (about two or three).  An oscilloscope connected at the SCB terminals shows a voltage spike of unreadable height when the power to the encoder is cut.  How might such a spike cause a sudden increase in the number of ticks/degrees/radians read?
 
Thanks!
 
Slowpoke
Slowpoke
CLAD (believe it or not!), using LabVIEW 8.5

They don't call me "Slowpoke" for nothin'!
0 Kudos
Message 1 of 7
(4,750 Views)
Hello Slowpoke,

Large voltage spikes can result in additional counter measurements. The TTL signal that you are measuring has to adhere to certain requirements. A TTL signal is low between the voltage of 0 to 0.8V and a high for 2 to 5V. Additionally, the maximum rise and fall time of the pulse must be less than 50ns. If this requirements is not met, the counter will give erroneous count values. For M-series cards with the DAQ-STC counter asic, the minimum pulse width has to be 10ns. If the signal does not conform to all these specifics, the count value will be incorrect.

One option you can consider, is if you have a 0-5V signal from your encoder that is high when the power is on and low when the power is cut off. This signal can be wired to the Gate of the PXI-6251. What does your voltage spike look like? Is it one large voltage spike or is there ringing/bounching as it settles?


Regards,
  Sandra T.

Applications Engineer | National Instruments
0 Kudos
Message 2 of 7
(4,724 Views)

Hi Sandra,

Thank you for your reply.  The spike in question rises to positive (~30 volts), bounces negative (~10 volts), then settles to zero.  If there was any ringing I didn't detect it.  What about wiring a capacitor across the encoder leads?  Would that affect the counter measurement as well?

Regards,

Slowpoke

Slowpoke
CLAD (believe it or not!), using LabVIEW 8.5

They don't call me "Slowpoke" for nothin'!
0 Kudos
Message 3 of 7
(4,723 Views)
Hello Slowpoke,

Yes, you need external circuitry that will protect your hardware. The PXI-6251 is only rated for overvoltage protection of ±25V for up to four AI pins when the device is on. It is rated ±15V for up to four AI pins when the device is off. You could place a capacitor in the circuit that will help smooth out some of the spikes, but you may want to consider the affects of the capacitor. It may change the rise/fall time, carefully choose your parts for your application.


Regards,
  Sandra T.

Applications Engineer | National Instruments
0 Kudos
Message 4 of 7
(4,704 Views)

Hi Sandra,

We're looking into a number of options for smoothing out the signal.  However, when I tried to bridge the +5V power to the gate input and reproduce the spike, the power dropped to around +1/2V, and remains low.  The encoder is no longer producing a readable signal (except for the spikes).  Could the DAQ board or the SCB interface have been damaged in some way?

Thanks,

Slowpoke

Slowpoke
CLAD (believe it or not!), using LabVIEW 8.5

They don't call me "Slowpoke" for nothin'!
0 Kudos
Message 5 of 7
(4,673 Views)
Hello Slowpoke,

In this case, I would test each of the components individually to better identify what in your system could be giving you the erroneous measurements. I would start troubleshooting the DAQ device first. In Measurement and Automation Explorer (MAX) run a self test. Open a test panel to test the counter. Do the signals look okay here? Try connection a TTL output signal from your card to the input of your counter. Is that behaving correctly?

Once you have figured out the DAQ device is working, now you can add the SCB-68 into the system. Run similar test above to see if it is still working.

Lastly test your encoder to see if this is the link in your system that is broken.

Also consider if anything in your LabVIEW code has changed since it was last working.

Regards,
  Sandra T.

Applications Engineer | National Instruments
Message 6 of 7
(4,651 Views)

Hi Sandra,

Following the process you described, I determined that the fault lies with the SCB, specifically the +5V counter power input.  I transferred the connection to the other +5V terminal, and everything works fine (except for the spike, which will be dealt with later).  Perhaps a loose strand of wire has shorted a pair of connections somewhere, or I've damaged the terminal itself in some way...

Regards,

Slowpoke

 

P.S.  This forum, and the engineers and experts who give their time to it, have been a godsend.  Thank you!  Smiley Happy  

Slowpoke
CLAD (believe it or not!), using LabVIEW 8.5

They don't call me "Slowpoke" for nothin'!
0 Kudos
Message 7 of 7
(4,629 Views)