Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect encoder to USB 6361 to count up and down and measure position

Solved!
Go to solution

Hello.

I am working with an encoder with three outputs - A,B, and Z (ENX10 Easy 512IMP). I am using USB 6361 to acquire the signals. Per the documentation for the USB 6361 Multifunction I/O device manual, I see where to connect the encoder outputs to utilize the appropriate counters in the USB 6361. I have connected the encoder and I have worked through the example program (Counter - Count Edges ). When I turn the motor, I can count counts, but the counts only increment, regardless of the direction that the motor rotates. I would like the counts to increment and decrement based on the rotation of the motor. Is it possible to do this with the hardware that I have?

 

Additionally, I was also working with the sample code: Counter - Read Encoder and I was working through an NI demo on YouTube to use encoders to measure angular position. I have the encoder connected to the device, but the output bounces between 0 and 0.175, regardless of the direction that I rotate the motor. I don't get a smooth angular position output as demonstrated in the YouTube video.

 

It seems that I have made a fundamental mistake and that I am missing a crucial piece of the set-up. Any suggestions or information will be greatly appreciated. 

 

Sincerely,

Emily

0 Kudos
Message 1 of 3
(1,803 Views)
Solution
Accepted by topic author Miller37

I briefly tried to look up your encoder, but didn't quickly narrow it down to your exact model #.  I noticed that many encoders in that family produce *differential* outputs while NI MIO boards will want single-ended signals.  You may need to convert from differential to TTL.

 

"Counter - Read Encoder" is the correct example to start from.  When signals are compatible and wired correctly, that encoder position measurement task will measure both + and - rotation changes. 

 

Another thing to double-check: the single-increment toggle behavior you observed (0.0 to 0.175 deg) would happen if *only* ch A or ch B are wired & configured appropriately.  Make sure that the wiring config in the software matches the actual connections at the terminal block.  And make sure you didn't lose a channel by crimping down on insulation or something.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 2 of 3
(1,787 Views)

Thank you for your suggestions. I appreciate your feedback. It turns out that I had a loose wire prior to the connection to the DAQ.

0 Kudos
Message 3 of 3
(1,768 Views)