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

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.

  • 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

  • Using quadrature encoders with PXI-6025

    Hi!,
    We are using an encoder for position data. The encoder gives A and B pulses which are phase shifted by 90 deg.
    Grating Pitch = 40 microns
    We make the connection to our PXI-6025 as such:
    Channel A pulse goes to PFI 8 (GPCTR_Source)
    Channel B pulse goes to DIO6 (GP_Up_Down)
    Ground goes to DGND
    We are able to increment/decrement the counter on our 6025 for every 40 micron movement
    However, we are unable to quad the input and increment/decrement for every 10 microns. How do we achieve this?
    We have an electronic circuit which converts the 40 micron A and B pulse from the encoder into 4 pulses spaced at 10 microns. But, using this single pulse mode does not allow for up/down counting.
    We are using LV-7.1
    , NI-DAQ 7.2 and Win2000 prof.
    Looking forward to some quick help.
    Thanks,
    Gurdas
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu

    There's one tedious way that might work if you only need to post-process the data. However there are several possible problems.
    The idea is to perform buffered semi-period measurements with both the counters on the 6025. Once you've collected all the needed semi-period data, perform a cumulative sum of each array so you end up with timestamps for all the transitions. Then you'll need to go through them to distinguish (+) from (-) direction quadrature transitions and generate a cumulative position array.
    I don't think there's another way -- only semiperiod measurements will react to both edges of an incoming pulse train. However, it *is* possible in principle to get your 4x factor in resolution. Now for the problem list:
    1. Your 6025E only has 1 DMA channel. One of the counters will have to be configured to use interrupts, which in turn will limit the maximum encoder rate you can track. I wouldn't count on tracking better than single digits of kHz, and you may not even be able to achieve that much.
    2. The last time I did semiperiods on an E-series board, there was no way to specify which edge would mark the first recognized transition. If the input was low when you started, the first transition recorded would be a rising edge; if high, then a falling edge.
    Knowledge of the initial state of the inputs is critical for your software quadrature decoding. I think the solution I used was to parallel wire the A&B channels to a couple DIO pins which I inspected before any encoder motion started. If your encoder jitters or vibrates about its nominal position however, you're probably hosed.
    Are you sure you can't use the LS7084 to replace your other external circuit? The alternatives are either going to be trouble-prone gimmicks like I described above or the purchase of new DAQ equipment.
    If you have budget for new DAQ equipment from NI, I'd suggest you look into one of the following:
    1. Low-cost M series multi-function board
    These have 2 32-bit counters onboard that are capable of quadrature decode. Each counter gets its own DMA channel for buffered acquisition. Plus you get a bunch of analog in, timed digital i/o, and can get analog outs. The boards are $475 with 2 analog outputs, $375 with none.
    2. dedicated counter/timer board
    The 6601 is cheaper at $295, but is limited to 1 DMA channel and has a slower onboard timing clock. The 6602 costs about double that but gives you somewhat more than double capability.
    -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

  • 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 LS7083 for quadrature encoders

    I just read Application Note 084 from 7/9/1999 that recommends using an LS7083 quadrature clock converter to eliminate miscounts due to vibration at low speed on an E Series board. It makes sense from what I have read, question is: does this apply to the M Series board I am using as well - PCI6220?
    Ed

    Ed,
    True quadrature conversion is a built-in feature of the M-series boards so there should be no need for an LS7083 or similar interface circuit.
    Personal testimonial: I've been using an M-series counter connected directly to a quadrature device for several months with no miscount issues. The device is a non-contact laser interferometer that resolves at the sub-micron level, and we're getting very repeatable measurements. This in an environment where the otherwise unnoticeable air currents from normal operation of the HVAC system cause a vibration-like fluctuation in counts.
    -Kevin P.

  • RPM Measurement using Quadrature Encoder and PXI 6602 counter

    Hi,
    I am on a project at work where I need to verify the speed (in RPM) of an unloaded motor which can operate up to 1400 rpm.  After doing some research, i determined that a quadrature encoder could be used to make the measurement.  I am looking at this encoder  http://sine.ni.com/nips/cds/view/p/lang/en/nid/205321.
    I have a PXI 6602 counter/timer module in which I would like to interface to the quadrature encoder.  I would like to create a VI that allows me to calculate the speed using the encoder.  Can someone provide me with details of what needs to be in the VI or an example which can do this?  At the most basic level, i want to calculate the speed on demand.  After doing this, i would like to figure out how to quickly calculate the speed so that i can determine response time of the speed changing within sub-millisecond resolution (1 ms resolution max).
    Further, i created a VI that allows me to change the pulse width of a 100 Hz pulse train at run-time which tells the motor controller the desired speed.  I would like to be able to use this VI to change the speed of the motor and the first VI (that I am seeking help about) to calculate the response time (time between the initial speed and settling at the new setpoint).
    I am familiar with the NI example finder, but have not been able to find an example that I can use.
    Thanks,
    Gary

    Hey Gary,
    I think for you setup, you should try using the Meas Dig Frequency - Low Freq 1 ctr. You can find it by searching example finder with 'low freq'. This vi tells you the frequency of a digital signal by sampling between two pulses and inverting the time between pulses. If you hook up your encoder to a counter and have that counter specified in the vi, it will be able to give you on demand readings of frequency (you can do some multiplication to get the rpm value, freq*60/pulses per revolution of encoder). A simple way to take continuous readings is to put a while loop around the daqmx read and the data output of the read. You can also replace the numeric indicator to a waveform chart to graphically display the change of frequency or rpm readings over time.
    You should be able to integrate this as two separate tasks with the pulse train vi you created earlier.
    Hope this helps
    Luke W

  • Measuring distance using quadrature encoder

    I am currently doing a project that requires the positioning and characterization of TV signals. As such, the position of the TV receiver is one  important variable that i have to measure. I am required to automate the measurements and data logging using a PC/notebook. I have purchased a 2-channel HEDS-9000 quadrature encoder with 2000 CPR & the HEDS6120 codewheel - both from Avago Tech, to be interfaced with the notebook/PC. My idea is to get a TTL-to-RS232-to-USB converter to interface with the PC, so that i can feed the output from the encoder to the PC. However, i dun have much idea on how I can use LabView to interface the encoder and the PC. Can anyone offer some valuable advice?
    Btw, the encoder module consists of 5 pins - Vcc, GND, CH.A, CH.B, with one pin not used.
    Thanks !!

    Hi,
    I think one of the best and reliable options that should meet your needs is a bus-powered USB-M-Series device like the USB-6210.
    The USB-6210 is a multifunction data acquisition device with 16 analog inputs, 4 digital inputs, 4 digital outputs and 2 counters. Each of the counters can interface directly to the quadrature encoder signals of your HEDS-9000.
    It's very easy to use this device with the NI-DAQmx API for position measurements in LabVIEW. In fact there are some shipping examples that you can use for getting started.
    I hope this helps,
    Jochen Klier
    National Instruments Germany
    Message Edited by Jochen on 02-09-2007 09:18 AM

  • Error use quadrature encoder to count optical mouse position

    Hello, PRO
    Can U explain me how count pulses from optical mouse? I have 2
    quadrature signals (as said in document about Quadrature measure in Edevices
    I connected XA to PFI8/GPCTR0_source, XB - DIO6...and digital ground to the
    DGND).
    I used sample "STCcountWithHWDirControl.C" to count pulses. This sample
    was developed for device with DAQ-STC counting/timer... :-)
    But result of counting = 0. Where is mistake?
    One detail (maybe it help): I connected XA to analog input and read values. This pulse had 0.1volt amplitude , but when I measure voltage between XA and DGND by a oscilloscope. It was 5V.
    Sincerely
    Spivot
    P.S.
    NI Software : Measurement Studio for Visual C++ version VC++ with NI-DA
    Q 6.9.1
    NI Hardware : Multifunction DAQ device DAQPAD-6020E

    Hello;
    The first thing you should test is if the pulses can be counted at all by the general purpose counters of your device. The way to go about that is to connect the pulse to the source of one of the counters and run the simpleeventcount.c example.
    If even that example doesn't work, you will need to condition the pulses before going to the counter.
    Hope this helps.
    Filipe A.
    Applications Engineer
    National Instruments

  • Need to use quadrature encoder to trigger (RTSI) single point DAQ on 2 channels of E-Series DAQ, using 6602 NI-TIO for counting encoder pulses.

    This is for LV6i, W2000, all PCI equipment.
    Using a quadrature-measure position-VI, I get 7200 edges/rev from the encoder of my physical system. This equates to 0.05 degrees of angular displacement. This amounts to an angle stamp as opposed to a time stamp.
    I need each of these 7200 edges (source: 6602 NI-TIO) to trigger (using RTSI) the acquisition of a single sample from each of 2 channels on an E-Series DAQ board (maybe more channels later). I only need/want one rev (7200 samples per channel) of data for each run of the test. As I write this I think I want pre-triggering and a little more than a rev of data. So the
    re is a buffering step. Anyway, you can get the idea.
    I need this angle stamp and the DAQ samples to be placed in an array and on the hard drive for graphing and other mathematical treatment, analysis, etc.
    I think there must be a way to use the quadrature output of the counter/timer as a scan clock for the DAQ board, but I haven't seen an example to guide me.
    It seems like all of the RTSI or other triggering examples I have seen trigger once to start a continuous scan, not a series of discrete samples repeated quickly. I am not sure how to fill an array with this data. Again, examples are for continuous sampling, not a series of discrete readings.
    Any hints on any part of this task will greatly appreciated. This is my first LV project.

    Sounds like a fairly ambitious first project!
    I assume your 7200 edges/rev come from an encoder with 2 channels in quadrature which each provide 1800 cycles/rev. You can clock in analog data at 1800 scans/rev with either of the two encoder channels, but will probably need an external quadrature decoder circuit to produce 7200 scans/rev. Either method can be done with screwdriver and wire or else by using another counter from the 6602 and the RTSI bus. Here are two approaches in detail, but you could mix-and-match as needed.
    Note also that if you can be sure that your reference encoder will be uni-directional, you wouldn't need to measure position -- position could be determined by the array index of the analog scan data. This would simplify things greatly.
    1800 scans/rev, screwdriver & wire
    Wire both encoder channels to your 6602 breakout box and configure your counter for the 4x quadrature option. Send a wire from one of the encoder channel connections at your 6602 breakout box to a PFI pin at your E-series board breakout box. Config the analog acquisition to use an external scan clock and specify the correct PFI pin -- there are built-in examples that will guide you. Now one edge of one encoder channel acts as a scan clock for your analog acquisition. Inside the 6602 breakout box, route the same signal to one of the default gate pins and configure your encoder counter gate to use that pin as its gate signal. Note that there will be a race condition governing whether the encoder value updates from the encoder inputs before or after the value is latched by the gate.
    7200 scans/rev, extra counter & RTSI
    Make sure you have a RTSI connector between your two acquisition boards inside your PC. Build a quadrature decoder circuit that will convert your two encoder channels into a clock and direction output. (Consider the LSI 7084 decoder chip or similar). Setup your "encoder" counter for buffered position measurement. Use "Counter Set Attribute" to define "up down" as "digital" (don't use it to define "encoder type"). The clock output goes to the counter SOURCE and the direction output goes to the counter UP_DOWN pin.
    Use "Adjacent Counters.vi" to identify the counter considered adjacent to your encoder counter. Configure it for "retriggerable pulse generation". Use "Counter Gate (NI-TIO).vi" to specify "other counter source" as the gating signal. Configure the output pulse specs to be short duration (make sure total of delay + pulse width is less than the minimum period of the incoming encoder clock signals). Use "Route Signal.vi" to send this counter's output onto the RTSI bus, say RTSI 0.
    Now configure the analog acq. to use RTSI 0 as its external scan clock. Also configure the encoder counter to use RTSI 0 as its gate signal. Voila! Now your quadrature decoder clock output acts as a scan clock for analog acquisition and a "gate" to buffer your encoder measurement. The short delay helps ensure that the clock updates the position measurement before the gate fires to latch the value.
    Respond if you need clearer explanation. There's a fair amount of decent info "out there" if you scour the online help and this website. Good luck!

  • Using hardware encoders

    I was wondering if anybody, who like me is fed up with Compressor and BitVice taking forever to encode, and has given thought or action to buying a hardware DVD recorder, and then demuxing the Video_TS with MPEGStreamclip (or similar demuxer), and then authoring the resulting contents in DVDSP.
    Seems to me, that if the hardware encoding is of good quality, that this is really the way to go.
    I'm looking at a few DVD recorders from Panasonic, LG, Samsung, etc. (for around $130 to $200) that have a firewire input. I could play right out of FCP or Avid XP into one of these guys, and save a LOT of time. Seems like one of these boxes would pay for itself on the first job, when you consider the time your computer is tied up transcoding MPEG files.
    The main question I have is the quality of encoding. I get stellar results with BitVice, but it is way slow.
    Does anybody here have any experience with this scenario, and if so, what advice or gotcha's can you advise upon? Or, if you've had great results with any particular DVD recorder, I'd love to get your opinions on that, too.

    Thank you, Gary. I didn't know about the Firewire/camera thing, and that info is especially helpful.
    One problem I'm having now is I'm cutting a feature that has freeze frames in it, which completely screws up the Fast Encode setting in Compressor. After my intentional freezes, Compressor does it's own freeze on the incoming frame (a cut up from black) for a second or two. Totally messes up the flow. When I do a 2-pass VBR encode in BitVice, this problem is solved (Compressor's High Quality encode still has the freeze problem, but less so.), but it takes twenty hours to encode my 97 minute show on a dual 800 G4.
    Do you know if the hardware encoders deal with freeze frames better?
    Since I'm nearing completion on this film, I have to make a new DVD with each round of changes, and this transcoding issue is a real problem. Even if the hardware encodes weren't perfect, it may be a good solution for my temp review DVDs.

  • 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

  • How to do quadrature decoding using DAQCard6062E?

    Hi,
    My name is Xiaofei, a beginner of LabVIEW. Now i am dealing with a project involving quadrature decoding by using DAQ Card 6062E and breakout board CB68LP. We need to use 2 optical encoders simutaneously, and for each encoder, we need to use 3 digital channels (A,B and Index), therefore there will be totally 6 digital channels in use. For this reason, is it still good to use the counter channel? or we'd better use 6 DIO?
    I'm not sure if there is any existing VI that can help us with decoding, if there is,  could you please let me know how we can find it?
    If we will need to make the decoding code by ourselves, could you please give me some hint so that we can start it?
    I heard that there should be an example called "How to Count.vi" that shows how to decode, however i failed to find it by using example finder, so does anyone know how to find it?
    Thanks a million!!!
    Regards,
    Xiaofei

    Hi Xiaofei,
    Our 6062E DAQ cards can be used with either our DAQmx drivers or our older
    Traditional DAQ (Legacy) drivers.  The example that I've provide below is
    for use with our DAQmx driver set.  If you’re using Traditional DAQ
    drivers I would recommend upgrading to our newest DAQmx drivers.  You can
    click here
    for help determining what version of DAQmx works with your version of LabVIEW.
    To do hardware timed quadrature encoder applications you will want to use the
    counters on your 6062E DAQ card.  Click here for a guide to
    using quadrature encoders on E-series DAQ cards.  Unfortunately, our
    E-Series cards do not support Z-indexing as described in the following
    developer zone tutorial: Quadrature
    Encoder / Position Measurement.  However, you should be able to use
    your encoders without using  Z-indexing.  Each of your encoders will
    use one counter source and one digital line for your A and B inputs.  The
    counters will count the edges of the A input while the digital line determines
    the direction (Up or Down).  A good example can be in the example finder
    under the following location: (Help » Find Examples » Hardware Input and Ouput
    » DAQmx » Counter Measurements » Count Digital Events » Count Digital Events.vi). 
    This example should give you a good start for use with encoder.  You will
    just want to replicate the code for your additional encoder.
    I hope this helps,
    Paul C.

  • Using PCI-6025E with quadrature encoder.

    Hi,
    i'm presently trying to figure out if i can use the PCI-6025E Card to count up/down with a quadrature encoder with no additionnal hardware. I know my answer lies in a document called "Using Quadrature Encoders with E Series DAQ Boards document " but it is not presently available on the ni website.
    Can any1 either confirm me that i can do this or send me the document?
    Thank you,
    Max

    This link seems to confirm that you can
    Link
    Randall Pursley

Maybe you are looking for

  • Nighttime Notification Setting

    How do I set my iPhone to still ring or notify me of phone calls and text messages, in case of an emergency, but shut off the notifications for things like Facebook and Twitter? I've turned off notifications, but they still seem to be coming through.

  • How to avoid the dialog box "SAVE, Open, Cancel" When we take a pdf print.

    I have an item entry form. User select different items and then submit the order by pressing submit button. I want that when the user click the submit button he is directet to the print preview page. I have done that and it is running fine but the is

  • Help with volume and screen rotation.

    Having trouble with volume and rotation. I have gone through the setting and made changes to lock screen and mute, but now it seems I have to choose between the two.  The switch on the side also is not working.  Any suggestions?

  • PDF Password Protection Help

    I need help password protecting my document. The security method restrictions aren't allowing me to encrypt the document and I need the encryption because the job application is with the Department of Homeland Security. Please Help Me!!!

  • Can I use Forms 9i Service

    HI, Can I configure/call external forms application Developed in 6i version from Portal(using URL based calling in Portal), My concern is , as 9i Application Server uses Forms 9i Service, will there be any conflict. Thanks Ravi