From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Forum Italiano sui Prodotti NI

annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

Quadrature encoders with DAQCard-6036E

 
     Hello,
I'm experiencing some troubles using two quadrature encoders with a NI multifunction I/O.
The encoders are Micro-Epsilon WDS-7500-P115-CR-TTL. They are incremental encoders in TTL logic. They are connected to a HP laptop running Windows XP Professional. The connection is via the multifunction I/O NI DAQCard-6036E. Each encoder is connected to the DAQ board with four wires: +5V, DGND, track A, track B. I used the system in my office for a while and everything was fine. Then I moved it in another place and now it shows a fuzzy behaviour.
I made the following tests:
Test 1) I connect track A&B to analog inputs on the DAQ card. Then I use SignalExpress v2.5 to perform a DAQmx analog input acquisition. The waveforms I get are exactly as expected.
Test 2) I connect track A to the counter source and I leave track B disconnected. I use SignalExpress v2.5 to set a DAQmx edge counter, with the "Count up" option enabled. Also this test is fine. When I pull the encoder cable I get +N counts and when I release the cable it goes back to zero position, giving other +N counts.
Test 3) I connect track A to the counter source and track B to P0.6 (or P0.7 for the second encoder), which is the pin used to control the count direction. I use SignalExpress v2.5 to set a DAQmx edge counter, with "Count up". In this way the DAQ should ignore track B and count always up. Actually it does, but the count rate in one direction is double with respect to the count rate in the other direction. This means that when I pull the encoder cable I get +N counts and when I put it back to initial position I get other +2N counts. In this way the counter indicates +3N at the end, while it should be +2N.
Test 4) I connect track A to the counter source and track B to P0.6 (or P0.7 for the second encoder). I use SignalExpress v2.5 to set an "Externally controlled" DAQmx edge counter. Now I get +N counts when I pull the encoder and -2N counts when I put it back to zero position. In this way the counter indicates -N  at the end, while it should be zero.
Test 5) I repeat test 4 using LabWindows/CVI v8.1 and I get the same result.
Test 6) I swap lines A&B. Now track B is connected to the counter source and track A goes to P0.6 (or P0.7 for the second encoder). Using SignalExpress to perform an "External controlled" count, I get +2N counts when I pull the encoder and -N counts when I put it back to zero. So, at the end the counter indicates +N, but it should be zero.
Do you have any idea on how to solve the problem? Thank you very much in advance.
 
 
=================================================================================================================================================
 
 
Hello User56,
 
I suggest you to first evaluate these documents:
 
 
And if needed consider to check if you correctly performed the wiring connections, this could provide for some additional advices.
 
 
Let me know about your system.
 
Regards

 

Matteo C.
National Instruments
Applications Engineer
 
 
=================================================================================================================================================
 
 
     Dear Logan_081,
thanks for your reply. Unfortunately, the problem is still there.
I already read http://zone.ni.com/devzone/cda/tut/p/id/4623 about quadrature encoders with NI multifunction I/O's. But what I actually get is not a problem linked to vibrations, like the ones described in the document. I re-checked the wiring as you suggested and it's ok. Also http://zone.ni.com/devzone/cda/tut/p/id/3344 was not helpful.
In the past I already experienced a problem like the one I have now. At that time I was using quadrature encoders (the same model I'm using now) supplied with an external LV PS. The only way to solve the problem was to supply the encoders with the GND and +5V provided by the multifunction I/O. Now I am using exactly these two pins, but the counter shows the strange bahaviour I explained you in my last post.
     Cheers
 
     Marco
 
 
=================================================================================================================================================
 
 

Hello Marco,

First of all, we have to be sure that your encoders are correctly configured. Did you try to contact Micro Epsilon? Maybe they could give you some advice regards to correctly configure your system. Then after verified this, we can perform the next step in evaluating your problem.

Cheers 


 

Matteo C.
National Instruments
Applications Engineer
 
 
=================================================================================================================================================
 
 
     Dear Matteo,
I just got a reply for Micro-Epsilon. The encoders work fine, so the problem must be linked to the DAQ.
1 - Is the DAQ card already set in such a way to correctly recognize encoder signals as square waves with a quarter-of-period pulse separation? If not, what functions should I call in LabWindows/CVI v8.1 to configure such a parameter (or to check the actual parameter status)?
2 - Each encoder provides 4 output lines: track A, track A inverted, track B, track B inverted. The inverted lines can be used in long transmission lines to suppress common mode noises. Is there any way to exploit this feature with my multifunction I/O NI DAQCard-6036E? Or it is necessary to combine the two signals before sending them to the card?
     Cheers
 
     Marco
 
0 Kudos
Messaggio 1 di 2
3.358Visualizzazioni
0 Kudos
Messaggio 2 di 2
3.346Visualizzazioni