Quadrature Encoders and a NI6601 Card

We need to measure the rotation direction and speed of a rotating shaft in both directions (+ve and -ve) and we are unsure of where the encoder lines should be wired.

Hello Bill Stonier,
Thank you for contacting National Instruments.
How are you reading your measurements? Are you using LabVIEW? If so, what version are you using?
You can measure rotational speed and direction in LabVIEW by using two different counters with different DAQmx tasks. In Measurement and Automation Explorer (MAX) set up one task/counter for edge counting (up and down) and the other task/counter for frequency measurement. You must have LabVIEW 7.0 to take advantage of DAQmx.
For edge counting (up and down) you must wire the A pulse output from your encoder to the source of your counter. B gets wired to the counter gate.
For frequency measurement, wire the A output to the gate of your second counter. The source will be internal
ly wired to a pulse train of a known frequency.
To determine direction of rotation, a case structure is used which outputs positive velocity for counter-clockwise rotation and negative velocity for clockwise rotation.
See the attached example VI.
I hope this helps.
Sean C.
Applications Engineer
National Instruments
Attachments:
Rotational_VI.vi ‏52 KB

Similar Messages

  • Wrong results using quadrature encoders with NI 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.

    A few things:
    1. I'm not from NI and won't try to speak for them.  But I don't believe these forums are meant as a primary means of support, probably not an *official* means of support at all.  Most of the folks here (like me) are NI's more-or-less satisfied customers, not employees.   If you buy a service contract, you can get instant phone support.  If you rely on free support from the forums, I think you'll get good help most of the time, but there's just no guarantee. 
    2. "I just got a [email] reply from MicroEpsilon.  The encoders work fine."   Um.  Based on what, exactly?  Of *course* they will expect their own stuff to be just fine, and in fact I very much suspect they're right.  But NI will expect their board to be just fine, and I expect they're right too.  Or at least it was fine *before* you hooked things up.  Leading us to #3.
    3.  Part of the app note on Quad Encoders on E-series boards warns against connecting differential encoder outputs directly to your board.  I think it mentions that a 24V differential (for example) can damage the board.  But even a low-voltage differential signal isn't electrically *compatible* with your counter inputs.  Your first posting claimed that the encoders produced TTL.  Your June 30 post referred to inverted A and B signals for rejecting common mode noise over long transmission lines.  These are classic code words that scream "differential output", *not* TTL.  So now we can start addressing some specific tech issues.
    4. Your E-series board is not inherently capable of handling true quadrature, as the app note says.  (The newer M-series multifunction boards *do* have the capability.)  You can get kinda sorta close, but you'll be at risk of count errors due to direction changes or during vibrations when otherwise stationary.
    5. You will also need some type of differential to TTL conversion on your (A, /A) and (B, /B) pairs.
    6. You will need a common "ground" reference for all your digital signals (probably not a true earth ground).  So the ground for your conversion circuit and its TTL outputs must be tied to your DAQ board digital ground.  Also the return terminal from any related external power supply.  Sounds like failure to do this had been an issue with a past implementation of yours so perhaps it's an additional factor at play this time too?
    7.  What are you trying to measure?  For what purpose?  What decision is made from the data?  How much do you care about its accuracy?  These are leading questions, but I'm suggesting that meeting schedule with an unreliable app that produces untrustworthy data just might not be the best goal to strive for right now.  If you care to maintain accurate position count despite direction changes or vibrations, you *need* something more than your E-series board.  If you want reliable edge counting operation with *any* DAQ board, you *need* electrically compatible signals.
    -Kevin P.

  • Huge latency reading quadrature encoders

    I'm using a PCI-6601 to read two quadrature encoders on a pan-tilt mechanism. The software uses the DAQmx C interface and polls the encoder positions at 200Hz. The problem is that there appears to be a huge latency on the order of ~50msec between when the encoders move and when the positions being read out reflect the movement. That can't be normal.... is it?
    I am able to get data off the DAQ at the 200Hz rate, and the values all look reasonable except that they're time delayed by the aforementioned 50ms. So I'm getting a resolution of at least 5ms, just time-shifted. The first thought was that the values were being buffered somehow, but there doesn't appear to be any buffer, at least that I can find. As I understand it quadrature input shouldn't be being buffered in the first place, and in any case a buffer should be read out with the call to DAQmxReadCounterF64 (the DAQ returns only 1 value), and indeed explicitly setting the input buffer via DAQmxCfgInputBuffer does nothing. 
    To double check the results I tested NI's sample code for reading quadrature encoders (http://zone.ni.com/devzone/cda/epd/p/id/5735) and I get the same latency (minus the ~5ms that was caused by the 200Hz timer, as the sample code polls in a tight loop.)
    Any idea of what might be going on here?
    Thanks!
    Gene

    Hi Gene,
    I just wanted to make sure you were indeed using DAQmx (since you linked the DAQmx Base example).  I might expect the DAQmx Base version of the code to take longer to execute, but re-reading your post it sounds like the problem isn't with the code keeping up but rather that the values themselves are delayed by ~50 ms.
    A buffer would only be allocated if you configure sample clock timing on your encoder task.  The example you linked doesn't do this, so I'll assume your code doesn't either.  It's probably worth noting that you can configure a hardware-timed sample clock so you can deterministically sample the count register at regular intervals, but this isn't going to help with latency.
    So taking a step back for a moment, I am now curious on how you are measuring the 50 ms latency.  To verify a 50 ms delay would require measuring the actual time difference between the start of the counter task and the first pulse of the encoder and then comparing the measured time with the time you are seeing in software (assuming ~5 ms per sample from your 200 Hz polling loop).  I would not expect a 50 ms latency in your measurement, so it's probably worth elaborating on exactly what you are seeing and how you are characterizing it.
    Best Regards,
    John Passiak

  • Measure Angular Position using quadrature encoders

    Hi I’m new to LabView and NI and would like to know whether the angular position, measured using two quadrature encoders can be measured (and interfaced with LabView) using the following National Instruments hardware:
    NI cRIO-9014 (CompactRIO Real-Time Controller)
    NI-9403
    NI-9215
    NI-9263
    If it can be done I would really appreciate some pointers or suggestions of how to start either setting the hardware up or writing the LabView program.
    Many Thanks
    Alex

    Hi Alex
    Welcome to the world of LabVIEW and NI. You're off to a great start with the hardware and software that you already have. It sounds like you just need a bit of extra knowledge to get you started. A great place to look for help is in the LabVIEW  Find Examples.. This can be found on the LabVIEW splash screen pictured in the attached image.
    For your specific set up I would also suggest navigating to the following links:
    NI CompactRIO Starter Kit and Hardware Setup Wizard Frequently Asked Questions (FAQ)
    It may well be an idea for you to attend one of our customer education courses which would really give you a headstart in your application. Information regarding this can be found here:
    LabVIEW Real-Time training
    I hope this information is of some help to get you started.
    Kind regards,
    Daniel T
    Applications Engineer
    National Instruments UK & Ireland
    Attachments:
    Find examples.PNG ‏253 KB

  • 3 quadrature encoders on one 9411

    I'm trying to read three quadrature encoders using a 9411 in a cDAQ. In the cDAQ is a 9437 reading a load cell.
    Sample rate is set to 1613 HZ, and the counters use the cDAQ/ai_clock .
    Reading one encoder on DI0a/DI1a, I have no problems. As soon as I add a second encoder on DI2a/DI3a, I begin to get strange results. It's as if the position skips or jumps occasionally.
    I guess before I start troubleshooting I'm wondering if there is any reason I should not be able to measure three quad encoders using the 9411.
    The three encoder readings are three different tasks. Perhaps I should make them one task? These tasks are all read in a loop, 20 readings at a time, but they're reading in parallel.
    Using LV2013, Win 7.
    Hoping to get some advice on the code.
    Jeff
    Attachments:
    Hole Punch Tilt Measure Fixture.zip ‏119 KB

    Sure! Keep in mind that I'm not a pro at Labview. See if this works for you. Should be in 2011
    Attachments:
    Hole Punch Tilt Measure 2011 Folder.zip ‏110 KB

  • Using Quadrature encoders

    Hi,
    I'm using a quadrature encoders with a PCI6025E board to measure an angle,
    I want to use the COUNTER1 so I have connected line A of the encoder to PFI_3 and Line B of the encoder to LINE DIO7.
    I have configure the 6025E with this code to read the counter 1 value :
    status = GPCTR_Control(1, ND_COUNTER_1, ND_RESET);
    status = GPCTR_Set_Application(1, ND_COUNTER_1, ND_SIMPLE_EVENT_CNT);
    status = GPCTR_Change_Parameter(1, ND_COUNTER_1, ND_SOURCE, ND_PFI_3);
    status = GPCTR_Change_Parameter(1, ND_COUNTER_1, ND_UP_DOWN,ND_HARDWARE);
    status = GPCTR_Control(1, ND_COUNTER_1, ND_PROGRAM);
    All the status code return by this functions are 0 and so OK.
    But when I Get the counter value with GPCTR_Wathch().
    When i tur
    n the encoder in one way it count up well, but when i turn the encoder in the other way (down) I read a count that is is two times more than the count up (count down = 2 * count up) !!!!
    Does someone have meet this problem before?
    Any solution to solve this problem ?
    Thanks.
    dpasssounaud

    Hello,
    Your programmation seems to be OK. And the connections too.
    Please, test the program in the attached file and tell me about the results.
    Sanaa T
    National Instruments
    Attachments:
    Mes_Ang.zip ‏5 KB

  • I want to remove all of my photos out of iPhoto there are approximately 35000 some imported from an old hard drive and a SD Card from my Nikon D500 how do I do this

    I want to remove all of my photos out of iPhoto there are approximately 35000 some imported from an old hard drive and a SD Card from my Nikon D500 how do I do this?
    I have iPhoto version 9.1.5 (615)
    Mac OS X version 10.6.8
    I want to do this because when I imported from my old hard drive there was an error message stating that 12 photos were not imported as the programm did not recognise the format even though they were jpegs like the other photos in that particular album. The dates of the photo folders are wrong I have multiple copies of photos and every time I start iPhoto I get the following message 12 photos have been found in the iPhoto library that were not imported would you like to import them No or Yes
    if you press Yes the same message comes back again and if you press Yes again the program flicks to last import for 2 seconds and then opens events.
    if you press No the message The photos have been placed in the folder/user/judith/pictures/iphoto Library recovered photos then if you press OK the original message 12 photos have been found.............
    if you press No at this point the message The photos have been placed in the folder/user /judith/pictures/iphoto Library recovered photos_11 the end number goes up by 1 every time you go through this process
    Any help would be greatly appreciated

    Did you import an iPhoto Library from the old Hard Drive? Do you still have that old Library?
    The way to clear out a Library is to Export the photos - Apps like iPhoto2Disk or PhotoShare will help you export to a Folder tree matching your Events.
    For the annoying start-up message:
    Go to your Pictures Folder and find the iPhoto Library there. Right (or Control-) Click on the icon and select 'Show Package Contents'. A finder window will open with the Library exposed.
    Look there for a Folder called 'Import' or 'Importing'.
    Drag it to the Desktop. *Make no other changes*.
    Start iPhoto. Does that help?
    If it does then look inside that folder on your desktop. Does it contain anything you want? If not you can trash the folder.

  • Updated to iso7 and now credit card will not work with itunes account. What is going on?

    When I updated to iso7 my credit card information for my iTunes account is no longer valid. Tried to update my credit card information and it will not allow my current and valid credit card to be used and will not accept any of my other valid credit cards to be used.
    What is going on? Am I missing something or is apple hijacking my paid for accounts again?

    Hi paul.labiche,
    When having iTunes Store connectivity issues, the following articles provide the best solutions:
    Can't connect to the iTunes Store
    http://support.apple.com/kb/TS1368
    iTunes: Advanced iTunes Store troubleshooting
    http://support.apple.com/kb/TS3297
    Thanks,
    Matt M.

  • I just bought this iPad today any I set up my iTunes account and I purchased a app store card and a iTunes card but when I try to dowload stuff it won't let me what's the problem

    Need help please I just bought this iPad today and I factory reset it and then I plugged into my laptop and downloaded the latest software I went and purchased a app store card and a iTunes card but when I try to download apps it won't let me if anyone can help with this problem it would be greatly appreciated. Thanks in advance. Antawn

    Hello Tntingey,
    The gift card you've given your father must be redeemed via the steps below.
    Redeeming iTunes Gift Cards and content codes
    http://support.apple.com/en-us/HT201209
    Cheers,
    Allen

  • I have a mid 2007 MacBook Pro with 2GB of RAM and NVIDIA GeForce 8600M graphics. Is it possible to upgrade the RAM and the graphics card?

    I have a mid 2007 MacBook Pro with 2GB of RAM and NVIDIA GeForce 8600M graphics card. Is it possible to upgrade the RAM and the graphics card?

    The RAM can be upgraded as indicated below. The Graphics card can not be upgraded.
    Maximum Memory
    6.0 GB (Actual) 4.0 GB (Apple)
    Memory Slots
    2 - 200-pin PC2-5300 (667MHz) DDR2 SO-DIMM

  • Problem with NEO2 and sata controller card

    1.Product Type: MSI K8N Neo2 Platinum (MS-7025)
    and the controller card is a InnoVision DM-8301 and the hard drive is a Seagate ST3320620AS
    2.BIOS version: The newest one, 1C0 or something.
    3.External VGA Type: Geforce 6800 GT
    4.CPU Type: AMD 64 3500+
    5.Memory Type: G Skill ZX 2048mb.
    6.Power Supply Type:
    7.Operating System: Xp Pro
    8.Problem Description:
    Hello. I have a strange problem with my controllercard. I wrote this text to InnoVision suport and they send me files and bios updates for a whole week and it was still the same problem. And then i tried the card in an older computer and everything worked fine.
    I wrote
    "Hello. I got some problems with my new controller card. I can find my new harddrive ,that's conected to the controller card, when iam inside windows and it's seems to be no problem. I can look on every seting on it and everywhere i look i can read "No problem". I Also did some test with the seatools programe and everything was fine. But when i schould copy files to it the coumputer start lagging after a few seconds and i cant do anything. After a while i can move the mouse around but the it laggs again. My computer is overclocked at the time but i have tried to use the harddrive when it's not clocked also. Also when im goin in to teh controlpanel and starts the setings for Sillicon Images sata controll and have music on my computer, the music laggs for a very very short moment. Something must be wrong and i can not find it."
    It's still the same problem in my computer. The older computer had a MSI moderboard with a VIA chip and i have a nForce 3. InnoVison said i should talk to you about this problem. I have 3 harddrives but i use this controllercard because i want to have my computer overclocked and then i can't use 2 of the sata ports as i think you know.
    I would be very thankful if you could help me with this problem.
    //Martin

    I've used a noname SATA pci card (non raid) with SIL3112 on my neo2 without problems with 1C bios.
    Think you may try with a disk lower than 48bitLBA need (137GB barrier), eg a 120GB disk
    Quote:
     have the InnoVision EIO DM-8301 and had alot of problems using it with WD 160MB SATA drive.
    I am using Intel 865 based MB with 2 original SATA channels. The original SATA channels are bootable.
    I could not used the EIO card with 160G HDD. The whole setup is working only after I connected oine of my 120G Segate SATA HDD to the EIO Sata card.
    I think this card do not properly support HDD above 120G.
    Please respond to: [email protected]
    http://www.devhardware.com/forums/storage-devices-80/sata-as-boot-20080-2.html
    Btw: you have xp sp2 ?
    48bitLBA is not enabled in the first version.
    http://www.48bitlba.com/winxp.htm
    Edit:
    Here's another with complete different setup and same problems
    http://forum.tweakxp.com/forum/Topic212148-4-1.aspx
    I doubt it has anything to do with your motherboard and/or bios.
    Btw: I looked at innovision and their drivers in download area are very old.
    Get the latest SIL3112 drivers for XP here:
    http://www.siliconimage.com/support/supportsearchresults.aspx?pid=63&cid=3&ctid=2&osid=4&
    And remember 3112 is sata150 only , so it's not sure it will work with your drive at all .
    Anyway it should be set to fixed sata1.5G with jumper - not certain the controller can autonegotiate
    without trouble. You cannot have command queing enabled either , disk support only NCQ and controller TCQ
    so having command queing set ON will cause major conflicts in data transfers.

  • Is it worthy to buy a Zen with 2Gb and a SD card of 4 or is it better to buy a Zen with 4

    Hi.
    I'm thinking on buying a Zen, but i'm a bit confused on the issue of if is it better to buy a Zen with 4Gb or a Zen with 2Gb and a SD card with 4Gb, because the diference on the pricefrom the 2Gb to the 4Gb fits a SD card with 4Gb, and will result in a Zen with 6Gb...
    Does the zen works fine with the reading times of the SD cards? Or does the performance drops when reading from the card?
    I would apreciate your experience/knowing opinions.
    Thanks
    BM

    Ask that question here.http://epizenter.net/e07_plugins/forum/forum.php

  • HT204266 I used several apple and iTunes gift cards on my account with relevant codes.  How can I verify all cards have been used when total purchases don't line up?

    I have used several apple app and itunes gift cards to purchase apps and music with no problem.  Codes were entered as required.  Is it possible to get a printout of the card amount and codes to check against purchases.  My total is not jiving.

    No, you can't see a list of card redemptions, nor how items were billed - all you can do is view your account's purchase history via your computer's iTunes : log into your account on your computer's iTunes via the Store > View Account menu option, you should then see a Purchase History section with a 'see all' link to the right of it. Click on that and you should then see a list of your purchases.

  • I bought an iPad and an iTunes card, I want to buy an application from the Apps store but it only gives me the option of credit card.  How can I buy Pages with my iTunes card to my iPad? thank you

    I bought an iPad and an iTunes card, I want to buy an application from the Apps store but it only gives me the option of credit card.  How can I buy Pages with my iTunes card to my iPad? thank you

    Have you redeemed your iTunes card to an account associated with an Apple ID?
    Once you have your iPad associated with an Apple ID AND you have an account with a credit card associated with the same Apple ID AND you have some 'store credit' (from redeeming your iTunes card) then purchases use the store credit before they charge the credit card, so you should be ok!
    Personally, I use 'store credit' as a way to monitor whether or not there have been any 'unauthorised' purchases because as soon as the store credit is zero, the security code from the credit card is needed for further purchases!  It does mean that I have sometimes to top up store credit before making a purchase, but 'better safe than sorry'! 

  • I have an itunes account in Euro. I received iTunes and AppStore Gift Cards in $US. How can I use these on the same iWhatever?

    I have an itunes account in Euro. I received iTunes and AppStore Gift Cards in $US. How can I use these on the same iWhatever and keep together music/apps bought in the 2 currencies?
    Thx

    Barbara Hunt wrote:
    Would it be possible for me to download iTunes in Parallels and get the files into that and then onto my iPod?
    Yes, you can download iTunes for Windows using Parallels. If planning on making purchases here and/or authorizing already purchased tracks (from your Mac iTunes library), you are permitted to authorize five (5) computers as per iTunes Store terms of use, regardless of computing platform. No need to create a separate new iTunes Store account.
    However, judging from what you would like to do, your best bet would be to convert the WMAs to AAC/MP3 in iTunes-Windows (iTunes-Mac cannot import WMA files), and drag the files from the Parallels window to your desktop to add to the iTunes-Mac library. (as the iPod itself is currently linked to your iTunes-Mac library)
    Hope this helps,
    Steve

Maybe you are looking for