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

Similar Messages

  • 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

  • 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!

  • 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

  • Optical Mouse problem

    I use a Microsoft Intelli Wheel Optical Mouse; wired through the USB port on my Apple keyboard.  Recently the mouse keeps 'disconnecting' - an occasional latency in use, and then it dies (stops working and the light goes out)- but is OK if I unplug it and reconnect.  I've downloaded the latest driver without success. Anyone else have this problem and know what the issue is? I'd rather not have to buy another just to see if the mouse is at fault. 

    Yes, I should have mentioned I've already tried that and it makes no difference.

  • Logitech cordless optical mouse & MSI k7D-master

    Hi,
    just wanted to know if someone is using a logitech cordless and optical mouse around and a MSI
    K7D-MASTER???
    I bought one last week and put it to work, pretty nice invention I said!!!!!
    it was functioning pretty well, comfortable i´d say, until that moment!!!!!!!!!!!!!!!!!!!!!!!!!! ;(  :O  X(  8o  ?(  X(  
    X(  ;(  ;(  ;(   ;(  ;(  ;(  ;(  ;(
    The moment i decided to install the st*pid software bundle it has!!!!
    MOUSEWARE 9.41.1 (windows) for Microsoft Windows:
    XP, Me, 2000, 98, 95, NT 4.0
    this machine runs 2 processors (athlons MP)& Wxp PRO.
    I installed the software like i always do it ( put it into my cdrw and appeared the install screen) i was prompted to install the mouse software & music match too, i did it.
    My machine is as follows:
    K7D MASTER-L
    2 Athlons MP 1600+
    1024 Mb ddr ecc registered Kingston
    4-80 Gb IDE barracuda 7200 rpm UATA 100 (0+4)
    1-19 gb SCSI barracuda 7200 rpm ultra 160
    Adaptec SCSI card 29160
    Pomise Fast track 100 RAID card,0,1,0+1,JBOD
    Geforce 4 Ti 4400
    Sound Blaster Audigy Platinum (shuld listen how it sounds!)
    Nec USB 2.0 card
    Creative Encore dvd decoder card
    2 Lite On cd rw 32*12*40
    1 hp scsi 9600 cd rw 12*8*32 external
    1 creative dvd 12 encore (reg 1 set)
    Intel SC-5000 SERVER CASE (modified)
    Pinnacle DV 500 DVD video capturer
    Cirrus Logic serenum external modem
    WinXP PRO
    Linux Suse 8.0 (dual boot)
    Then i was prompted to restart my machine....i did it.
    then the post, the fasttrak bios, the scsi card bios, everything that my machine runs before starting..........finally the WINDOWS XP PRO screen booting up...........then suddenly a BSOD (blue screen of death), telling me that it was stopping due to new installed software or hardware, blah, blah blah stop at code 0x93c3487…. !!!....................................... ......................... 8o  8o  8o  8o  8o  8o  ?(  ?(  ?(  ?(
    what the hell??????????????!!!!!!!!!!!!!!!!!!!
    restarted my system and entered in safe mode..........run uninstall mouseware and everything i installed.
    again the post, the fasttrak bios, the scsi card bios......booted up and enter in windows like i normally do.
    I wanted to restart my system once and did it, but when it restarted a small st*pid window suddenly appeared telling me i have lost my profile just like this:
    "Windows cannot load your profile because it may be corrupted. Contact your administrator. "
    “Windows cannot find the local profile and is logging you on with a temporary profile. Changes you make to this profile will be lost when you log off”
    “seconds until you are logged into a temporary profile…………30,29,28,27,…..,2,1,0”
    it logged in ……………………all my icons, where were them????????
    My programs, my work ?????????????????????????!!!!!!!!!!!!!!!!!!!!aaaaahhhhhhh!!!!
    I was insane, insane, insane!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ;(  ;(  ;(  ;(  8o  8o  8o  8o  ;(  ;(  ;(  ?(  ?(  8o  :O  :O  :O  :O  :O  ;(  ;(  ;(  ;(  ;(  ;(  ;(  ;(  ;(
    I decided to use system restore…..it functioned. I have everything back  )  )  )  )  )  )
    I think Wxp pro, 2 processors & mouseware from Logitech are not good combination!
    Logitech: I won’t buy anything from them again, the box the mouse came in has a legend telling you: over 10 million Cordless mice Sold!! (Yeah, that´s right for uni processor machines, maybe)
    I ´m still learning things about my dual processor machines: they do not like everything that is designed for uniprocessor machines!!!
    A dual processor machine is something fast, more than one processor has to be better in many aspects. But again, not everything is designed for a dual processor machine.
    Does anyone know how to back up your profile in  Wxp pro????
    Any comments are welcomed!!!

    Before Installing CD drivers you should always check to see if later drivers are available.  The 9.6x drivers have been out for ages so go and try them.
    BIm2k

  • Get Current Mouse Position

    Is there a way to get the current mouse position on the screen? Unfortunately, I cannot use a listener to provide the mouse position, because I don't know what components (if any) that the mouse is over. I am trying to draw in the glass pane during a drag and drop. During a drag and drop, the glass pane does not get mouseEntered or mouseMoved events (which I would have used to get the ouse position if I could). So I was hoping for a static method that I could use within the glass pane's paint method to give me the current absolute position of the mouse.

    a time ago i used the glasspane and the mousemotionlistener works perfect. you only should be sure to show ( setVisible(true) ) your glasspane. the best way is to look onto the java tutorial how they did it.
    link: http://java.sun.com/docs/books/tutorial/uiswing/components/rootpane.html
    tobais

  • Using a Counter(PC-TIO-10) to Perform Quadrature Encoder Buffered Position Measurement in Visual C++

    I have Driver Ni-Daq 6.9 and Using a Counter to Perform Quadrature Encoder Buffered Position Measurement in Visual C++ 6.0
    (I think Ni-Daq not support PC-TIO-10 because card not support pulg&play, you can hint me driver for support this card. ) and i want example program for read counter. i use Visual C++ for run,i don't use Measurement Studio.

    NI-DAQ 6.9 supports the PC-TIO-10.
    I attached an example that will show you how to do it in CVI (ANSI C).
    Attachments:
    Cviencod.zip ‏19 KB

  • Generate a pulse train using a count from a quadrature encoder as the clock

    I am trying to generate a pulse train with the same frequency as my quadrature encoder.  Every time the encoder counts, I want the pulse to go high until the next count and then go low and so on.  I am using a 6602 PCI card and a BNC 2121 accessory.

    Maybe I'm not understanding your app, but I *think* you and I are approaching it from two very different directions.
    As I understand it, you'd like to emit a pulse with each quad state change.  Then that pulse would act as a counter Source signal.  The counter will then increment on each pulse, to keep track of accumulated position.  Further, you'd use your device-under-test (DUT) as a counter Gate signal, which would buffer the position count each time there's a rising edge on your DUT.  The end result is a buffer of position values, captured at each rising edge of your DUT.
    I'm talking about a different approach to produce the same data.  You'd use 2 tasks on a M-series board.  One of them is a hardware-timed digital input task based on "change detection."  Each time one of the specified bits has a transition, your whole set of digital input bits can be captured and an internal "change detect pulse" is generated on the board.  This task should be sensitive to the DUT edges.
    The other task would be a buffered position measurement.  It would receive the reference encoder inputs and internally do quad decode and keep a running count.  The sampling clock for this task would be specified as the other task's "change detect pulse."
    Net result: on each specified edge of your DUT, you'll buffer a reference encoder position value and a digital state of your DUT.  You can choose to be sensitive to rising edges, falling edges, or (!!!!) both at once. You can also choose to be sensitive to many bits simultaneously.  These are better capabilities than you get with the 6602 alone.
    I *think* the 6220 should be ok, based on a quick overview of specs.  I assume your 3.6 MHz is the rate of ref encoder quad state changes, right?  In the approach I'm suggesting, you only need concern yourself with the rate of DUT edges which appear to be in the 10's of kHz or less.
    Gotta go for now.  Post back if any further questions.
    -Kevin P.

  • I repeatedly get "error during rendering/encoding of menus/slideshow" message.  This process is the same on my iMac, MacBook and another iMac.  I have been burning dvd's int he same way for the past 12 months using the exact same steps successfully.

    I keep getting "error during rendering/encoding of menus/slideshows" message.  I have been burning DVD's in exactly the same way for the past 12 months and mostly on my MacBook which is 3 years old.  Obviously I'm using iDVD.  I purchased an iMac about a year ago and moved to use this for dvd burning without problem.  A few months ago (approximately) I started to experience problems with burning with the error message above.  I tried everything including starting the whole process from scratch right down to capturing the movie clips from my video recorder into iMovie, then using them in iDVD.  Still the same message came up.  I lost count of how many times I repeated the process with different clips and variations and the same thing happened.  This was also the case with my MacBook and my husband's iMac.
    After taking both of mymac's tothe service centre, having new optical thingys put it and even a new hard drive on my iMac along with a new DVD burner the same thing happened.  They told me it must be the process that I am using that is incorrect!
    I took my 27" iMac to an apple shop and asked them to assist me while I use the same technique as I always had.  The same message came up so they tried using my clips in one of their mac's.  The same message. They tried it with different clips and the same message.  The only way we could get theirs to work was with a magic DVD which did not produce what I needed and was limited with only one page. 
    I now cannot use any of my Mac's for the intended purpose that I bought them for - to produce good media for my work!  It was suggested that I purchase some non Mac software to burn DVDs which defeats the object of having a mac with iDVD in my opinion.  I have a book on iDVD which is very informative and have followed the process to the letter and checked all the trouble shooting and still no remedy.  It was mentioned that an up-date may have caused the problem on all my macs.
    I feel that this issue should be addressed by Apple as a matter of correctness.
    I now find that on the net there are many posts in forums and such like with exactly the same (almost word for word) problems.  Please Apple, keep/regain your good name and sort this out.
    Jayne Connelly

    Thanks Bengt W for your attention to this matter.  So much appreciated.  And thanks for putting me right on the aim of forums (new to this).  Although, you may regret asking for more information.  I've added everything I can below.
    The process I used is as follows:
    Import recorded clips of between 5 and 15minutes each from my video recorder into i
    Edit the clips (remove unwanted start and endng)
    Add title to front of clips
    ‘Share’ them to ‘movie’ (export using QuickTime)folder in .mov format individually
    Open iDVD and ‘create new project’
    Select ‘favourite’ theme that I have set up forall my work dvd’s (this has been used successfully many times and I’ve triedwithout using the favourite them).
    Add 2 submenus for each group of clips
    Select submenu  - drag and drop between 3 – 6 clips in each of the twosubmenus
    Change title colours on clips
    Dragand drop image into drop zones where required
    In‘map’ view I check for any yellow warnings before burning to disc
    In an attempt to remedy the problems I’ve tried the following:
    Try new DVD discs
    Try different themes (favourites and standardones)
    Change images in drop zones
    Start whole process again even from importingfrom camera again
    Two other completely different computers (iMacand MacBook) with iDVD
    Go to apple shop and use their computers to doin iDVD
    Try with one clip and no menu pages added
    Use a clip that I already have that did notoriginate from my camera
    Turn computer off and restart
    New hard drive
    New optical lense (thing)
    New DVD burner
    Saving to disc image rather than dvd disc
    Other points:
    I also have a ‘flip’ and ‘iPhone’ whereI’ve imported footage camera which, although limited, records and makes videoclips and burns them to DVD through iDVD without problem.
    For example, I have just gone through steps 5 - 11 using some clips that were already imported from my iphone to iPhoto and dragged across.  I used a theme that I've used before which has failed and added one sub menu page where the clip went.  It burned to disc image successfully.
    The startup disc, I believe will have no space issues asit’s a new hard drive with no use apart from this.  That could have been an issue before (I didn’t check it) butnot now.
    Other technical stuff that I don't understand but you may:
    I have…… Mac OS X Version 10.6.7 with all updates onit.  Processor 2.8 GHz Intel Corei7.  Memory 4GB 1067 MHz DDR3.
    iDVD version 7.1.1
    HardwareOverview:
      Model Name: iMac
      Model Identifier: iMac11,1
      Processor Name: Intel Core i7
      Processor Speed: 2.8 GHz
      Number Of Processors: 1
      Total Number Of Cores: 4
      L2 Cache (per core): 256 KB
      L3 Cache: 8 MB
      Memory: 4GB
      Processor Interconnect Speed: 4.8 GT/s
      Boot ROM Version: IM111.0034.B02
    SMC Version (system):            1.54f36
    OPTIARCDVD RW AD-5680H:
      Firmware Revision:     3AHB
      Interconnect:    ATAPI
      Burn Support:   Yes (AppleShipping Drive)
      Cache:    2048KB
      Reads DVD:    Yes
      CD-Write: -R, -RW
      DVD-Write:   -R, -R DL,-RW, +R, +R DL, +RW
      Write Strategies:  CD-TAO,CD-SAO, CD-Raw, DVD-DAO
      Media: Toshow the available burn speeds, insert a disc and choose View > Refresh
    If you can solve this you are better than the 'apple geeks' in the shop and the service technicians in the service centre (and of course me but that's no achievement). 
    Eagerly awaiting your reply.
    Jayne

  • Do I need extra logic circuit for quadrature encoder using M-series DAQ PCI-6221?

    Hi,
    I understand that extra logic circuit, say quadrature clock converter LS7083/7084, is needed to enchance the reliability or integrity of the data for E-series board DAQ in accordance to application note: AN084.
    This is due to the vibration/jitter of the motor during running.
    Currently, I'm using M-series PCI-6221.
    Is it this new model itself can eliminate to construct this extra circuit?
    Coz I observed error is accumulating after motor rotating certain period of time. It defintely affect the control performance.
    Other than using hardware, can we use software to eliminate/mitigate the error?
    Please enlighten me. Thanks.
    Best regards,
    IANES

    Hello,
    The ap note you are referring to discusses circuitry that conditions the quadrature encoder signals before they get to the DAQ device to eliminate 'false' signals being sent to the DAQ device. The same system would apply to an M Series Device. I am not aware of any way to achieve this functionality in software. FYI, there is some good documentation for counters and counter applications for M Series. Take a look at the attached M Series help file. Hope this helps some.
    -Alan A.
    Attachments:
    M_Series_Help.zip ‏1145 KB

  • How do I use a quadrature encoder as an external clock (PCI 6229)

    Hello, ( a similar post has been placed on DAQ forum apologies as I did not know best place)
    I have a PCI 6229 M Series data acquisition card. I want to use a quadrature encoder to be the external clock driving the acquisition of a number of signals. I have set up reading 24 signals each time a clock pulse is received using the DAQ assistant and set my external clock to pin pfi8 (I think) this is then connected to an encoder output. This works well enough until the encoder is run too fast when it appears I am either missing pulses or getting bounce.
    How can I set up to clock using a quadrature encoder? I have seen a number of questions on this forum regarding quadrature encoders and reverse counting but not on using them as an external clock.
    Basically I want to have the stability and "bounceless" nature of using two outputs from a quadrature encoder whilst still using an external clock. Is this just a case of configuring controls to certain pfi's? If so how is it done?
    Any help or pointers would be helpful. So far I have managed very nicely by simply using the DAQ assistant and the interface it has would suggest that if configured for a certain pfi pin I could actually still use it.
    Thanks in advance.
    Kevin

    Hi,
    Well I've had alook into this for you and I'm not quite sure I understand what you are looking for.
    Is it possible for you to phone back in to support?
    The reason you are seeing bounce at high speeds, or indeed loss of points, is due to the sampling rate that you have set up.
    What you will find is that the trigger will start an aquisition of a number of points at a certain rate.  If your sampling rate is too low then you will not finish that sample batch before the next set of samples is recorded.
    It is possible to use an external clock into a trigger or digital line, however this will limit the number of samples you can take to the speed of your encoder.
    If you increase your sampling rates, and then configure a start trigger from a single input from the encoder you will be able to record a number of samples after a rising/falling edge.  (Set the clock as an internal clock)
    Hope this helps
    AdamB
    Applications Engineering Team Leader | National Instruments | UK & Ireland

  • Can I use the 'Export Signal Property Node' on a quadrature encoder?

    Hi,
    So I don't know which counter board I'd be using yet for this (it's used in conjunction with a PCI-6280--the PCI-6280's counter inputs are all taken and so I need another board), but assuming this is possible at all in DAQmx I wouldn't mind knowing whether, say, the PCI-6601 (or any other timer board for that matter) could do this. I'm programming this in LabVIEW 2010 by the way. 
    I want to have a counter which counts the number of pulses on one channel (I'll call this the 'clock' channel) between when another channel goes from low to high (which I'll call the trigger). It's basically a pulse width measurement, but I only care if there are more than n clock pulses between triggers. I need to have a hardware-timed digital signal which goes from low to high if there are ever more than n pulses between trigger changing state from low to high. 
    What I am planning to do is this: 
    Wire 'trigger' to the z-input of the quadrature encoder, and set the z-input value to some arbitrary large value such that, at the quadrature encoder counter task's settings, the counter reaches terminal count in n pulses.
    Configure the quadrature encoder counter using DAQmx Export Signal Property Node (tutorial I was looking at is here: http://zone.ni.com/devzone/cda/tut/p/id/5387 ) to toggle a digital channel ('counter event output') from low to high if the counter reaches terminal count (ie, if the encoder reads n pulses).
    If the encoder ever reads n pulses on 'clock' between two rising pulses on 'trigger', it sets counter event output high.
    Is this possible? Reading through the manual of M series PCI-62xx devices, the index pulse loads the counter with a particular value so it seems like you could conceivably set the counter to the terminal count if you wanted. My only real problem is whether DAQmx Export Signal Property Node works on all counter tasks or just on edge counting tasks. 
    Thanks in advance for your help. If this isn't possible, I can reply with more details on the problem this is supposed to solve so that you can help me figure out an alternate method.
    Solved!
    Go to Solution.

    There is probably a way to do it, but it it may be easier to use an X-series board for the job.   They support a new counter capability for count reset on a digital edge without needing to be configured in encoder position mode.  I am not sure exactly how that feature's been implemented however, so maybe it won't make things easier after all.
    The plan based on the hoped-for behavior: 
    1. Configure an X-series counter for pulse generation based on "ticks" of your clock channel.
    2. Set both initial delay and low time to the critical # of ticks.
    3. Configure for count reset on a digital edge (if possible in pulse generation mode)
    4. Configure the count reset value to be the critical # (or possibly 1 less, if possible in pulse generation mode)
    5. If you want the output to remain high indefinitely, configure the counter task to use its own output as a
    pause trigger, and pause while high.
    The way pulse generation works is to preload a # of "low time" ticks into the count register.  Then every source edge will decrement the count.  When the count reaches terminal count (0), the counter's output is toggled (or can be configured to pulse).  The register is then loaded with the # of "high time" ticks and the process continues.
    You would be perpetually interrupting the count-down process as long as you got your triggers in time.  The count would keep getting reset to the # of low counts, keep decrementing toward 0 without reaching it, and so on.  If ever you did reach 0, the output state would toggle high, then the high state would prevent subsequent clock signals from decrementing the count.
    You can conceivably do a similar thing with a 6601, but I'm pretty sure you'd need 2 counters working together to get it working.
    -Kevin P

  • Using more than 4 quadrature encoder input for MyRIO

    Hello,
    I am doing a project where I need to drive 6 motors, each with quadrature encoder feedback to control position. 
    Currently, I've been using the MyRIO Encoder VI's, but there's a limit to 4 encoders. What is the best way of reading 6 encoders simultaneously with the MyRIO?
    Thanks,
    Timothy
    Solved!
    Go to Solution.

    If you need to modify the myRIO FPGA personality you have a few options.
    The best option is to start with the myRIO FPGA sample project, add and remove components as needed and then build your bitfile.  Any registers (LV FPGA controls / indicators) you don't modify will still work with the Advanced IO VIs and Express VIs.  In order to use the new bitfile (FPGA Personality) you'll need to update the Open FPGA VI Reference in myRIO v1.1 Open.vi (LabVIEW 2013\vi.lib\myRIO\Common\Instrument Driver Framework\myRIO v1.0\myRIO v1.1 Open.vi).
    After doing this any time you use a myRIO Express VI or Advanced IO VI it will use your custom bitfile.  Any peripheral channels you've left in place will continue to work.  Any channels you've removed will still show up in the VIs, but will not work (they will probably throw errors at runtime) and any new channels you added will not show up in the VIs.  For new channels you'll need to use the FPGA Read / Write nodes to read and write the configuration and data register you created in the FPGA personality.  These changes will persist on that computer until you change the Open FPGA VI Reference back to the original bitfile.
    Let us know if you have questions about any of this.
    Thanks!
    -Sam K
    LabVIEW Hacker
    Join / Follow the LabVIEW Hacker Group on google+

  • Encoder edge counter using analog input

    I have using an 9215A USB (4AI).
    2 AI are logging data in to a txt-file and the other 2AI will be used for counting the edges from a quadrature encoder (A and B pulse train).
    Every edge falling or rising I will write a line in the txt-file also show a egde counter in the VI (total edges read).
    I'm a beginner so I need some help to find out how to do.
    BR
    Johan

    the 9215A do 20kSam/s  , that not too much, so .... your encoder should change state 10k/s max.
    first approach: continious read  (with max speed) with two buffers, while one buffer is filled by the DAQ, analyse the data of the other. Three independend loops : first wait for and read buffer-> send data via queue to second analyse loop -> send data via second queue to third loop that does the file handling.
    second approach: create a trigger so the second loop can be avoided. The DAQmx/Hardware does  might not support the trigger on both edges on two channels, but additional hardware like LS7084 o. HCTL2022 can help you to create the trigger signal. These little bugs are designed for incremental encoders and create a pulse for every change in the A B lines
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

Maybe you are looking for

  • Acrobat 9 forms from word

    I'm working with Acrobat 9 Pro and creating a form with a table.  The table  had 4 columns the first 3 have non-numerical data.  The forth column is a cost  column.  What I need it to do is if there is something in columns 1-3 for it to  talley the c

  • "the photo library was created with an unreleased version of iPhoto"

    Help! I think this all started with an onscreen message telling me I had a trojan. I downloaded a free copy of mac scan. This later asked me to subscribe. I could not get rid of the message except by switching off the computer, (I was tired and despe

  • Hotel management software for mac - need assistance PLEASE read..

    hello everyone! thanks for taking the time to read this. I am managing hotels and they requested going via computer compared to hands-on. what programs do you recommend for the hotel management software when one does a reservation online to send a no

  • Indesign CS4 Pantone color book, Solid Coated giving the wrong color

    I am trying to add a Panton color to my swatches panel. Under Swatches I am selecting "New Color Swatch -> Color Type: Spot ->Color Mode: Solid Coated". What happens next is get a box where I can type the Pantone number I would like ... to the left o

  • Rendered Nodes in JTree, Look&Feel Problem

    Hallo, I make a small JTree and write my own TreeNodeRenderer which renders in each case a simple JPanel with Titled-Border an 2 JLabels. If I adjust Metal Look&Feel the rendered Nodes are displayed correctly. (The JPanels size is about 300x200 pixel