How to Immediately Change Counter Output Rate?

I have a piece of code that largely works like this example: http://zone.ni.com/devzone/cda/epd/p/id/5493
In other words, I set up the Counter Output with some initial frequency and duty cycle, but then during the main loop of my program I continuously change the frequency to a new value based on other criteria.
I'm using an M-series PXI card and LabVIEW RT.
The problem I'm having is that the card waits for the next edge before changing the counter output rate. For instance, lets say it is going at a low frequency and I am upping to a high frequency. If the command arrives in the middle of the current pulse, it will wait to complete the low-rate pulse before starting the high frequency output. Is there a way to make it interrupt the current count and immediately start counting at the new rate?
Thanks,
Isaac

Hi Isaac,
I posted the code in LV 8.2 so you should be able to open it now (it sometimes takes several minutes to upload).
There are a few limitations to using the digital lines instead of the counters:
1.  The digital lines are updated off of a sample clock which will be much slower than a timebase.  For example, on the 6221 the maximum update rate is 1 MHz, while the counter output has a max timebase of 80 MHz. As a result, the number of frequencies you can generate are going to be more restricted (divide down from 1 MHz vs. 80 MHz).
2.  On M series devices, the digital lines must be clocked from an external source.  This could be generated from a counter
3.  You have to build the digital waveform, which is a bit tricky (I think the example code should help out with that but I haven't had time to thoroughly test it).
4.  If you are generating digital lines at fast rates, you will need to write quite a few samples at a time to the output buffer to ensure the data does not underflow.  If the buffer includes multiple periods of the digital signal, you would have the case that using the counter output would still update more immediately.
Again, to determine the best course of action it would be useful to know what frequencies you want to generate and which exact hardware you are using. I just mentioned the digital lines as an alternative to the counters, but it might not be ideal for your situation.
-John
John Passiak

Similar Messages

  • How to check current input/output rate on router subintenterface via SNMP?

    How to check current input/output rate on router (2821, etc..) subintenterface via SNMP, like cacti monitoring system.
    I cant find OID to make this with snmpwalk.
    Or there is no way to check current load by this way? Only polling?
    P.S. Ethernet subinterface, of course.
    With great respect, S.A.

    Hi,
    Try to use:
    1.3.6.1.4.1.9.2.2.1.1.6 - InBitRate
    1.3.6.1.4.1.9.2.2.1.1.8 - OutBitRate
    1.3.6.1.4.1.9.2.2.1.1.28 - ifDescription

  • How can I change the frame rate mode?

    Adobe Premiere Pro exports my videos with a variable frame rate. Because of this long videos are asynchronous. How can i change the frame rate mode? So Adobe Premie Pro exports my videos with a CONSTANT frame rate? The original video  has a constant frame rate...

    Sorry my mistakes. I am from Germany.. so...I mean with asynchronous that the video file and the sound file are displaced. In the beginning of the Video it's normal, but if the videos is very long it goes VERY "asynchronous"
    I analyzed the video with "mediainfo":
    General
    Format                                   : MPEG-4
    Format profile                           : Base Media / Version 2
    Codec ID                                 : mp42
    File size                                : 2.00 GiB
    Duration                                 : 20mn 13s
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 14.2 Mbps
    Encoded date                             : UTC 2013-12-11 13:56:13
    Tagged date                              : UTC 2013-12-11 13:58:30
    ©TIM                                     : 00:00:00:00
    ©TSC                                     : 30
    ©TSZ                                     : 1
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : [email protected]
    Format settings, CABAC                   : Yes
    Format settings, ReFrames                : 3 frames
    Format settings, GOP                     : M=3, N=30
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 20mn 13s
    Source duration                          : 20mn 13s
    Bit rate                                 : 14.0 Mbps
    Width                                    : 2 560 pixels
    Height                                   : 1 440 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Variable
    Frame rate                               : 30.000 fps
    Minimum frame rate                       : 30.000 fps
    Maximum frame rate                       : 30.030 fps
    Standard                                 : PAL
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.127
    Stream size                              : 1.98 GiB (99%)
    Source stream size                       : 1.98 GiB (99%)
    Language                                 : English
    Encoded date                             : UTC 2013-12-11 13:56:13
    Tagged date                              : UTC 2013-12-11 13:56:13
    Color primaries                          : BT.709
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.709
    mdhd_Duration                            : 1213733
    Audio
    ID                                       : 2
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : LC
    Codec ID                                 : 40
    Duration                                 : 20mn 13s
    Source duration                          : 20mn 13s
    Bit rate mode                            : Variable
    Bit rate                                 : 158 Kbps
    Maximum bit rate                         : 254 Kbps
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 44.1 KHz
    Compression mode                         : Lossy
    Stream size                              : 22.8 MiB (1%)
    Source stream size                       : 22.8 MiB (1%)
    Language                                 : English
    Encoded date                             : UTC 2013-12-11 13:56:13
    Tagged date                              : UTC 2013-12-11 13:56:13
    mdhd_Duration                            : 1213777
    And there i can read that the "frame rate mode" is variable... and that's the bad thing... I want to change that point to a constant frame rate mode. I use the H.264 codec 

  • Changing the PXI-6624 Counter Output rate on the fly

    I'm programming an application in VB.net 2005 to set several counter output channels (each with its own task) on the PXI-6624 card. I'd like to know if there is a way to change the frequency of the output without stopping the task, changing the frequency and restarting the task. I'm using the PXI-6624 card to simulate encoders and speed sensors.
    Thank you very much,
    JonS101

    Hi,
    Yes, you can change the frequency on the fly. Here is a knowledgebase that will give you an insight of how you should approach this matter. How Can I Change the Duty Cycle on My Continuous Pulse Train? To find this property node and how to use it refer to the DAQmx .NET reference: Where Can I Find NI-DAQmx Property Node Listings and Help?
    I hope it helps
    Jaime Hoffiz
    National Instruments
    Product Expert
    Digital Multimeters and LCR Meters

  • How can I change the frame rate of a project in imovie 10?

    My problem is: I made a gopro movie with a frame rate of 50 fps. I imported it to imovie. So far so good.
    Scrubbing over the clip i found one single frame which looked amazing. So I draged some seconds of that clip into the timeline (the project if you will).
    The goal was to make a freeze frame out of this "spezial" frame.
    Unfortunately I could not find this frame in the timeline any more - it's gone.
    I think imovie dropped half of the frames to fit the clip into the projekt, which I assume is using 24-25fps.
    The only solution I found is to decrease the speed of the clip to let's say 50%.
    But is there a better way?
    Can I change the frame rate of the projekt somehow? I think it was possible in imovie 11.
    many thanks
    Rainer
    (from austria)

    iMovie 10 won't share at 50 fps and so for 25 fps output probably drops every other frame.  This is different from Imovie 9 which could handle 50 fps.  However, if you do 50% speed it will use all the available frames so that is indeed the way to find the frame you want.  After you have made a freeze frame I think you can switch the clip back to normal speed.  I am not aware of a better way in iMovie 10  By the way there is also no facility to export a still of a frame in iMovie.
    As a GoPro user I think FCP 10.1 would be the best choice.
    Geoff.

  • How can I change the scroll rate of a control

    I need the control to scroll at a faster rate than what Labview provides.
    How can I change this to make the control (with up/down arrows) scroll faster without holding the shift key down and while maintianing the same increment step size.

    If you really want to go above and beyond what LabVIEW gives you, you'll probably have to program it yourself. The best way to implement custom functionality for your controls is by using Event Structures. You could, for instance, hide the regular Increment/Decrement arrows for your control and replace them with custom controls that look the same. Then register for Mouse Down events and increment the control value as fast as you want in that event case. The only difficulty comes in when you need to have multiple such controls, or if you want to package them from one app to another.
    If you want a completely self-contained function that does it all and doesn't require specific block diagram implementation, you probably want XControls. XControls allow you not only to change a control's appearance but also its functionality. The end result would be a reusable control that would look and behave however you want, but wouldn't require any block diagram code from the target application. XControls, I would warn you, can be a bit advanced. Your first is the hardest. After that it sinks in
    XControls are available for LabVIEW 8 Professional Development System and higher.
    Jarrod S.
    National Instruments

  • How do I change the bit rate for dls?? How times can I download one song??

    I'm new to iTunes. I already downloaded 3 songs when I realized that the default bit rate is 128Kbps. I tried changing the bit rate to 192Kbps with a (Variable Bit Rate) checked.....unfortunately when I downloaded the next 2 songs the bit rate turned out to be the same.
    Do I have to restart Windows or iTunes before downloading again?
    And now that I have 5 songs with a lower br than I wanted... in order for me to have(download) the song at the higher bit rate...Is it possible to download one song more than once?
    Thanx.

    You have no choice as to bit rate when purchasing from the iTunes Music Store. The official bit rate of all tracks there is 128 kbps (a very few have been reported to be at higher rates, but that's not a choice you can make, it's how the track was encoded by the record company). The setting in the iTunes Importing preference is for tracks you import from CDs only and has no effect on iTMS purchases.
    Is it possible to download one song more than once?
    No. Except in extraordinary circumstances, the iTMS allows only one download per purchase.
    Forum Tip: Since you're new here, you've probably not discovered the Search feature available on every Discussions page, but next time, it might save you time (and everyone else from having to answer the same question multiple times) if you search a couple of ways for a topic before you post a question.
    Regards.

  • How do i change music bit rate

    How do I change my music bit rate to accomodate more music on my ipod

    Alders4 wrote:
    How do I change my music bit rate to accomodate more music on my ipod
    Alders,
    You don't have to change the songs in your library.  Just use the option to Convert higher bit rate songs to sync to the iPod.
    With the iPod selected, you can choose this option, as shown below.  To save the most space, choose 128.
    Note that the first time you use this option, the sync will be very slow, as iTunes needs to convert so many files.  On succeeding syncs, it will be faster, since only new or changed files will be shrunk.
    Also note that this option puts the smaller files onto the iPod but leaves the library copies unchanged.

  • How Can I change my refresh rate to 75hz for on LCD using 91.47 drivers?

    HI,
    I use a 19" LCD and have always changed my refresh rate to 75hz to avoid ghosting in games like fifa 06 (60hz causes a nasty ghost on my 8ms panel).  I have been using the 81.98 drivers and could create an override to use 75.   The new driver will allow me to change the refresh rate to 75, but will not let me use it - I get the message "The custom resolution cannot be added".   I have coolbits2 installed.  Is there a registry setting that I can add to allow me to change the refresh rate?  If not, I'll just go back to the 81.98.  I am also using the DVI connection.
    Thank you,
    * This is on my Sli PC in my sig. *

    I know that on my particular LCD monitor, if I go above the recommended rates, then the screen will just go black and won't let me see anything.  Usually it displays a message telling me that it cannot display.  I think it especially does this with the DVI connection.
    You may have tried it allready, but just make sure that in your display properties you have unchecked the option to only display resolutions allowed by the monitor.
    You may also want to try and see if it will let you do it with a VGA connection instead of the DVI.
    Otherwise, you just may have to go back to the earlier driver.

  • How do you change the frame rate (or fmp) of a project once you have already started?

    I have been working on a project for a long time now, and I just reliezed that the frame rate of the project was 25 where as all my clips were in 30. Is there any possible way for me to change the frame rate even though I've already started the project? or do I have to start again?
    thanks

    Hi,
    I've had a really good search through our documentation and website but there's no previous record of that error code. However, a quick google search turned up lots of things on MatLab user groups and the MathWorks forums.
    MatWork's official stance is that the PCI 7342 is not supported in MatLab. They have a list of supported hardware here:
    https://www.mathworks.co.uk/products/daq/supported/ni-daqmx.html#PCI

  • How can I change the sample rate (delta X)?

    Hi, I create vi which can measure resistance, it will record the data and write to a file.
    however, I want to change the sample rate which is delta x. is that anyway I can do?
    I have try to put a clock inside the loop, it does slow down the speed but not the sampling rate.
    Please help me!!
    Thank you!

    Hello Shan405,
    Adjusting the Reading Rate of a DMM
    As noted in the above DeveloperZone article, there are a lot of factors contributing to a reading rate of a DMM. 'Sampling rate' can only be configured in digitizer mode, which can only be achieved on the flex DMMs
    Using the NI PXI-407x DMM as an Isolated Digitizer
    Regards,
    Glenn

  • Dropping frames in render.. How do i change export frame rate

    I have a film clip shot on the canon 5d which shoots only at 30fps. This was no issue in FCP as the preferences allow changing the frame rate.
    The project plays fine in color, but when it comes time to render the settings are locked at 25fps. This results in sync issues once sent back to FCP.
    Is there anyway to get around this? Is there a preference somewhere that allows me to change the frame rate in color?
    Any help would be greatly appreciated

    vink404 wrote:
    Ignore that i have worked it out
    Do share, please!
    Someone else is sure to have the same problem.
    - pi

  • How do i change my refresh rate

    hi all i have a new Imac i need to change my refresh rate , i have looked in system prefernces etc

    There is 3rd party software like Switch ResX that lets you set custom resolutions and refresh rates. I run my 15" rMBP at 48Hz since I edit and watch nearly everything 24fps and it helps reduce GPU strain. I can also set external displays to custom resolutions that they may not support officially, for example my LCD TV supports 48Hz in addition to 24, 50, 60Hz, etc.

  • How can I change the velocity rate of my animation?

    Hi all!
    I have a portion of an animation I want to play at different user-defined speeds (within a continous range of values). I saw audio and video files can be configured to that effect via their playbackRate property. Something like that but for a portion of the timeline would be great. Is that possible? I also looked into changing the framerate, but it seems it is not possible in An.
    Thanks in advance!

    Yep your are right its not possible to change the frame rate of Animate content timeline.
    But you can have the same symbol at different timeline durations and play one of them based on your parameters to give illusion of  symbol playing at different frame rates.

  • How can I change the output for certain columns only?

    I am finding it hard to explain my issue , as I am very green when it comes to database, but I will try my best.
    I am writing a script that will query a database and output 5 columns, the first and last name of a student, the last name of their adviser, their enrollment status, and how many years they have been enrolled.
    I have the student's enrollment date and graduation date stored, however not all students have graduated, so that field is null for some students.
    my question is, how can I use their enrollment status of graduated to change the calculation of how long they were enrolled for.
    This is what I have so far :
    SELECT
         STUDENTS.NameFirstS,
         STUDENTS.NameLastS,
         STUDENTS.EnrollStatus,
         TRUNC((MONTHS_BETWEEN(SYSDATE, STUDENTS.EnrollDate))/12) as Years,
         FACULTY.NameLast
    FROM
         STUDENTS,
         FACULTY
    WHERE
         STUDENTS.ThesisAdvisor = FACULTY.FacultyId
    I'm not sure where to go form here, like I said, I am very new. Thank You in advance!

    Thank you for the warm welcome :)
    My Oracle Version is 11.2.0.1.0
    Here is the create statement I used for the table.
    CREATE TABLE STUDENTS
    (StudentId NUMBER(9)                                                             
    ,NameFirstS VARCHAR(255) NOT NULL                                             
    ,NameMiddleS VARCHAR(255)                                                       
    ,NameLastS VARCHAR(255) NOT NULL                                             
    ,PhoneHome NUMBER(10) NOT NULL                                                  
    ,PhoneOffice NUMBER(10)                                                            
    ,HomeCity VARCHAR(255) NOT NULL                                         
    ,HomeState VARCHAR(255) NOT NULL                                             
    ,HomeStreet VARCHAR(255) NOT NULL                                             
    ,EnrollDate DATE NOT NULL                                                       
    ,EnrollStatus VARCHAR(255) NOT NULL                                             
    ,StudyArea VARCHAR(255) NOT NULL                                             
    ,SpouseNameFirst VARCHAR(255)                                                  
    ,SpouseNameLast VARCHAR(255)                                                  
    ,ThesisTitle VARCHAR(255) NOT NULL                                             
    ,ThesisInternational VARCHAR(255)                                              
    ,ConvocationDate DATE                                                            
    ,ThesisAdvisor NUMBER(9) NOT NULL                                             
    ,Mentor NUMBER(9) NOT NULL                                                       
    ,CONSTRAINT STUDENTS_pk PRIMARY KEY (StudentId)                              
    ,CONSTRAINT STUDENTS_Mentor_fk FOREIGN KEY (Mentor)                     
    REFERENCES FACULTY(FacultyId)                               
    ,CONSTRAINT STUDENTS_ThesisAdvisor_fk FOREIGN KEY (ThesisAdvisor)     
    REFERENCES FACULTY(FacultyId)                                                       
    And here is 2 inserts of random data
    INSERT INTO STUDENTS (StudentId, NameFirstS, NameMiddleS, NameLastS, PhoneHome, PhoneOffice, HomeCity, HomeState
    , HomeStreet, EnrollDate, EnrollStatus, StudyArea, ThesisTitle, ConvocationDate, ThesisAdvisor, Mentor)                               
    VALUES(778506631                                        
              , 'John'                                             
              , 'Jacob'                                        
              , 'Smith'                                             
              , 3125551234                                        
              , 5182293313                                        
              , 'Wilksbury'                                        
              , 'Texas'                                             
              , '14 Main Road'                                   
              , TO_DATE('04-SEP-2003', 'DD-MON-YYYY')          
              , 'Graduated'                                        
              , 'Physics'                                             
              , 'Why Move'                                        
              , TO_DATE('07-JUL-2008', 'DD-MON-YYYY')          
              , 157928743                                             
              , 997569876                                        
    INSERT INTO STUDENTS (StudentId, NameFirstS, NameLastS, PhoneHome, HomeCity, HomeState, HomeStreet
    , EnrollDate, EnrollStatus, StudyArea, SpouseNameFirst, SpouseNameLast, ThesisTitle, ThesisInternational, ThesisAdvisor, Mentor)
    VALUES(251321188                                             
              , 'Larry'                                             
              , 'Timsfield'                                        
              , 2815551200                                        
              , 'Johnsburg'                                        
              , 'Florida'                                             
              , '223 Route 54'                                   
              , TO_DATE('09-SEP-2010', 'DD-MON-YYYY')          
              , 'Full Time'                                        
              , 'Medicine'                                        
              , 'Wanda'                                             
              , 'Timsfield'                                        
              , 'Cut Me Mick'                                        
              , 'Yes'                                                  
              , 997569876                                             
              , 101325587                                             
    I don't know how to format them like you did in your reply, so they look like a quote, so I hope that just pasting them in is okay.

Maybe you are looking for

  • I have a Sony TV KDL40EX525. It does not support Netflix. Would you know if it works with Apple TV?

    I have a Sony TV KDL-40EX525. FULL HD. LED. It does not support Netflix. Does it works with Apple TV? Sony were not able to help me.

  • Function Module to read stack values.

    Hello, Is there is any function module to read the stack values. My requirement is I have 3 FM modules say FM_A, FM_B & FM_C. FM_A will call FM_C. FM_B will call FM_C. In FM_C, I need to identify whether the call has been made from FM_A or FM_B witho

  • Best Way to Move from old iMac to New?

    My super sweet new 27" iMac is due to arrive next Thursday and will be replacing my mid-2007 iMac. Each OS release has been installed on the 2007 iMac as an upgrade and hasn't been cleanly installed since it was new. Though I use TimeMachine, I was u

  • B2B Correlation using replyToMessageID

    Hi, I am trying to build a correlation using ebXML headers i.e. conversionID and RefToMessageID. I followed this blog and I managed to get some parts to work but am failing when trying to add a ReftoMessageID based on the format of the replyToMessage

  • Iphoto freezing/quitting

    Over the last few days whenever I open iphoto it gives me the message "Loading Photos" and just sits there for about 5 minutes and then quits, and gives me the error message telling me that it just quit. I was hoping that this was more of a temporary