Setting the counter output mastertimebase divider?

Hello
I want to output single short pulses with varying pauses. My MuFu DAQ card has 20 MHz master clock rate and 24 bit counter (Good ol'6052E). When I try to output 1 µs with a pause duration of more than 839 ms, I get an error due to mismatch of clockrate and counter bit size with short and long duration. This is explained in great detail in the corresponding help:
2/ counter clock rate <= X <= 2^24 / counter clock rate. with counter clock rate = master clock rate / divider
0.1 µs               <= X     <=   16777215 / 20Mhz = 839 ms
I could strech my limits by manually setting the CO.CounterTimebaseMasterTimebaseDivider to 10. But I've searched all property nodes I could find but I have not found this property.
Does anyone know where it is hidden, and to which values it can be set?
Thank you
Michael

Hi Michael,
Unfortunately that property doesn't exist.  There are a few "Divisor" properties available for other subsystems (e.g. see Analog Input timing block diagram below).
However, you'll notice in the above diagram that the valid divisors of the master timebase are only 1 or 200 (which then gives the AI Sample Clock Timebase).  You can get similar behavior on the counter by specifying to use the 20 MHz timebase or 100 kHz timebase for your source.  However, using the 100 kHz (1/10 us) timebase is going to prevent you from properly generating the narrow 1 us pulses that you require.
So, you can use 20 MHz or 100 kHz without any additional resources, but 100 kHz wouldn't allow you to have a 1 us pulse, and 20 MHz won't let you have a high or low time of greater than ~839 ms.  You could generate frequencies in between these to use as the counter timebase (either use the frequency output or use the second counter to generate the desired frequency, or perhaps configure a dummy analog task) but of course there would always be a tradeoff between the resolution of the pulse and the maximum time between pulses.
If you do have the 2nd counter available, here is my suggestion to get the best of both worlds:
1.  Configure a counter output to generate a pulse every N seconds (I suggest configuring the output to generate at 1/N frequency at 50% duty cycle).  When you configure this counter, DAQmx will choose an appropriate timebase for you.  When N is less than ~1.67 seconds, DAQmx will use the 20 MHz timebase (since both the high and low time would be under the 839 ms).  When N is > 1.67 seconds but below ~335 seconds, DAQmx will use the 100 kHz timebase.  If you intend on modifying the rate of the output (to something above 1.67 seconds) after the task has started you would need to make sure to specify to use the 100 kHz timebase rather than relying on the DAQmx default.  You can't use a built-in timebase if you want to generate a delay greater than 335 seconds, but if you wanted to you could handle this case by checking for it and configuring the frequency output to generate an even lower timebase.
2.  To generate the actual output signal, configure a retriggerable single pulse generation to be triggered off of the signal generated above.  This signal will be based off of the 20 MHz timebase (assuming you configure a pulse width less than ~839 ms) and so will give you a good resolution on the available pulse widths that you can generate.
In summary, doing this would let you decouple the resolution of your generated pulse width from the resolution of the delay between the pulses.  The downside is that it uses two counters.
The other option which I previously mentioned (and what you were asking about) would be to find a timebase that meets the two requirements: 1) fast enough to generate a narrow pulse and 2) slow enough to not roll-over between pulses.  You have 100 kHz and 20 MHz available to you, but you can generate intermediate frequencies using the frequency output.  If you plan on using a counter to generate the timebase instead, you should consider the other option which decouples the two counters.
Of course, using a device with a higher counter resolution (most newer DAQ devices use 32-bit counters) would probably also resolve your issue depending on the full range of  delays that you need.  The downside here is the cost of new hardware.
Best Regards,
John Passiak

Similar Messages

  • Pause the counter output in DAQmx

    Hi~
    I used two counters output on PCI-6602 card in LV7.1 to generate a PWM to control the velocity of two motors that control the position of mechanism.(Encoder was set on the motor.)
    When I set the same duty cycle in two counters, the position of two mechanisms were different(Two mechanisms were the same),that means one velocity of motor was fast, the other was slow.
    May I pause the counter output of the fast motor to wait the slow motor??
    ====================
    ●LV Version:LabVIEW7.1
    ●OS:WindowsXP(SP1)
    ●Hardware:PCI-7344, PCI-6602, PCMCIA 6024E

    Assuming you're using DAQmx, you can set up a Pause Trigger for each of the counters.  (A similar function can be done in traditional NI-DAQ too).  You could, for example, configure 2 different digital bits to be used to pause the 2 PWM counters independently.  The way 'Pause Triggering' works is that the counter's pulsetrain only goes to the output pin when the pause trigger signal is in the correct logic state.  This can be set to be low or high by programming. 
    You may also want to characterize the speed difference of your actuators, and give them correspondingly proportional PWM duty cycles.  That would do a better job of keeping them in sync throughout the motion.
    A feedback signal would give you even better options for control.
    -Kevin P.

  • Setting the default Output Name for the Export Media dialog

    In File | Export | Media the Export Settings always show the wrong Output Name, from a project I did several days ago. If I change it for this export, the wrong path just comes back again for the next export.  I don't know how I accidently  got it set for the earlier project.  I don't see any way to set it. Could someone tell me where this is set?  I'm running PrPro CS4.
    Thanks

    dkeubnasoieng wrote:
    I'd read earlier the update wasn't a good one so had avoided it. The
    real frustration comes from not finding how I did it a couple months ago!
    I do not know where you read that but there is nothing wrong with the update.
    Here you will find the latest update.
    http://www.adobe.com/support/downloads/product.jsp?product=98&platform=Windows

  • Setting the PO output type

    Hi All,
    I have requirement where I need to set the output type of PO to XML always.
    Has anybody done this before? Please let me know.
    Regards
    Amitabh

    Hi,
    For XML,XI is mandatory.
    You first have to activate XI in IMG.
    Then, set XML as the default output in IMG (PO Output Settings/Actions).
    Then, go to the vendor master (from web side) and select XI as the transmission.
    If you dont want to use XI,see the foll thread for workaround:
    Re: Transmitting PO using XML
    Related  threads:
    Re: How to send PO to XI using BBP_PO_SEND_XML
    XML PO Transfer To Vendor in SRM 5.0 via NW2004S/PI 7.0
    Re: SRM 4.0 Send PO to XI
    Re: Exporting PO from standalone
    Re: Urgent:SUS PO not appearing in the PO list for vendor's user
    Re: SLD system has not been assigned ? :-(
    BR,
    Disha.
    Pls reward points for useful answers.

  • The counter output is not a smooth increment, it looks like a stairway

    I am trying to smooth out the rpm reading from my counter 0 on a PCI-MIO-16E-4 daqboard. When I increase or decrease the speed, to 0 RPM it looks like a stairway going up and down.

    It sounds like a discretization effect that can arise if you figure RPM by counting edges and dividing by the sampling period.
    For example, suppose your sampling period is 0.010 sec (100 hz sampling rate). Your edge count can only change by discrete integer amounts each sampling period. The change may be 0,1,2,3,... counts leading to calculated frequencies of 0.100,200,300,... hz. But you will only ever see these discrete values, hence the stair-stepping effect when you accel or decel your device.
    Odds are you can get much more precision using the buffered period measurement technique -- though you'll also likely get substantially more data to handle. In this method, you'll use the high-frequency internal timebase (20 MHz) to measu
    re the intervals between your device's pulses.
    For example, suppose your device pulses at 1250 hz. Each interval will measure 16000 cycles of the 20 Mhz timebase. Now if you have an off-by-one discretization error, you'll get 16001 cycles in an interval for a measurement of 1249.92 hz.
    There's a really good tutorial about frequency measurement error posted here.
    -Kevin P.

  • Setting the count of display in User Admin

    Hi..
    does an one know that where and how can we set the no. of users to be displayed for the ""user admin"" containing the users list for the UCM user list.

    See how can I prevent users from creating roles in the UME tool? (please avoid crossposting).

  • How can I set the HDMI output to 1366x768?

    1024x768 is an option from the ATV to the HDMI Port.
    But my TV is 16:9 and has the resolution of 1366x768 when I plug a computer into the HDMI port.
    If 1366x768 is not currently possible from the ATV, could apple be so kind as to add it,
    thanks,
    Jonathan

    slenpree wrote:
    as previously stated 1366x768 is the resolution of the TV and has not been pulled out of a hat.
    1366 x 768 is the number of pixels in the screen, it remains to be seen whether it's a resolution the TV will accept, but it likely will since it appears to accept 768 lines of resolution.
    However, the Apple TV outputs several widescreen standards for HD and ED, it also supports some graphics display resolutions, presumably for older non-wide screen projectors. The problem with graphic display resolutions is that there are many of them including non-standard resolutions.
    The Apple TV supports Full HD, HD and ED, it also supports VGA, SVGA and XGA, your TV has a pixel array that would fall into a classification known as WXGA which is non-standard to begin with but also includes 4 other resolutions which are also non-standard, WXGA is primarily a 16:10 aspect ration before a 19:9 one, so whilst you may not like it, the pixel array used by your TV has been pulled from a hat in terms of standard resolutions.
    AC mentioned something above which I'd like to expand on:
    Panels will always give sharper pictures when displaying output at native resolution, which is what you are trying to achieve.
    This is essentially correct but only part of the wider picture so far as your TV is concerned, (it isn't actually what you are trying to acheive). Content doesn't (widely) exist at 768p. Generally speaking you will only have content at 480p, 576p, 720p or 1080p, so something needs to convert this to 768 lines of resolution for your TV.
    There are two devices in the chain that can perform scaling, the TV and the Apple TV. In different scenarios this can lead to one or the other device doing the scaling or in some cases both. When setting up a system, one should note the capabilities of each device and try several options (if they are available) to get best results according to which device is best at scaling.
    However given your observations, it is obvious that the Apple TV is much better at scaling than your TV, which given the pixel array on your TV is a little absurd, since very few devices (DVD players etc) will offer 768 lines of resolution and your TV is always likely to be doing some scaling.
    Whilst you may not like the terminology of being pulled from a hat, your TV's pixel array is a non-standard size. There are as mentioned previously many non-standard sizes, to make them all available on the Apple TV just because some TV's perform inadequately when scaling isn't realistic.

  • Is it possible to set the sound output to Firewire and HDMI at the same time?

    I would like to use Amarra for playing music thru the Firewire to a DAC and I would like the family to be able to use the MacMini for streaming sources thru the HDMI without having to change any settings every time. I'm running 10.8. Is that possible thru any special settings or separate software?
    Thanks in advance
    Harry

    The Apple Support Communities are an international user to user technical support forum. As a man from Mexico, Spanish is my native tongue. I do not speak English very well, however, I do write in English with the aid of the Mac OS X spelling and grammar checks. I also live in a culture perhaps very very different from your own. When offering advice in the ASC, my comments are not meant to be anything more than helpful and certainly not to be taken as insults.
    Do some web searches for using software called Soundflower in conjunction with other 3rd party audio software to set up your own audio input and output sources.
    That is all I know about it. I have read a few ideas for doing such things over the years.

  • I want to set the sound output channel per application.

    So iTunes and Spotify via my airport express, but normal youtube videos, or any other mac apps such as Safari via the internal speakers. Can this be set (forced) or do I need to switch manually all the time, by holding down the alt-key and pushing the volume icon?

    With the Late 2008 model 5,1 Aluminum Unibody  there is an adapter that uses the Mini DisplayPort and a USB port to combine video and audio to HDMI. It's only 2 channel stereo not 5.1 Dolby Surround.
    http://www.monoprice.com/products/product.asp?c_id=104&cp_id=10428&cs_id=1042802 &p_id=5969&seq=1&format=2
    If you connect the MacBook using a Mini DisplayPort to HDMI adapter you will probably need to use external speakers or a 3.5mm stereo headphone jack to RCA sound plugs connected to a stereo sound system if your TV doesn't have separate RCA input plugs or a 3.5mm stereo input plug for audio with the HDMI plug. The Mini DisplayPort to HDMI doesn't carry audio unless you have the Mid 2010 model 7,1 and there're no audio plugs on most TVs to work with HDMI since it's expecting audio with the HDMI.

  • How do I set the default output? The one where BIOS appears.

    Currently it's the DVI, I want the default to be the DP.
    Thanks.

    You can't change that manually. If you wnat to contact MSI about it: >>How to contact MSI.<<

  • 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

  • Can I set the audio INPUT to my pre-amp, and audio OUTPUT to the built in?

    I am using Logic Express 7. I want to set the audio input to my Firefox pre-amp, but set the audio output to my computer's built in speakers. I want to essentially record into the pre-amp and listen to the playback through my speakers. I can easily do this in GarageBand, but haven't found a way in Logic.

    The remaining problem I'm having is when I record into an "Audio" track via my microphone which is plugged into the Firebox, I'm still only hearing the playback from the Firefox headphone jack, not the computer's built in speakers.
    Did you select your new aggregate device in Logic's audio preferences? If so, then the problem is probably with your settings in the control panel which controls the Firebox - I don't use it, so I don't know what it's called, but it controls the routing and monitoring for the Firebox. Check the Firbox manual - there are probably two settings, one for playback and one for direct monitoring when tracking.

  • At the end of test, how do you set the DAQ driver output to zero.

    I'm a new LabVIEW user,I'm reviewing an existing program that has a clearall.vi which supposed to set the DAQ output 6025E to zero volts at the end of each test. But after turning the power supply off to UUT, the Vcc on UUT still measures between 2-3.5v I checked some of the output Port A-C and DIO still puts out 5.1v. I checked the output port bit status in the program and says it sets at zero logic. Confused and thanks for your help.

    Hello,
    Unfortunately, I am unfamiliar with the clearall.vi. If it was not a VI that was created by National Insturments, then we will not be able to support it. If it was, maybe you could direct me to where I could find it.
    What it sounds like you want to do, however, is to ensure that your digital outputs are placed at 0 when your application completes. Are you using a digital I/O device, which one? When a digital line is written to, it will retain that value untill it is written to again or reset. Therefore, I think what you want to use is the Device Reset.vi. This VI will return your digital lines to their default value. The knowledgebase titled "What is the State of My Digital Lines After Performing a Digital Output Operation?" and located http://digital.ni.com/public.nsf/websearch/E309E3FCC758DB1586256C8600702CE1?OpenDocument talks more about this.
    By the sounds of it, you have your digital lines from your device connected to the Vcc line on your UUT, and that a voltage is still being provided even after no power is supplied to that unit. What you may want to do, just as a test, is to manually tell the device to write a zero, and then measure the same readings that you currently are to compare them.
    Post back to this forum if you have further questions after reading this discussion.
    Sincerely,
    Jared A.

  • 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

  • How to filter starttrigger on counter output precisely

    HW PCI6602
    Measurement studio 2008 (C#)NI-DAQmx 9.02I’m trying to trig a camera using the output from a counter.
    The camera should be trigged when the counter input pulse width is larger than approx (filterPulseWidth 10us).To do this a have set up the following tasktask.COChannels.CreatePulseChannelTime(counter,                "TriggerTaskChannel", COPulseTimeUnits.Seconds, COPulseIdleState.Low, 0, 80E-6, 0.007);             task.Triggers.StartTrigger.Type = StartTriggerType.DigitalEdge;            task.Triggers.StartTrigger.DigitalEdge.Edge = DigitalEdgeStartTriggerEdge.Rising;             task.Triggers.StartTrigger.Retriggerable = true;task.Triggers.StartTrigger.DigitalEdge.DigitalFilterMinimumPulseWidth = filterPulseWidth;            task.Triggers.StartTrigger.DigitalEdge.DigitalFilterEnable = true;Unfortunatly this filter has the following behaviour”If the period of the filter clock timebase is tfltrclk, this filter guarantees topass pulse widths that are 2*tfltrclk or longer and to block pulse widths thatare tfltrclk or shorter. A pulse with a width between these two ranges may ormay not pass, depending on the phase of the pulse with respect to the filterclock timebase”.It means that I have no sharp distinction on my filter as one would when applying a filter to an ordinary pulse width measuring task. Implementing this with via the software in a callback is to slow.The bottom line is that I would like to generate a pulse on my counter output when the trigger/counter input is greater than say 10us. The output pulse could be predetermind as in the sample code above or as long as the filtered input (I.e counter just pass filtered input to my output).How can this be done? BR
    Jongas
    Solved!
    Go to Solution.

    Hi Jongas,
    Is it OK if the trigger is sent once the pulse hits 10 us, rather than
    on the exact falling edge?  I'll assume the exact timing isn't as important, but you would like the trigger to occur very close to the falling edge (within a couple of us).  The important thing is that we trigger as close as possible to when the PWM has hit 50% duty cycle.
    Some brainstorming:
    Digital Filtering on the 660x Isn't the Best for This:
    Digital filtering might not be as practical here on your 6602 due to the region of uncertainty between 5 and 10 (or 10 and 20) us pulses.  The TIO boards count two consecutive edges of a filter clock to determine when to pass a signal through so the guaranteed rejected pulse width is always half of your guaranteed passed pulse width (providing an external filter clock timebase that is synchronized with your external signal could potentially reduce this uncertainty but I honestly haven't tried this before and I would imagine it is not going to be very straightforward).
    X Series Alternative:
    Our X Series devices use a different method of digital filtering that would work better for you.  If a hardware change is an option (and you can use PCIe) then you might consider this.  You could use the 20 MHz timebase as your filter clock timebase and could guarantee to pass 10 us (200/20M) and reject 9.95 us (201/20M).  The 6320 is currently our lowest cost X Series board.  A couple of points about this solution:
    1.  To configure the PFI filter, you need to use some sort of dummy task to
    access the property nodes.  Here is an
    example of this (although it is written in LabVIEW).
    2.  You can route the filtered PFI signal to be exported on another PFI line, but this will reserve Counter 3.  This is documented in the Device Routes tab of Measurement and Automation Explorer.
    3.  The filtered output will be 9.95-10 us delayed from the input signal, so you could trigger the camera off of the rising edge of the filtered output directly and be fairly close to the actual falling edge.
    External AND Gate Alternative:
    You could configure a Counter Output to generate a re-triggerable pulse with a 10 us initial delay (to be triggered off of the rising edge of your PWM signal).  Assuming the pulse is short enough to complete before the next period of your PWM signal, the counter output would only be high at the same time as the PWM signal if the signal was longer than 10 us.  Use the external AND gate to combine these two signals and the result would be the trigger for your camera (the rising edge would correspond to 10 us after the PWM signal first goes high).
    If you wanted to you could make the counter output pulse a little longer (say 8 us) and trigger the camera off of the falling edge out of the AND gate (a.k.a. rising edge out of a NAND gate) which would line up with the exact falling edge of the PWM signal.  Don't make the CO pulse too long or it will overlap with the next period of the PWM.
    Another Idea:
    One idea that I keep coming back to is to use the internal rollover event of a counter input task (a pulse is generated whenever a counter rolls over on its Internal Output which can be routed to a PFI line).  I don't think this will work, but the idea in theory would be to:
    1.  Set Default state to known value (e.g. 2^32-200).
    2.  Gate the Counter so it only counts during the time PWM is high.  Have it count the 20 MHz timebase.
    3.  Reset the Counter to default state on the falling edge of the PWM signal.
    4.  The counter would rollover if 200 pulses occurred of the 20 MHz timebase (10 us), and the Counter Output could be routed to a PFI line to trigger the camera.
    The problem is that there is no good way to reset the counter except for an encoder measurement (Kevin has already made a nice suggestion about this).  A Pulse Width Measurement would technically reset the counter, but you cannot currently set the default value of a Pulse Width Measurement task so there is no way to make the rollover happen prematurely).
    Configuring an encoder measurement and working with the multiple counters on the 6602 to produce appropriate A,B, and Z signals might be a method to look into further, but at this point I think you'd be better off with an external AND gate.
    I don't want to say it's impossible with just the 6602, but I can't think of a straightforward way to go about it without external hardware (although maybe I can sleep on it and think of something later... how many counters do you have to work with?). 
    With your current NI Hardware, I think your best bet is to go with an external AND gate.  If you're planning on purchasing an X Series card the digital filtering idea is actually not a bad way to go.
    I hope this is helpful!
    Best Regards,
    John Passiak

Maybe you are looking for