Incremental encoder: reset counter on pci 6014?

I want to connect an incremental encoder with A, B and Z to a PCI 6014 card. I found some VI's for counting A and B (DAQmx->Counter->Count Digital Events; DAQmx->Counter->Measure Posititon) . However I can't figure out what to do with the Z. Is there a way to reset the counters by Z? (I am using labview 2009)
Thank you very much!

Sorry, my fault. I didn't see you have an E-Series device.
Resetting your counter with a digital trigger is possible for Counter/Timer devices but not for your PCI 6014.
You can reset the counter with DAQmx by stopping and starting the task again. You could read your Z index on a digital input, if the input goes high (or low) you could reset the counter.
DAQmx: Count Digital Events with Option to Reset Counter
http://decibel.ni.com/content/docs/DOC-6576 
I think this is the only way for the PCI 6014. Since you have to go through several software layers, the performance goes down a bit. If it is possible, i would recommend to change to a M-Series device...
Cheggers
Sascha E.
Group Leader Applications Engineering
National Instruments Switzerland

Similar Messages

  • X series PCIe-6351 encoder reset

    Hi,
    I am working on the X series PCIe-6351 encoder input by using an example gpctex4.cpp from X series DDK. It seems counting fine. However, it doesn't reset the counter even it is setup as follow:
    counter->Gi_Mode_Register.setGi_Loading_On_Gate(nC​ounter::kReloadOnStopGate, &status);
    counter->Gi_Mode_Register.setGi_Trigger_Mode_For_E​dge_Gate(nCounter::kGateLoads, &status);
    and
    counter->Gi_Counting_Mode_Register.setGi_Index_Mod​e(indexMode, &status);  //indexMode = nCounter::kIndexModeSet;
    Can anyone tell me what is wrong? Do I miss something?
    Thanks,
    Larry

    LarryL wrote:
    I am working on the X series PCIe-6351 encoder input by using an example gpctex4.cpp from X series DDK. It seems counting fine. However, it doesn't reset the counter even it is setup as follow:
    counter->Gi_Mode_Register.setGi_Loading_On_Gate(nC​ounter::kReloadOnStopGate, &status);
    counter->Gi_Mode_Register.setGi_Trigger_Mode_For_E​dge_Gate(nCounter::kGateLoads, &status);
    counter->Gi_Counting_Mode_Register.setGi_Index_Mod​e(indexMode, &status); // indexMode = nCounter::kIndexModeSet;
    Can anyone tell me what is wrong? Do I miss something?
    Just closing the loop in case others search and find this post later. Larry shared his resolution in another thread:
    X series PCIe-6351 encoder reset
    http://forums.ni.com/t5/Counter-Timer/X-series-PCIe-6351-encoder-reset/m-p/1996057#M10458
    Joe Friedchicken
    NI VirtualBench Application Software
    Get with your fellow hardware users :: [ NI's VirtualBench User Group ]
    Get with your fellow OS users :: [ NI's Linux User Group ] [ NI's OS X User Group ]
    Get with your fellow developers :: [ NI's DAQmx Base User Group ] [ NI's DDK User Group ]
    Senior Software Engineer :: Multifunction Instruments Applications Group
    Software Engineer :: Measurements RLP Group (until Mar 2014)
    Applications Engineer :: High Speed Product Group (until Sep 2008)

  • PCI-7344 motion controller encoder reset problem

    I'm using a PCI-7344 motion controller for my application. I'm currently working on simple display of position and velocity using an encoder. I am able to read the encoder pulser, but I am unable to reset it. I want the encoder pulses to be display continously till I press a reset button on the screen. After pressing the reset button on the front panel, the encoder count should become zero and start counting again till I press stop button. Kindly give me a simple example of encoder reset using push button. Thanks.
    Regards,
    Giridhar Rajan
    Cruiser Controls
    Mumbai, India

    This should do what you are looking for.  I am not at the computer that has a motion controller card in it, so I have not tested it. 
    It resets the encoders for Axis 1 and Axis 2.  Unless you have a different configuration for encoders and axes, it should work.
    Hope that this helps,
    Bob
    Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
    DISTek Integration, Inc. - NI Alliance Member
    mailto:[email protected]
    Attachments:
    Reset encoders.vi ‏66 KB

  • Hardware-t​imed counting of two TTL sources with a pair of PCI-6014's

    First, in a nutshell:  I'm trying to count TTL pulses from two photon
    detectors with short (.1-1 ms) integration times, for fluorescence
    correlation spectroscopy.  I have a  pair of PCI-6014 DAQs, each with a
    BNC breakout box.  
    First I created a LabView vi in which the counter from Dev1 outputs a
    pulsetrain of the appropriate integration time, and then Dev1/CTR0 out
    is physically routed to Dev2/PFI0 to time the acquisition of TTL pulses
    on Dev2/CTR0.   This seemed to work fine.   The vi is attached below
    (1_counter_works).
    Then I added a second counter task, using Dev2/CTR1.  Up until now
    I've
    been using a LabView vi in which I use this same idea, but with a
    software-timed loop for integration times of >5ms.  Software
    timing
    is too slow for shorter integration times, which is why I'm trying to
    use hardware timing.  But when I  add the second channel, I
    get the error "No DMA channels available", which is reasonable, I
    guess, because each pci6014 only has one DMA channel.  So then I
    tried to measure and queue the data in one loop structure, then pass it
    to a second loop structure to analyze and display the output (and
    eventually I will also update a large data array).  But I still
    get the same DMA error.  That vi is also attached below
    (2_counters_queue_notworking).  Perhaps I'm not doing the queueing
    correctly.  I also tried doing the counter measurement and
    queueing sequentially in a flat sequence, but was unsuccessful. 
    This question seems to have come up several times recently, but not
    with the exact hardware I have.  I've looked through
    this thread,
    this one, and this one,
    and haven't been able to solve the problem on my own. 
    Can anyone tell me if this is going to be possible with the hardware I have, and if so, how to go about employing queueing to
    Attachments:
    1_counter_works.vi ‏96 KB
    2_counters_queue_notworking.vi ‏134 KB

    Problem solved by adding a DAQmx channel properties step, specifying
    the data transfer mechanism as 'Interrupts' instead of 'DMA'.

  • Incremental encoder, velocity, position and direction

    hi,
    A incremental encoder(With channel A and B)
    I know that the velocity is proportionate with the frequence of the pulses and we can find the position with a simple edge count. But it's a bit difficult to find out the rotating direciton even if the principe is very evident.
    are there any exemples for these kinds of application?

    PCI-MIO-16E-1 --> DAQ-STC --> see paragraphs concerning DAQ-STC in this
    file
    Unfortunately I have never used a SC-2345. But after a short overview of its specifications, it seems that you will need one SCC-FT01 to connect the A channel to the counter source and the other to connect B to the auxiliary line that will set the direction. See schematic in the file mentionned above. So your hardware will allow you to take this measurement.
    See this example to see how to configure a DAQ-STC counter for position measurement.
    1) Simple event counting
    2) Up/down counting. Direction is given by hardware --> auxiliary line of the counter (DIO6 for counter 0 and DIO7 for counter 1)
    3) Start the counter
    4) Read periodically the counter value
    5) Reset the task when finished
    Don't be troubled by the BNC-2120. Use your SC-2345 instead. Obviously you will need to adapt the number of encoder pulses/rev to suit your encoder.
    Add a shift register to store the position from one iteration to the other and compute the difference to determine the direction.
    If you want to add the velocity, than you have two options :
    1) If the accuracy must not be very high, then you can compute it (delta position / loop time).
    2) If you need high accuracy, then it will necessary to use the second counter to measure the frequency of channel A. In order to avoid errors due to vibrations it is recommended to use the LS7084 in this case.
    As you can see here, there are 3 methods to measure a frequency.
    Obviously, the examples will not work with your DAQ-card because the 660X is a NI-TIO type counter.
    If you want to measure the velocity at the same time than the position, then you will need to use the first method (Inverse period measurement) because the others will need 2 counters. (your card has only 2 counters and one is already used for the position measurement).
    There is an example of period measurement for DAQ-STC that ships with LV (Measure Period (DAQ-STC).vi).
    1) Single period measurement
    2) Source specification --> internal timebase
    3) Gate specification --> channel A
    4) Start task
    5) Wait for one pulse on Gate. I recommend to add a timeout to not enter in an endless wait if there is no pulse.
    6) Read number of pulses of the internal timebase.
    7) Check if counter overflow
    8) Reset task
    You will need to combine both examples in one vi.
    I hope this is clear enough to help you.

  • How do I use daqmx to get encoder direction/count on E-series board?

    Hardware:
    PCI-6014
    Labview 7.1
    I have a linear actuator and wish to get distance/direction.  The
    motor has a quad encoder with phase A and B only.  I connected the
    lines according the the E-series, PFI-8 and PFI-6, and ground to
    digital ground. I then attempted to design a control with daqmx but
    failed.  I have tried the daqmx examples but none were attempting
    a reverse in direction.  Most examples given for direction change
    are for traditional daq control; i cant make a correlation on what to
    use to substite traditional daq with daqmx vi's. 
    2 questions:
    How do I use daqmx to get encoder direction/count on E-series board?
    Are there low pass filter vi's recommended for each phase connection to stabilize data?
    Thanks,
    Wayne Hilburn

    Hello Wayne,
    Take a look at the Count Digital Events.vi shipping example.  You can find this in LabVIEW by selecting Help >> Find Examples... then browsing to Hardware Input and Output >> DAQmx >> Counter Measurements >> Count Digital Events.
    If you set the "Count Direction" control to "Externally Controlled", you will be able to count up and down depending on which direction you rotate your encoder.  Make sure you wire Phase A to Ctr0 Source and Phase B to P0.6.  P0.6 is the up/down line for counter 0.
    I hope this helps.  Please let me know if you have any further questions.
    Regards,
    Sean C.

  • Encoder triggering counter capture

    Hi, I'm doing some research into how I can implement the below application. From what I've read, I'm 95% sure I can do what I want with a timer/counter card. But I figured I'd throw it out there to make sure. My application is as follows:
    I have (or will have)  a scanning head that rotates through 180 degrees across the sky. The scanning head has a mirror on it that directs light into a PMT (photon-multiplier-tube). The PMT outputs a TTL pulse every time a photon hits it (sometimes you get double hits, but we'll ignore those for now). The idea is that we want to count the number of pulses from the PMT for incremental portions of the scan. 
    The scanning head will have an incremental encoder on it, outputing a quadrature signal - which I believe can be put directly into the timer/counter card. I need it so that for say every 1 degree of motion, the PMT pulse counter resets and I get a value for the number of counts from the previous 1 degree increment. The speed of the head will NOT be constant (it will be moving slower at low elevations and faster overhead) so the counting of pulses must be synchronized to the encoder input signal. Actually, there is also the possibility that the speed will be constant, and the position increment to trigger will change. Is it possible to setup events to that it triggers at 1 degree, 2 degree, 5 degree, 11 degree, etc? Obviously this would actually be based on the encoder count (not degrees) and there would probably be ~500 events per 180 degrees. 
    So, is this doable? Can I link events to the encoder count value and have them trigger the system to capture the current count and then reset it? I don't know anything about how you setup these events, so any advice would be great!
    Thanks!

    Actually, I should take a step or two back from the brink.  I still do foresee some monkey wrenches
    if you really need dead-on hardware sync of these signals and sampling times.  However, maybe I'm
    much too quick to assume the need for that kind of dead-on sync.
    If you can approach the app by capturing "sufficient" data within and across all these position bins,
    you can probably get a very good approximation with some fairly straightforward software post-
    processing, and simple interpolation/curve fitting.  Not sure how much "sufficient" is, but likely a
    manageable amount.
    And yes, "digital change detection" is simply the ability to detect TTL transitions.  When a transition
    is detected, a pulse is generated on the board, and tasks can be configured to use that pulse to
    sync up triggers, sample clocks, or other timing signals.  Both the M-series and X-series multifunction
    boards support it.  The 6602 doesn't.  If you're going for true dead-on hardware sync, I still suspect
    you'll end up wanting the change detection feature.  If the software post-processing is good enough,
    you probably won't need it.
    One last thing: the ability to filter digital TTL signals has been improved on data acq boards over the
    years.  I suspect the X-series will give you better filtering options than the other boards but I can't
    speak from direct experience.
    -Kevin P

  • Incremental encoder Z pulse

    Hi,
    I am trying to acquire 1 pulse per rev (z pulse). I am a newbie, and can't figure this out, in this code. Can someone help me out?
    I wish to have a boolean LED clicked on every Z pulse is sensed (and off everytime the z pulse is passed). 
    I tried using MAX, but it isn't detecting the Z pulse, but it works well for A and B (DO you know why?)
    http://www.beiied.com/PDFs2/H20_Incremental_Encoder.pdf
    Attachments:
    Pressure vs CA.vi ‏87 KB

    Sorry, my fault. I didn't see you have an E-Series device.
    Resetting your counter with a digital trigger is possible for Counter/Timer devices but not for your PCI 6014.
    You can reset the counter with DAQmx by stopping and starting the task again. You could read your Z index on a digital input, if the input goes high (or low) you could reset the counter.
    DAQmx: Count Digital Events with Option to Reset Counter
    http://decibel.ni.com/content/docs/DOC-6576 
    I think this is the only way for the PCI 6014. Since you have to go through several software layers, the performance goes down a bit. If it is possible, i would recommend to change to a M-Series device...
    Cheggers
    Sascha E.
    Group Leader Applications Engineering
    National Instruments Switzerland

  • What hardware do I need to monitor the signal from an incremental encoder?

    We are trying to implement a feeding
    solution for one of our cutting machines and I’m not quite sure how to proceed. 
    I have attached a document from the NI website that outlines exactly what we are
    trying to do but does not go into detail on any of the concepts like programming
    and implementation.
    1.) We have a NI DAQPad-6015
    connected to a SC-2345 which has one SCC-CTR01 module installed.  Which this
    configuration can we read the incremental encoder signal and use to setup our
    cutting machine as outlined in the attached document?  If not what is the
    minimum amount of hardware we need to sample the signal from the incremental
    encoder and obtain both the direction and magnitude of the
    movement?
    2.) If we wanted to use the
    information obtained from the encoder and subsequently send a signal to a
    stepper motor controller or perhaps a PLC what additional hardware would be
    needed.
    Thanks,
    Chris  
    Attachments:
    Incremental Encoder Example.pdf ‏94 KB

    Hi Chris,
    For quadrature encoder measurements your
    hardware is not the ideal equipment. The 6015 doesn't provide X4
    decoding. That means, that the board counts only one raising edge of
    one phase. Still, if you connect phase A and B to the counter inputs,
    it will count up and down, depending on the direction of the axis, but
    as already mentioned, you will loose 75% of the available resolution. Here is some more information about this topic.
    The document that you are referring to recommends a PCI-6624
    and this is in fact a much better option. This board provides X4
    decoding and isolated inputs not only for phase A and B but also for
    the Z-index (not available for the 6015).
    If you need a USB-solution and if you can work with TTL voltages, you might have a look at the USB-6218, that provides isolated I/Os.
    For motion control there are various options. E. g. you could use an NI motion control device like the PCI-7332,
    but there are also options to communicate with external motion
    controllers through CANopen, RS232 or various fieldbusses. Depending on
    the solution that you choose, you may need a bus interface that
    provides support for your programming software.
    I hope that helps,
    Jochen KlierNational Instruments
    Message Edited by Jochen on 09-24-2008 09:24 AM

  • Trouble using the counter on PCI 6025E

    Hello,
    I am facing a problem with the counter on PCI 6025E. I am trying to count the number of pulses generated by the shaft encoder mounted on the shaft of a motor. I am using a channel from the shaft encoder to count the pulses and generate the line state. So, I have wired the channel to pins 25[line state]and 47[counter]on SCB-100. In my application I am using the count events/time vi from DAQ palette. Every time I run my application I have been getting the error NI 10001 saying that the ordering of the strings is not as expected.

    Hi,
    The Count Events & Time.vi is typically used with older counter hardware such as the 9513 chip. Your E Series card (6025E) uses a DAQ-STC chip. The best way to count your edges is to open up the example "Count Edges(DAQ-STC).vi which can be found by selecting Help>>Find Examples... and you will find it under the DAQ Counter examples as an DAQ-STC example. Hope that helps.
    Ron

  • How to use counter using PCI 6259

    Hello, users,
    I have a PCI 6259 board and use Labview 7.1.
    I'd like to repetitively count the photon signals at 10ms integration time. I want cumulative counts in every 1 sec (1000ms) (or 1 min (60000ms)) And I want to save counts into txt.file which is open in excel program.
    I am a beginner to use counter using PCI 6259 board.
    1. Could you explain default NI-DAQmx counter terminals, i.e., CTR 0 SRC, CTR 0 GATE, CTR 0 AUX, and CTR 0 OUT?
    2. How do I use them or how can I connect to count TTL pulse using PCI 6259?
    3. As I mention my purpose above, which example is the first step to start working my purpose?
    4. If you know good example, could you tell me about that?
    5. If anyone has labview example which is similar to my aim, could you give me some tips or your examples?
    Any hint, comment or advice would be appreciated.
    Thank you so much for your response.
    Leek2

    I have never used the PCI 6259 but have used counters many times with labview, the coding should be the same independent of the board.  What you want to do is finite buffered edge counting using a internal clock.  The best way to do this is to look at the examples programs and use the express vi to get started, then you can use this code to customize your program exactly as you need.
    To address your questions:
    1. CTR0 means "counter 0" the name of the physical resource sometimes listed at GPCTR0.  Each counter has 4 connections to the outside world:
    source "src"(for counting input TTL signals),
    gate (for synchronizing to external clocks and edges),
    out (for pulse-train out operations)
    and aux (specialty operations such as up/down counting and encoding)
    2.For event counting with internal clocking you will only use the src this is the input from the signal you wish to count (ie PMT discriminator for photon counting).
    3,4,5. Look at the count edge examples, there isn't one that does exactly what you want but I have done this with a 6602 (it has e counters) where I use one set of counters to set up a finite pulse train in your case 1000Hz with 1000 pulses, and another counter to edge count on an external pulse, with the source of this pulse routed from the out of the other counter.  Then you can start the task and read when 1000 samples are in the buffer (about 1 second later).
    Hope this helps,
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • NI Motion with incremental encoder and precise position

    I am currently working on a project that requires me to get the precise position (mesure) with an incremental encoder with 2 channels A and B. I am Using NI Motion, NI UMI-7774,NI PCI 7550, and Labview 10 

    That should work!

  • NI Motion witth incremental encoder and precise position

    I am currently working on a project that requires me to get the precise position (mesure) with an incremental encoder with 2 channels A and B. I am Using NI Motion, NI UMI-7774,NI PCI 7550, and Labview 10

    Hey that's great!
    I think you're in the wrong forum: http://forums.ni.com/t5/Motion-Control-and-Motor-Drives/bd-p/240
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Servo motor encoder pulses/counter data erroneous

    First off, I am very new to using labview.  I am trying to complete a project a former employee was working on.
    For a quick background on what I am working with, I am using a NI DAQCard-6036E connected to a SC-2345.  The SC-2345 is then connected to a load sensor, Omron R88D servo driver, and an omron servo motor.  The servo motor has a incremental encoder with a resolution of around 2048 pulses per revolution.  My labview program includes a counter that records the data from the encoder on the servo motor.  I have been able to get accurate data when testing through the measurement and automation program by manually turning the motor.  Also when running through the specific DAQ assistant I am using for my counter, I am getting correct readings when manually turning motor.  Once I run my complete program, instead of getting 2048 pulses per revolution, I am getting between 34000-36000 pulses per revolution.  The most logical assumption is that I am getting vibration in the motor itself or some sort of noise is interfering with my signal.  I first attempted to change any possible settings through the omron servo driver that might reduce any vibration in the motor.  I attempting changing the rigidity settings, turning on and off the auto-tuning function, and a few other settings specified by the user manual that might cause vibration.  If I turn the rigidity settings as low as possible, I am able to get around 2000 pulses per revolution, but the data is very sporadic. Also, my equipment needs to be very rigid, and with the lowest rigidity setting for the servo driver, I am able to almost stop the motor with minimal force.  My equipment needs to be able to travel at a near constant speed with fluctuations of up to 200 N of force.  Any suggestions on which direction I should go in finding a countermeasure? 
    Thanks
    Solved!
    Go to Solution.

    The model number of the servo motor is R88M-W10030L.  The servo motor rotates at a constant speed.  The program is designed to drive the servo motor connected to a ball screw in one direction.  Once the load sensor reaches a desired load, it will reverse at a constant speed until no load is on the sensor. Throughout, it records load vs. displacement.   I have found a few things that will alter the pulses counts.  If you apply resistive pressure on the servo motor while it is rotating, the pulse output will vary.  Also when you apply pressure to the casing of the servo motor itself, the pulses will often jump around. I was almost certain my false pulses were caused by vibration.  After have no success adjusting settings to reduce vibration(according to the user manual), I ran the program while moving around several wires to see if any were loose, etc... After applying force to the power lines and encoder cable, the program ran several times with an average of 2000 pulses per revolution and would actually subract pulses while going in reverse(what I want it to do); Although the average was around 2000 pulses per revoltion, i saw positive and negative jumps in pulse counts while traveling forward at constant speed.  Today I re-wired the equipment, seperating as many wires as possible.  After the re-wire, the equipment/program is back to sending 34000+ pulses per revolution, and does not subract pulses while reversing.  I have read the 'Using Quadrature Encoders with E Series DAQ Boards' article.  Referring to the article, I am running similar to "method 1".  I am already using a signal conditioning box, but have the counter data run directly through. Do you believe running the signals through a SCC-CTR01 might solve the problems? 

  • I want to measure rpm using 100 ppr incremental encoder via digital input

    i want to measure rpm using 100 ppr incremental encoder  via digital input max speed (4000 rpm)
    am using 9178 c-DAQ chassis and 9426 digital input module
    pl provide me example code for this

    Hi asaccullo.
    The recommended settings for encoders are using the counters in the daq cards. Using digital I/O’s is not recommended, the encoders send digital signals but one of the main differences between using digital IO vs counters is that counters are designed to handle these type of events.
    Here I found several examples in ni.com/code that you might check:
    Imitation Quadrature Encoder with DAQmx Counter Tasks
    Use Counter Frequency to obtain an Encoder Rotational Speed
    An Elvis is a daq device, so this should work for you.
    I also found an example for myDAQ, it uses the DIO but with a counter task in the set up.
    Regards,
    steve.bm
    AE | NI

Maybe you are looking for

  • KDE D-Bus Failure?

    Can somebody help me with a user-specific (or so I assume) issue where I can't run KDE apps, but if I run them as root, I can. I'm running OpenBox. Can somebody help using the error below? [jookia@jookia-ARCH ~]$ kaffeine kaffeine(18501): Communicati

  • The Cluster service is shutting down because quorum was lost

    Hi, we recently experienced the above issue and after looking for explanations I haven't been able to find any satisfying answers when other people have posted this issue. Our problem is as follows: 2 node 2008R2 cluster running SQL 2012 Each node is

  • Dual OS - 10.4.11. and 9.2 - getting rid of 9.2?

    Is there any easy way to reclaim the space currently being used on my HD by OS 9.2? I have OS 10.4.11 and no longer need OS9.2. If there is some way to delete OS 9.2 I would be interested, although I don't really want to go down the road of a complet

  • Difficulty receiving MMS messages

    MMS messages. . . photos are slooooooooooow to download to the point of not caring to even to see them. And a group message (including any related responses made my anyone in the group also using MMS) may take hours or days to come through at all. I

  • I suspect my ipad has a virus what can be done?

    We received a link from an email that suggested going to a webpage.  We went to the page and nothing seemed to be wrong.  Now the IPAD seems to be randomly going to youtube sites. is there something that can be done to isolate the issue or should I r