Counter roll over

I wonder what to do when  counter roll over.
Do anyone have some examples what to do?
Thanks.

It looks like you're trying to measure the frequency of your encoder signal using the 6251?  Your software-timed loop (code in your other thread) isn't the best way to go about this since the software timing is non-deterministic.  I think you should follow Stefo's advice in this thread to use a period measurement, which wouldn't give you the rollover problem.  I don't think there's a need for you to use both the A and the B signals, instead just measure the frequency of either A or B using the shipping example.
Alternatively, you could generate a sample clock to sample your encoder task deterministically to determine the frequency by subtracting consecutive samples.  You still can't reset the counter, but you can certainly account for the overflow in software.  In fact, if you typecast the data to U32 (you can actually read the data as U32 with the DAQmx API) before the subtraction, the overflow would take care of itself (0 - 4294967295 = 1 if the data is U32).
Best Regards,
John Passiak

Similar Messages

  • Counter roll-over when measuring period

    Hi,
    I'm using PCI-6251 counter 0 to continuously measure the period of a signal, and I notice there are occasionally  error readings. Since the counter can roll over when it reaches 2^32-1, I need to know what will happen to the period measurement when counter roll overs. Would anyone please help me?
    Thanks.
    David

    The count value will simply wrap-around back to 0 and then continue to increment.  I can think of a few ways to handle this:
    1. Specify a slower timebase for the measurement.  If you go from, say, 80 MHz to 100 kHz, it'll take 800 times as long a period to cause rollover.  This method is pretty simple to implement, but not all apps can accept the loss in precision.
    2.  You can use a 2nd counter to be sensitive to the 1st counter's "terminal count".  This gets a bit complex, so you may need to do more research on some of the terms that follow.
    An internal pulse signal is generated on the board when the 1st counter rolls over from 2^32-1 back to 0.  It's commonly known as "terminal count" or TC.  You'll need to configure a 2nd counter that also measures periods of your external signal, but which uses those TC pulses as its timebase signal.  You may need to fiddle with the "Duplicate Count Prevention" property on the 2nd counter so that it will buffer values of 0 during the majority of intervals where no TC pulse occurs.  During the intervals where rollover happens, the 2nd counter will count how many times it happens.
    You would further need the 2 counters to be started off a common "arm start" trigger to keep their data sync'ed.
    3.  Software method.  You can query the DAQmx Channel property "Counter Input -> General Properties -> More -> Terminal Count Reached".  When you get a 'True' output, the property resets such that subsequent calls will return 'False' until the next rollover occurs.  The problem here is trying to correlate this software-detected rollover with a specific period in the 1st counter's measurement buffer.  You'd probably also need to be querying and tracking the DAQmx Read property for Total Samples Acquired both before and after the TC event.  Even then you might not always be able to determine unambiguously which interval had the TC event.
    -Kevin P.

  • What happens when image count rolls over?

    MY Canon Xsi is about to hit 10,000, and will roll over in the counting. What will happen in Aperture if I am using a referenced master setup? What about if I just change things to a all incorporated database?
    Or, would it be better to start importing with customer names to eliminate duplicates?
    I do have 25,000 shots from an old Pentax, so I already have some duplicates with 3 matches.
    Thanks.

    I love the XSi. Great little camera!
    The counter will restart and the camera will begin writing to a new directory on the memory card. I believe it'll start writing in CANON101 instead of CANON100, or something like that
    A standard naming convention might be a good idea, but it's really up to you.

  • PCI-6602: Stop counting after roll over

    Hi,
    I'm programming a PCI 6602 Board and want to stop a counter after
    it had a roll over. This option isn't available in the NIDAQ 6.7 I think!
    If you know, how I could manage it, please reply.
    thank you
    Steve Dreger

    Error -10920 is normally caused by speed limitations of your computer. Normally changing from debug to release mode will help fix this. Here are several other KBs that explain this error and how to fix it.
    http://digital.ni.com/public.nsf/websearch/8FB9091CB9BB452B8525642000554799?OpenDocument
    http://digital.ni.com/public.nsf/websearch/5D7774A864C1EE1786256713005D848D?OpenDocument
    http://digital.ni.com/public.nsf/websearch/5d7774a864c1ee1786256713005d848d?OpenDocument
    http://digital.ni.com/public.nsf/websearch/5d7774a864c1ee1786256713005d848d?OpenDocument
    http://digital.ni.com/public.nsf/websearch/1B64310FAE9007C086256A1D006D9BBF?OpenDocument
    If running the ResetDevice command does not work. I suggest opening MAX up and right click on Tradio
    nal NI-DAQ Devices, and then click on Reset driver.
    I hope this helps out.
    Joshua

  • I'm trying to find code that has a seek bar roll over effect as HULU and YouTube.

    Hi
    The seekbar roll over will not just show the NetStream.time but also has the frames screen shot.  I've searched several sites but no clear answer yet.
    I'm using actionscript 3 in FLash CC and can also use Flash Builder.
    Thanks

    Please find the below code -
    1) Use your actual variable instead of dummy.
    2) Position of thumbnails should be move as per mouseMove on seekBar. Get the mouse X posion and set the xpos of your thumbnail which contain either Video object or image display holder.
    package  {
      import flash.display.MovieClip;
      import flash.events.MouseEvent;
      import flash.events.TimerEvent;
      import org.osmf.events.TimeEvent;
      import flash.utils.Timer;
      import flash.net.NetStream;
      public class SeekThumb extends MovieClip {
      private var seekBtn:MovieClip;
      private var getVideoFrameAtSecond:Number = -1;
      private var durationOfVideo:Number = 100// Asume that we have 100 seconds video
      private var timer:Timer;
      private var counter:Number = 0;
      private var delay:Number = 1;  // It can be updated as per smoothness.
      private var netStream:NetStream;
      private var lastSeekPos:Number;
      public function SeekThumb() {
      // constructor code
      this.addChild(createSeekButton());
      timer = new Timer(200);
      timer.addEventListener(TimerEvent.TIMER, updateQos);
      counter = delay;
      private function createSeekButton():MovieClip{
      seekBtn = new SeekButton();
      seekBtn.buttonMode = true;
      seekBtn.addEventListener(MouseEvent.MOUSE_MOVE, seekMouseMove, false, 0, true);
      seekBtn.addEventListener(MouseEvent.ROLL_OVER, seekOver, false, 0, true);
      seekBtn.addEventListener(MouseEvent.ROLL_OUT, seekOut, false, 0, true);
      seekBtn.x = 50;
      seekBtn.y = 100;
      return seekBtn;
      private function seekOver(event:MouseEvent):void{
      timer.start();
      private function seekOut(event:MouseEvent):void{
      timer.stop();
      private function updateQos(event:TimerEvent):void{
      //trace("counter = "+counter)
      if(counter>0){
      counter--;
      }else{
      // Enable below funtion as per your need.
      //updateVideoFrame(getVideoFrameAtSecond);
      //addImageOfVideoFramesAt(getVideoFrameAtSecond);// If you want to show your bitmap image then pass the bitmap image params here or customize your methods here
      trace(getVideoFrameAtSecond);
      private function addImageOfVideoFramesAt(seekTime:Number):void{
      var getBitmapMovie:MovieClip = myStoredThumbArray[seekTime]// Set the image url here from array which you have already stored/ traced from main source of image which you provided.
      previewHolder.addChild(getBitmapMovie);
      private function updateVideoFrame(setId:Number):void {
      try {
      if (netStream!=null && lastSeekPos!=setId) {
      lastSeekPos = setId;
      netStream.play(netStreamURL, setId);
      netStream.pause();
      //netStream.soundTransform = setVoluem to 0
      } catch (error:Error) {
      trace("UpdateVideo Frame Error: "+error);
      private function seekMouseMove(event:MouseEvent):void{
      var currentMc:MovieClip = MovieClip(event.currentTarget);
      getVideoFrameAtSecond = Math.round(currentMc.mouseX*durationOfVideo/seekBtn.width);
      counter = delay;
    Re: How to show video frames as still preview image when roll over on seek bar just like Hulu? 

  • Display element only if other elements have been clicked or rolled over (Captivate 5)

    Hello
    I am trying to find a way to display a text caption IF the users have rolled-over all the elements in my slide. Is it possible?
    I had a look at the variables but it doesn't seem to be that.
    Cheers
    Helene

    Hello,
    The eventhandler widget is great if you do want to go with Rollover captions or Rollover images. Because those objects do not have the possibility to have an action attached to. If you use a rollover slidelet, it is possible to trigger an action on rollover and on click, that way you could increment a user variable.
    The idea shortly is this:
    Hide the text caption that will have to show up
    Either create a user variable (counter) that will be incremented on first click or rollover an element; to be able to check if the element has already been clicked or had a rollover create another user variable for each element set initially to 0, it will be changed to 1 when clicked/rollover
    For each action (will have to be an advanced action) attached to the rollover slidelet you'll have to check several things:
    has this already been visited (rollover or click) by checking the associated element variable; if not increment the user variable (counter) and set the associated element variable to 1
    check the counter (important that this check is done after the first one): if it has reached the maximum (all elements visited), show the text caption; if not just continue (or no action, depends on what is happening else on the slide).
    I have been blogging about similar use cases, not exactly this one.
    Lilybiri

  • Roll over balloons in eBay searches not poping up w/ Safari 2.0.4

    Is there a setting or a technique to once again allow roll over balloons to pop up on eBay search listings? I'm referring to the "Enlarge" roll over link in the Gallery picture of search results. This is a "paid for" option that some sellers use.
    I do not have "Block Pop-up Windows" checked off in the Security Preference window.
    Firefox still allows this, but on both a Powerbook G4 and a iMac Dual Core using Safari Version 2.0.4 (419.3) this feature is no longer working for me. (It had worked in Safari until three days ago...could I have inadvertaently changed something?)
    For an example of a roll over balloon try searching eBay for an item of interest, and then scan down the resulting list. Typically a few items in large search results will have the "Enlarge" roll over below the gallery picture of an item being sold.
    24" iMac 2.16 Dual Core   Mac OS X (10.4.8)   Also, Powerbook 17" G4 & Powerbook G3

    Thanks again.
    BTW... I just received this from eBay in regard to my questioning them about this problem. As you said, they seem to be disregarding Safari.
    Dear eBay Member,
    Thank you for writing eBay in regard to the problem you are experiencing
    while trying to list your item using the Safari browser.
    If you are using OS X 10.2.x or higher, I would like to suggest using
    the Firefox browser. This browser seems to be the most compatible format
    for Macintosh users for eBay Picture Services.
    If you don't already have this browser installed on your computer,
    please visit the following page to download the Firefox browser:
    http://www.mozilla.org/products/firefox/all
    Once the page loads, please select which language you would like to
    download, and click on the link under the Mac OS X column.
    If you are using OS X 10.2.8 or older, I would then recommend using the
    Netscape browser. If you don't have this browser installed on your
    computer, please visit the following page:
    http://browser.netscape.com/ns8/download/archive72x.jsp
    Thank you for being a valuable member of the eBay community. Have an
    enjoyable time shopping and selling on eBay!
    Sincerely,
    Adam
    eBay Customer Support
    Powerbook 17" G4 & 24" iMac 2.16 Dual Core   Mac OS X (10.4.8)   Also, Powerbook G3 250 / OS 9

  • How can i change the color of the text on a button in Roll Over or Click state (Cs5.5)

    Hello,
    Here is the problematic:
    1° How can i change the color of the text on a button in Roll Over or Click state (Cs5.5)
    - I've many button in a doc im creating
    - the color of the buttons is white with black stoke & black text
    - in roll over state i want them to inverse the color coding (the text white & bottom black)
    - currently the text becomes invisible as black on black cant be seen (ive stroked it white but that looks ugly)
    - i would just like to know if there is a function made for this?
    My other questions:
    2° Ive a presentation on which Ive created buttons which tigger pop-up animations
    - i have 5 buttons which trigger animations
    - the viewer can chose to Click on any of the buttons randomly
    - the problem is once the animation is open how can it be close... either:
    a) by it self after "40" seconds
    b) when ther viewer clicks another button
    3° Ive created buttons linking pages..
    - "go to page xxx"
    - when i do a preview and click on the buttons the links dont take me to the right pages
    - is that normal? (maybe in preview its suppose to be like that)
    4° I would like to intergrate YouTube videos in the presentation so they play inside the docment.. when i tried.. it said the 'link isnt a flash video'
    - what should i do?
    5° Once i export it into Swf. how how can i visualize it? or put it online?
    Thank you for your time.

    stlbbl4u wrote:
    Hello,
    Here is the problematic:
    1° How can i change the color of the text on a button in Roll Over or Click state (Cs5.5)
    - I've many button in a doc im creating
    - the color of the buttons is white with black stoke & black text
    - in roll over state i want them to inverse the color coding (the text white & bottom black)
    - currently the text becomes invisible as black on black cant be seen (ive stroked it white but that looks ugly)
    - i would just like to know if there is a function made for this?
    You should setup Object Styles - these can also include Paragarph Styles that can be triggered when the Style is selected.
    http://help.adobe.com/en_US/indesign/cs/using/WS5CEDB81A-0011-4dc9-9DE8-AC7AD4C80076a.html
    My other questions:
    2° Ive a presentation on which Ive created buttons which tigger pop-up animations
    - i have 5 buttons which trigger animations
    - the viewer can chose to Click on any of the buttons randomly
    - the problem is once the animation is open how can it be close... either:
    a) by it self after "40" seconds
    b) when ther viewer clicks another button
    I'm not sure what you mean - I don't do files with Animations
    3° Ive created buttons linking pages..- "go to page xxx"
    - when i do a preview and click on the buttons the links dont take me to the right pages
    - is that normal? (maybe in preview its suppose to be like that)
    Does it work properly when you export it to the finished file?
    4° I would like to intergrate YouTube videos in the presentation so they play inside the docment.. when i tried.. it said the 'link isnt a flash video'- what should i do?
    InDesign won't link directly to youtube videos. I think your best bet would be to use Downloader to download the video and embed them directly in Indesign.
    5° Once i export it into Swf. how how can i visualize it? or put it online? 
    Thank you for your time.
    You can look up how to embed a SWF file into your HTML - but it depends what you mean by "online" there's a dozen ways to get a file "online".

  • How do I make a textbox appear in a PDF made in InDesign CC when the cursor rolls over another textbox?

    I'm trying to make a textbox appear in a PDF made in InDesign when the user rolls the cursor over another textbox, and I want it to disappear when the cursor moves off the first textbox. I've tried the following with various setting, and it's just not working for me.
    Display a different button on rollover
    You can create a hot spot in which clicking or mousing over an object displays another object. To do this, create two buttons, hide one of the buttons, and use the Show/Hide Button action to show and hide the target button.
    Create an object to be used as the source button. In the Buttons panel, click the Convert Object To A Button icon.  
    Place the image you want to be used as the target button, and convert it to a button.  
    Select the target image and select Hidden Until Triggered at the bottom of the Buttons panel.  
    The image needs to be hidden in the exported document so that it can be displayed when the source button is moused over or clicked.  
    Select the source button and create two different actions, one to show the target image and a second to hide the target image.  
    If you want the image to appear when the mouse hovers over the source button, use the On Roll Over and On Roll Off events. If you want the image to appear when you click the source button and disappear when you release it, use the On Click and On Release events. In either case, use the Show/Hide Buttons action to display and hide the target button. See Make buttons interactive.   
    Use the Preview panel to test the buttons.  

    Here's more information about what I'm doing.
    1. create text box with a little text
    2. turn it into a button (Button 1)
    3. create another text box with some text
    4. turn this into a button (Button 2)
    5. check "Hidden Until Triggered" for Button 2
    6. For Button 1, select "On Roll Over" for Event
    7. For Button 1, click + to add Action and choose "Show/Hide Buttons and Forms"
    8. For Button 1, change icon next to Button 2 into eyeball (which I assume makes Button 2 visible on roll over).
    9. For Button 1,, select "On Roll Off" for Event
    7. For Button 1, click + to add Action and choose "Show/Hide Buttons and Forms"
    8. For Button 1, change icon next to Button 2 into crossed-out eyeball (which I assume makes Button 2 invisible on roll off).
    8. Export to PDF with modified smallest file size and include bookmarks and hyperlinks and include appearance for interactive elements.
    Both buttons are visible in the PDF, and nothing happens with roll over and off.
    What am I doing wrong?

  • Roll over images in a slide show

    I am trying to make a slide show of before and after images for a client.
    Rather than just have them all one after the other, I want all the after images to display as normal, and the before to display on hover for each slide.
    I can make this work in a basic slide show when rather than adding an image to the Hero Image box, I use the fill and states.
    However this only allows me to do one, as I can't add any more empty Hero Image boxes (or I don't know how to do that, is it possible?)
    When I add an image via the slide show menu it appears on top of any fills, and I can't seem to give images added this way a roll over state.
    Can anyone tell me how to either add extra blank Hero Image boxes, or how to apply the effect I want to the images in the Hero Image boxes.
    Thanks in advance, if there is any further info I can provide about my problem, please let me know!
    M

    Hi,
    You cannot add multiple hero image boxes within the same Slideshow. Now , you can use different slideshows for your different images but that wont give you the slideshow effect but you will be able to see all your after images at once and then if you rollover them you would be able to see the before images.
    Now, In order to create the effect that you want, what I would suggest you is to use a 'Composition widget'. In the composition widget, you can make the triggers as small thumbnails for your images and in the Target you can set the fill as your after image and in rollover state you can use the before image. After this you can use the Autoplay feature available in the composition widget and you will get the desired result.
    Hope this helps
    Regards,
    Rohit Nair

  • Is there a way to prevent roll-over ads from opening? Some sites are almost impossible to navigate because of this new nuisance.

    For instance, www.roughstock.com is a country music website where you can see lyrics and chords for popular songs that contributors have sent in. From the main page you click on the "Cowpie" tab to enter the page where you can search for songs. If you do this I am quite sure you will experience one of the roll-over advertisements I am talking about. They are small ads which, if you touch any portion of their area, will TAKE OVER the screen and play until the advertisement is finished or until you are able to find a usually obscure 'close' button.
    I've got 'pop-ups' disabled, but this new kind of ad is already resident on the page you wish to view so it is beating the system.
    Also, I'm not spamming for that site, it's just the most recent site where I've experienced this problem.

    It's going to get worse with crap like that as more web sites adopt HTML5 and HTML5 compatible browsers are released. There's all sorts of new tags in HTML5 that will probably be misused for displays like that.

  • Can I get rid of the underlined hyperlink and just have roll-over links?

    In iWeb 2009, can I get rid of the underlined hyperlink and just have roll-over links?

    You have to put them on the server where you are publishing your site to. Where are you hosting your site? If it's a MobileMe account then you have two options:
    1 - put the photos in a folder, name it "Pics" and put that folder in your iDisk/Pictures folder. Then use the following URL: http://homepage.mac.com/YourMMe_Account_Name/.Pictures/Pic/FileName (don't forget the period before Pictures).
    2 - put the "Pics" folder with image files in your iDisk/Web/Sites folder and use the following URL: http://web.me.com/YourMMe_Account_Name/FileName.
    If you're hosting on a 3rd party server it would depend on if you're using a domain name or not. I'm not familiar with 3rd party servers so Wyodor, Ethmoid or someone that is will need to point the way.

  • I have moved old Back Up files from my external hard drive to the trash and as the Trash previews the files, i.e. counts them (over 850,000 files) it then begins to delete but then stops. Is it possible to move the files out of the Trash file and then onl

    I have moved old Back Up files from my external hard drive to the trash and as the Trash previews the files, i.e. counts them (over 850,000 files) it then begins to delete but then stops. Is it possible to move the files out of the Trash file and then only delete a small amount at one time?

    See
    Deleting backups via the Finder on Lion 10.7.x or later:
    http://pondini.org/TM/12.html
    Hold option (alt) while emptying the Trash.
    See also
    http://pondini.org/TM/E6.html
    Message was edited by: WZZZ

  • Swap images while rolling over popup menu

    Hello,
    I've been playing with fireworks CS5 for some days now and made a first attempt on a website.
    So far, i've made a navigation bar with two states in order to be able to add a simple roll over behavior, e.g. darkening text on rollover. I also have been able to make a dropdown menu (popup) via slices.
    Then I decided to swap images when on nav bar headings. So far, so good.
    When I did a preview in my browser, it appeared that as soon as I was leaving the nav bar, the image swapped back to the old setting. Perfect.
    But when I did a mouse over on one of the dropdown menu's of the navigation bar, the image swapped back as well.. I've been trying, but didnt manage to find out how to fix this.
    So, is there anyone here that knows if it is possible, and if so, how to keep images swapped to a second stage as long as the mouse is on the dropdown menu, but swaps back to the original state when leaving the dropdown and/or the navigation bar.
    Thanks in advance,

    Hi Bryan,
    It may be possible to cheat and put this onto the button:
    the option that you want is called TITLE.
    if you set one of the other parameters (e.g. the label)
    to be:
    LABEL_TEXT" TITLE="TITLE_TEXT
    basically when it adds the text onto the form it will wrap it in "
    If it doesn't strip out the " from your text you should get your extra parameter.
    it may slip past the portal checking.
    I can't test it as I only have WebDB, but I have done something similar with javascript in WebDB.
    good luck
    Michael

  • Grey Boxes when rolling over type in Illustrator CS5.5

    This is driving me insane. I have to have a solution as this is a work computer and I'm a designer who has deadlines to meet.
    Whenever I roll over, select, move or try to edit some type elements in Illustrator, the preview of the type flicks into grey boxes (see below).
    There's no cursor and I can't see what I'm typing nor can I be precise with the text placement.
    What is the problem and how do I fix it?

    By dock do you mean the Swatches panel? Have you tried the Delete Unused Panel Items action from the Action panel. They can also be in Symbols or Brushes but if you run the action it will delete them in order so that the color swatches are deleted last and if they were in a Symbol, Graphic Stlye or Brush with the original gone they should delete. Also make sure that everything is visible and unlocked.

Maybe you are looking for

  • It keeps wanting to start as a new ipod

    i usually buy music from the itunes app but i had some old musci i wanted to transfer over to my ipod i open itunes and plug in my ipod. Then it wanst to start it up as a new ipod or restore from a back up. is there a way past this?? i just want the

  • How to assign Profit segment to the G/L account

    hi all, have anyone know how to assign Profit segment to the G/L account? rgds, Worached

  • Control stmt CASE vs IF - Which is better

    Hi, I'm in the process of retrieving data from a table that has millions of rows. Now I need to count the numbers of rows where a particular field,TR_STATUS is either 'A','G' or 'K'. I have three different variables to hold the count on the rows with

  • Since downloading iTune10.4.1 I can't import from shared libraries. The import button is gone.

    The show menu and import buttons are no longer at the bottom of the iTunes window when i am accessing a shared library since the last iTunes upgrade. Has any one else had this problem and, more importabtly, how do you fix it?

  • Custom ipod desktop icon?

    Is it possible for me to give my ipod (new 160g classic) a custom desktop icon when I plug it in to my computer? Or am I stuck forever with it showing up as a black ipod? For instance, if I named my ipod Spiderman, is there some way I can grab a jpg