Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ and Encoder Connections

"Please help a DAQ/Motion neophyte ....
I'd like to synchronize/correlate a load cell output with the a linear stage position via the on-board encoder. The on-line documents show Ch.A to PFI8_Source, Ch.B to DIO6_Up_Down, and GND to DGND. However, the Agilent HEDL-5504-A encoder that I have has A+ and A-, B+ and B-, I+ and I-, and GND channels (i.e., seven connectors). What is the proper way to connect to the terminal block of the SCC-2345 to communicate with my PCI-6036E DAQ device for this encoder? Thanks in advance ... Jerry"
0 Kudos
Message 1 of 5
(4,462 Views)
Jerry,

I found the following data sheet:

Agilent Encoder Line Drivers

Is this the correct data sheet for your encoder? If so, you will still make the connections from the document you referenced in your post. The counters provided by the E Series device do not support an index signal (I and I'), and the A' and B' signals are complementary outputs for the A and B signals.

Good luck with your application.

Spencer S.
0 Kudos
Message 2 of 5
(4,462 Views)
Spencer, thanks for the information...
I made the following connections Ch.A+ to PFI8_Source, Ch.B+ to DIO6_Up_Down, and GND to DGND. I am able to get the counter to increment (and decrement from that increment). However, if the encoder goes past the initialization position, it get some strange (very large numbers) that don't decrement uniformly. Is this correct ??
Thanks in advance ... Jerry
0 Kudos
Message 3 of 5
(4,462 Views)
Yes it's correct. What's happening is that the 24-bit counter is rolling over from 0 to its max value of 2^24 -1. You probably want to see is something like 3, 2, 1, 0, -1, -2, ..., right? You can do that fairly easily in software. The following isn't perhaps the most formal or elegant, but it'll get the job done.

Your count value is stored in an unsigned 32-bit integer datatype, but only bits 0-23 are used. Note that bit 23 is "on" for the largest half of the numbers, the ones we'll want to treat as negative positions.
First convert your count from a u32 to an i32. Then if bit 23 is "on", replace the count with (count - 2^24). Note: the 2^24 constant should be an i32 datatype.

Topic 2. Using a DAQ-STC counter to m
easure position from a quadrature encoder is not a foolproof measurement. Have your read through the tutorial and app note yet?
http://zone.ni.com/devzone/conceptd.nsf/2d17d611efb58b22862567a9006ffe76/6f25cba2cd73417786256869005e5fc3?OpenDocument

If you care about repeatability after back-and-forth moves, or if your system experiences oscillations at the end of motion, you will probably need a true quadrature interface. You can either build the quadrature interface circuit described in the tutorial / app note, or buy a 660x-series counter/timer board which has quadrature built in.

Other advantages of the 660x series are:
- tracks +/- positions on its own without software conversions
- can use index channel for repeatable hardware reset of "zero" position.

The cheaper 6601 can meet your needs for today, but be aware of the following improved features in the 6602:
- 4 additional counters
- 3 DMA channels for buffered operations instead of 1
- 4x higher resolution
on timing (80 MHz vs. 20 MHz)
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 5
(4,462 Views)
Kevin's explanation is excellent.

Spencer S.
0 Kudos
Message 5 of 5
(4,462 Views)