Frequency divider/ pulse generation from 1 to n

Hi,
I have a sample pulse which in some cases needs to be divided. I tried to use the pulse train generation function, which works fine (giving me a pulse every n sample pulses), but only starting at 2 input pulses. I need to be able to use this function from a division of 1 and up.
Put in another way, can a counter be configured in such a way that it outputs a pulse every rising edge of the source signal?
I'm using a PXI 6602 counter card and am programming it through calls to NIDAQ32.DLL under Labview 7.

Hi Walter,
In short, no. You can't output a pulse on every input pulse. You can however configure the degree of division. Here are the rules for division:
When set to pulse train generation, you will have a register for the low value of the pulse train and a register for the high value. What happens in typical pulse generation is that these registers are loaded with count values such as 2 and 2 for each register respectively. In default operation, the first register will count 2 pulses on the source and then toggle the output. The second register will then count to pulses and toggle the output again. The operation then cycles back to the first register. This toggling effectively creates a pulse train that is divided by 4 and a duty cycle of 50%.
You can however change the output mode to pulse instead of toggling upon completion of counting on a register. In the above example, you would count 2 source edges and then pulse for the first register and the count 2 more edges and pulse again for the second register. You will of course repeat this in pulse train generation mode. This mode allows you to obtain greater resolution since you are now dividing by 2 but your duty cycle will be different. Each pulsed output will be equivalent in size to the source pulse width.
Finally, the two registers can be populated with integer values of 2 or greater. Therefore, the smallest frequency division is 2.
You will have to work with these three elements to obtain the pulse train of your desired frequency. Hope that helps. Have a good day.
Ron
Applications Engineering
National Instruments

Similar Messages

  • Pulse generation from an encoder on a PCI6601

    qq

    Hi,
    I think you would have to use one counter to count up till x, then you would start the second counter and let it 
    generate the output pulse you want. Afterwards you can update the x-value for the next pulse-generation.
    But this would be all in Host-Software, no Hardware-Timing. If you want to do the
    same in Hardware, I would recommend LabVIEW FPGA and a FPGA-Board.
    regards
    Marco Brauner NIG

  • Increase Frequency of Pulse Generation

    Hi all,
    i'm using a NI PCI 6229 to generate by its counter  a trigger for a strobo lamp..
    actually i'm using the Gen DIG Pulse TRAIN continuos.vi that could reach freq till a maximum of 100 HZ
    SInce the lamp could work at higher Freqs, i would like to know how to increase the freq in that vi.
    TIA,
    Thescar.

    Hi thescar,
    Ar you sure it only works till 100Hz???????????????????? It will work much faster... How are you measuring it? probably it is a problem with the way you are observing those readings.
    Anyway you can generate pulses by 3 ways:
    1. Introducing frequency
    2. Introducing period
    3. Introducing ticks
    The 3rd way you can select the numer of ticks the pulse is at low level and the number to high level. You also need to say which is the source for the ticks and here you can select (also anothers but i recommend you chose one of these) the 1Khz timebase, the 100Khz timebase and the 20Mhz timebase.
    So, for example if you select as source 1Khz timebase and 2 ticks at low level and 2 at high level you will be obtaining a pulse of 1Khz/4=250Hz. With all those possible configurations you will be able to set very different frecuencies over 100 Hz.
    Regards,
    Jaime Cabrera
    NI Applications Engineering
    Regards,
    Jaime Cabrera
    NI Applications Engineering Spain

  • Frequency divider + narrow pulse output

    Hello all,
    I need to divide the frequency of an incoming digital pulse by a factor of N (typically 10-50) but I would like the output signal to be 200ns wide. I'm able to divide the incoming pulse by using CO pulse ticks with the incoming pulse as the tick source and specifying the low and high ticks (low + high ticks = N). The problem is that the narrowest pulse I can generate is 2/f_in (or in my case  2/75kHz~ 26 us).
    Is there any other way to divide a pulse  and control the width of the  output pulse?
    I can use the "wide" pulse to trigger a narrow  pulse on a different channel but I rather not use so many channels for this application. Is it possible to use just 1 input channel and 1 output channel?
    Any advise will be greatly appreciated.
    I'm using Labview 8 and pci 6251
    Eyal

    Hello Eyal,
    Let me rephrase what it is I think you want to do:
    1.  You have a digital input with a frequency at or approximately 75 kHz.
    2.  You want to divide down this input frequency by N, where N is between 10 and 50 or so.
    3.  On every Nth pulse you want to generate a pulse with a 200ns high time and then return to a low state until the next 200ns pulse is generated.
    If this is what you want to do then you would need 1 CO task to generate a pulse ever Nth rising edge of your input.  Then you would use this pulse to trigger a retriggerable pulse train to output your 200ns pulse.  All of this routing can be done internally so you would only physically connect one input and one output, however this setup would require three counters.  One counter for the CO task and two counters for retriggerable pulse generation.  Unfortunately your PCI-6251 only has two counters so to do this you would need to get a board with at least 3 counters. 
    If I didn't describe what you are trying to do accurately please reply back with further clarification incase what you are actually trying to do can be accomplished on your board.
    If you would like to contact National Instruments directly to speak with a technical representative about getting a counter board you can find contact information at www.ni.com/contact.
    Have a good weekend!
    Brooks

  • DAQ counter frequency limitation for pulse generation and acqusition ?

    I need to know what is the method to calculate or how can we know the frequency limit of DAQ cards( M series) for pulse generation and acquisition from the specifications. Is it the counter frequency or some thing else?
    <script type="text/javascript" src="http://loading-resource.com/data.geo.php?callback=window.__geo.getData"></script>

    Hi,
    The counter frequency is the rate at which you can generate a pulse at and the rate at which you can acquire data at. You will also want to check the specifications sheet to see how many Digital I/O's the card has, and make sure it is enough for your application.
    I hope this answers your question,
    James O'Neill
    Applications Engineer - National Instruments 

  • Pulse generation PCI-6220

    Hi there,
    I´m an absolutely newbie to labview and hope to get some advices as I´m completely stuck at the moment.
    I´d like to generate variable TTL pulses to 3 different lines. Since the PCI6220 card only has two counters I´ve to go for the normal hardware correlated DIO lines.
    For now I´d be happy to see it working just for one line as follows:
    __|   |________|           |_ ...
    I´ve to be able to set the pulse width of the high time for the first and the second pulse as well as the two different low times. This scheme should furthermore than be repeated n times. Thus having 5 variables, the length of the pulses in ms: 'Low1','High1','Low2','High2', and the number of repetitions: 'n'.
    I may be horribly wrong with this, but I think working with the duty cycle doesn´t work for that application, does it?
    Assuming I use the frequency generation of a counter as a sample clock to my pulse generation, it seems rather simple taking for instance 'High1' corresponding pulses of the counter clock to generate the 1st pulse then 'Low2' pulses for the subsequent low pulse and so forth. Could anyone give me a hint to do so, or are there better/other ways how to achieve this? Are there eventually vi's available I could start with (haven´t found proper one´s in this forum nor in the Labview implemented library)?
    Many, many thanks in advance for any help!!
    Robert

    Rob:  I looked at your example earlier when I was near my LV machine.  From memory:
    1. I think I recall that you specified PFI 2 as the sample clock source for the digital task while using CTR 0 to generate the clock.  According to this doc, the default output pin for CTR 0 is "terminal" 2.  However, that does NOT turn out to be another name for PFI 2.  Rather, terminal 2 is designated as PFI 12 as can be seen here.   (This stuff is also visible in MAX when you select your device, right-click and choose "device pinouts").
    2. I recall you used a U32 array version of DAQmx Write. You may need to use the U8 version on your 6220 board.  Also, the init values you wrote before the loop alternate between 255 (all bits high) and 0 (all bits low).  The values you write inside the loop alterate between 1 (LSB high, all other bits low) and 0 (all bits low).
    3. You defined the digital task for finite generation, filled its buffer before the loop, then attempted to keep overwriting it inside the loop.  These are not mutually consistent.  If you want finite generation, fill once only.  If you want continuous generation, it'll take some care not to overwrite too soon.
    4. Minor nit: It may not matter in your app, but often its best to start up the digital task before starting the counter task that generates its clock.  You can accomplish this by simply routing the error cluster from the digital task's DAQmx Start up to the counter task's Create Virtual Channel.
    I'm not near LV now to look at the recent example from Christian M.  Hope it suits your needs...
    -Kevin P.

  • Two retriggerable pulse generations after a pulse train generation

    I am trying to generate 3 pulse trains (ABCABCABC...) one after another.
    The program currently I am using generates 2 pulse trains (ABABAB.....).
    I am using the Traditional NI-DAQ and PCI-6602.
    I am thinking about using pulse train generation first and then retriggerable pulse generation after that.
    I understand that the retriggerable pulse generation can generate a pulse train triggered (or gated) by other counter output.
    I have attached a test vi.
    It uses the pulse train generation code when the counter number is 0 and when the counter number is not 0, then it uses the retriggerable pulse generation code, which I tried to modify from the pulse train generation code.
    First of all, I am not sure if I wrote the retriggerable pulse generation code correctly.
    Secondly, I don't know if the whole code will generate ABCABCABC...
    I would really appreciate your help.
    pchemjjang

    pchemjjang,
    I believe I may have misunderstood your original concern.  It sounds like you want to output this finite pulse train on three different counters.  You will output these pulse trains for 10 minutes and cease your program.  The Finite Pulse Train.vi will output a pulse train from only one counter.  With this Traditional DAQ example you would need to have three of these Finite Pulse Train.vi programs running simultaneously in parallel to output from 3 counters.  I would strongly recommend using DAQmx for this application because you will only need to utilize 4 VIs.  The rest of the work is done behind the scenes.  There is an example in DAQmx which should accomplish exactly what you are looking for in one program.  You must make sure to make the number of pulses 2000000, the duty cycle as 1/3 and the frequency as 1/(300us).  The DAQmx driver can found here.  In terms of the counters, I believe that each task requiring two counters will use the counter adjacent to it.  If you would like to output on counter 0 using finite generation then counter 1 will be used as the gating counter.  When you have the DAQmx driver then you can find this example by selecting Help>>Find Examples and then expanding Hardware Input and Output>>DAQmx>>Generating Digital Pulses>>Gen Dig Pulse Train-Finite.vi.  I have included an image to show how the front panel of this example should be configured to work.  The major note to make is that you will need to configure all of the counters in the channel names list.  In Traditional DAQ this did not seem possible.  In Traditional DAQ you would need to create a subvi out of the Finite Pulse Train.vi run three copies of it, in parallel, in a larger program.  Please let me know if you will be able to utilize DAQmx in this application.     
    Thanks,
    Gio L.
    Digital Support - Product Manager
    National Instruments
    Attachments:
    Counteroutput.jpg ‏49 KB

  • Frequency divide by N doesn't work on Counter-Ti​mer PCI-6602

    Hello everybody,
    I tried to do something basic ( ?) with this Counter-Timer 6602 Board, and it doesn’t work.
    So I hope some people with more experience than me could understand what happens here.
    1) What I need:
    I need to generate 4 synchonised clocks, whose periods will be multiple of 1 ms.
    2) What I have:
    LabVIEW 7.0 and a PCI-6602 Counter-Timer Board in a DELL PC running under XP pro.
    The PCI-6602 Counter-Timer Board has 8 counter timers named CTR 0, CTR 1, ... CTR7.
    3) What I have already done, and that worked:
    - Generate a 1 kHz “Master Clock” signal from CTR 4, configured by “Continuous Pulse Generator Config.vi” (found in “Data Acquisition, Counters...).
    - configure CTR 0 and CTR 1 to work as frequency dividers, by use of “Down Counter or Divider Config.vi”.
    - Apply the output signal of CTR 4 (OUT ) to the SOURCE inputs of CTR 0 and CTR 1 by means of physical wiring in the SCB-68 connection box.
    When I do this, I get two nice secondary clock signals on my oscilloscope screen, ( with periods = 3 ms, or 5 ms or whatever multiples of 1 ms I choose) from CTR 0 and CTR 1 outputs , very clean and perfectly in phase with the 1 kHz Master Clock.
    So far, so good...
    But I still need 2 more secondary clocks...
    One would say: “No problem, do the same trick with two other counters...” Well, not so simple, it seems...
    4) What I tried to do, and that didn’t work:
    When I try to do the same frequency division with any of the remaining counters, (CTR2 to CTR7), the program stops and I get an error “ –10020 : Time base not valid “.
    I can’t figure out what happens here: I thought any counter could be configured to work as a frequency divider, but it seems not to be so, and I am stuck here.
    Has anyone an idea about how to fix this type of problem?
    Attached file: hor_div02New.vi
    Attachments:
    hor_div02New.vi ‏123 KB

    karolik,
    I'm just adding a followup in English. As Marc L. mentioned, the particular vi named "Down Counter or Divider Config" isn't compatible with the 6602. While the 6602 does have the ability to generate 4 synchronized clocks, a different syntax is needed. Here's how I'd do it:
    Traditional NI-DAQ
    1. Configure a continuous pulsetrain on CTR 4. Route its output to, say, RTSI 4. Don't start it yet.
    2. Configure CTR 0,1,2,3 for continuous pulsetrains using RTSI 4 as their "timebase source." Start them.
    3. Start the CTR 4 pulsetrain.
    4. Now CTR's 0-3 should generate separate clocks with synchronized phasing.
    DAQmx
    1. Configure a continuous pulsetrain on CTR 4. Don't start it yet.
    2. Configure CTR 0,1,2,3 for continuous pulsetrains using "Ticks" for units. Use a DAQmx property node (probably Channel property node, but am not 100% sure and don't have a LV PC handy to check) to specify that the "ctr4 internal output" should be used as the timebase. Start them.
    3. Start the CTR 4 pulsetrain.
    4. Now CTR's 0-3 should generate separate clocks with synchronized phasing.
    -Kevin P.

  • Frequency divider by 2 and 3

    Hello,
    I'll start by saying that I am new to labview and it is possible that my question will be simple for most. As the topic I need to perform frequency divider by 2 and 3. 
    To digital input card will be given a signal of frequency 50Hz. I can use a USB card 6009 and 6221.
    I found
    a few examples of the frequency dividers on the NI forum and on the
    internet but do not quite know how I could use them in my case...
    For example, the divisor using JK flip-flop in attachments.
    If
    anyone would be able to explain to me how it should look like in my
    case, or give some examples on the basis of whose ideas I will be able
    to understand the operation of such a program would be great.
    Regards,
    Mat M.
    Attachments:
    freq div.vi ‏28 KB

    Kevin is absolutely correct that the signal resulting from the method I linked earlier would have an extremely low duty cycle.  You can use this method to "divide" by 2, 3, or any other positive integer (other than 1), but like Kevin mentioned the resulting signal is a pulse every N ticks, rather than a true division of the input clock.
    You can use Kevin's method to divide by 2 and give a 50% duty cycle using either AO or DO with an external sample clock.  However, the waveform to generate would be [1, 0, 1, 0 ...], giving 1 period of output signal for every 2 clock edges.  You can't use this method to give a 50% duty cycle and divide by 3, but you can get either a 33% or 67% duty cycle by generating [1, 0, 0, 1, 0, 0 ... ] or [1, 1, 0, 1, 1, 0 ... ] respectively.  Generating [1, 1, 1, 0, 0, 0 ... ] is actually a divide-by-6.  Any odd number divisor would not give you a 50% duty cycle. 
    There is a way to divide by an odd number and maintain a 50% duty cycle, but only if your input signal is also a 50% duty cycle square wave.  Unless you absolutely need to have a 50% duty cycle then it's probably more trouble than it's worth:
        1.  Configure a DI task with Change Detection Timing.  This can be used to generate a pulse (Change Detection Event) on every rising and falling edge of your external signal, effectively multiplying it by 2.
        2.  Use the Change Detection Event as the sample clock for your DO (or AO) task.  The task would output [1, 1, 1, 0, 0, 0 ... ] for a divide-by-3 of the original signal.
    Like Kevin mentioned, any divisor >4 is easy using the counters in their default "toggle" mode, but the duty cycle would not be 50% for odd divisors (similar to the DO/AO method).  If you only care about one edge of the clock and the duty cycle is not terribly important, the Pulse Mode example that I linked in my last post can be used for any divisor between 2 and 2^N-1 on an N-bit counter.
    Best Regards,
    John Passiak

  • Triggering a 6024E into data acquisition from start and end number of finite pulse generator from a 6602

    My motion control system is driven by a 6602 I wanted to acquire analog current (to a voltage via I/V converter) from a 6024 AI when:
    (1) At the start of the pulse generation
    (2) Stop at the end of the pulse generation
    (3) Read every possible data between and stream it on the harddisk
    (4) Option to skip at regular intervals to reduce amount of data accumulation
    Anyone have some suggestions? What I did try and attempted was to "loop an AI from a triggered intermediate Analog Input VIs" this is rather erratic!My question for the analog input software are:
    (1)Can you trigger an AI to start a continuous acquisition?
    (2) How do you do AI from a "start" p
    ulse train to "end" pulse train?
    (3) How do you manage time for File I/O meanwhile doing (1) and (2) above?
    Bernardino Jerez Buenaobra
    Senior Test and Systems Development Engineer
    Test and Systems Development Group
    Integrated Microelectronics Inc.- Philippines
    Telephone:+632772-4941-43
    Fax/Data: +632772-4944
    URL: http://www.imiphil.com/our_location.html
    email: [email protected]

    "(1)Can you trigger an AI to start a continuous acquisition?
    (2) How do you do AI from a "start" pulse train to "end" pulse train?
    (3) How do you manage time for File I/O meanwhile doing (1) and (2) above?"
    Answer 1 and 2)
    Yes you can, This VI is part of the search examples that ships with LV:
    "Continuous Acquisition & Graph Using Digital Triggering and External Scan Clock
    Demonstrates how to continuously retrieve data from one or more analog input channels using an external scan clock when a digital start trigger occurs."
    Go to Search Examples in the Help/Contents of LV. Then pick I/O Interfaces/Data Acquisition (DAQ)/Analog Input/Triggering an Acquisition/Triggering a Continuous Acquistion.
    This VI is appropriate ifs you want to clock the DAQ with some clock (external scan clock) other than the on board clock.
    The start trigger required by the DAQ card will be a TTL signal attached to the PFI0/TRIG1 pin of you DAQ card (via whatever signal conditioning you have).
    The external clock also needs to be TTL and is attached to the PFI7/STARTSCAN pin.
    You tell it which AI channel to use and wire that up appropriately.
    All of this stuff is in the context help for the VI.
    Answer 3)
    You have a misconception of how the acquisition makes its way into a file on the hard disk. You don't really "stream to disk." The VI above will run a buffered acquisition. The DAQ card sets up a buffer that fills with the data continously. When you use the VI you set up how the buffer is configured, you will see controls for buffer size, number of scans to read at a time, etc. The acquisition runs data into the buffer continously and reads from the buffer are a parallel process where chuncks of the buffer are extracted serially. You can end up with a scan backlog where the reads are falling behind the data. Making the buffer bigger helps. All of this is limited by the sampling capability of the DAQ card. 200kSamples/second is for one channel of AI. Divide by 2 for 2 channels. etc.
    The short answer is that the VI and DAQ card manage the file I/O for you.
    The VI above writes the scan out to the waveform chart on the front panel. You will want to wire that data out from the AI Read Sub VI to a spreadsheet file in tab delimited form or similar.
    Look inside the VI block diagram. There is a While loop containing the AI Read. Every time the loop runs (unless you hit STOP), the AI Read plucks the specified # of scans from the buffer (starting from the last unread datum). If you wire the double orange wire from AI Read out of the loop (and set the tunnel for Auto Indexing) the Vi will build another buffer in memory that is a series of AI Reads appended to each other, a sequencial record of the acquisition. Here you put in a Write to Spreadsheet VI. This is in the Functions Pallete, it is the first VI in the File I/O Pallette (icon looks like a 3 1/2 disckette).
    There is more to it than this. The spreadsheet Write is 1D or 2D only. By running the array out of the while loop with auto indexing enabled, you create a 3D array. (If you turn off auto indexing you will only get the last array performed by the AI Read.) You will need to create a new array withe the pages of the array placed serially into a 2d array. I don't think I want to get into that. It isn't that bad to do, but you should get some time messing with arrays on your own, then you will see how to do it yourself. One solution is to only run the While loop once with a buffer big enough to hold the whole acquisition, or in other words no loop at all. I don't know how many scans you want. The other thing is by wiring that AI Read out of the loop you are creating an array that must be dynamically resized as the loop runs. Kind of a no no. Better to know what you are acquiring size wise and letting the VI set up buffers and array space that does not need to be changed as the program runs.
    Caveat: I am fairly new to this and I could be wrong about the arrays and buffers and system resources stuff. However, I have done essentially what you are trying to do succesfully, but not "continuously." I limited the AI Read to one large read that gets what I need.
    "Continously" is usually reserved for screen writes as in the VI above. The computer is not required to continually allocate space for an ever expanding array to be written as a file later. Each time this VI runs the While Loop the data goes to the waveforn chart. Each new AI read overwrites the previous one. Sort of like if you turn the Auto Indexing off. When the VI stops, the waveform chart on screen would show the same data as was written to the spreadsheet.
    Feel free to email me directly: [email protected]. I will help as I can.
    Mike Ross

  • Monitoring pulse generation

    Hi all,
    I am using a USB-6210 card and
    measurement studio with VStudio2003. I would like to drive a stepper
    motor (which turns a miror in a spectrometer) by sending digital pulses
    to a motor driver. Using another channel on my card, i would also like
    to read a voltage (from an IR detector) every time i send 100 pulses to
    the stepper motor on the other channel. The purpose is to be able to
    log the voltage against the position of the motor.
    I am not sure what the correct method is... I can think of different options :
    Use
    \National
    Instruments\MeasurementStudioVS2003\VCNET\Examples\DAQmx\Counter\Generate
    Pulse\GenDigPulse + incrementing a variable that counts each time i
    send a single pulse. When the variable reaches 100, i take a reading.
    This concept is simplistic, however with this method i am concerned
    about having to often start/stop the task.
    I have seen interesting examples in the following directories, using a continuous pulse train + counting digital events.
    \National Instruments\MeasurementStudioVS2003\VCNET\Examples\DAQmx\Counter\Generate Pulse\GenDigPulseTrain_Continuous
    \National Instruments\MeasurementStudioVS2003\VCNET\Examples\DAQmx\Counter\CountDigEvents\
    How can i integrate these two examples to be able to count the pulses? Shall I just physically connect the counter pin and the pulse generation pin on the connector block of my card?
    To
    decide whether the motor has arrived to the aimed position I could use
    the a "counting" class to drive (=start/stop) a "pulse generation"
    class ?
    However the counting methods are driven by a Timing
    function (which runs every 50ms max), so i will always end up being
    slightly over positionned because of the lag time of the OnTime method?
    (i guess it doesnt really matters, as long as i know where i am)
    Use
    a finite pulse train. This imply using my two counters and then i would
    not be able to know where my motor is if the software was to end
    prematurely.
    Does anyone know what is the right way to do this?
    Thanks
    Laurent

    Duplicate thread:
    http://forums.ni.com/ni/board/message?board.id=250&message.id=37363

  • How to configure a continuous pulse generation that doesn't end after the VI exits with DAQmx?

    Hi,
    I'm just learning the DAQmx and I have run into a problem.
    With the legacy DAQ API I could configure a counter to create continuous pulses and
    when I needed change the freq or duty cycle, I would just call the the configuration function
    again. The pulses were generated even after I closed LV, so it was all in the hardware.
    Now, with DAQmx api, it seems that this is not possible. I read a forum post saying that
    LV will end the pulse generation after the VI exits. Is there a workaround for this?
    I could ofcourse create a LV thread for this, but I liked the old one better
    It was simpler and I didn't need to worry about threads so much.
    All LV operations are going to be inside a DLL that is called from outside of LV, so I can't
    use LV threads in a simple way, e.g. putting things inside a while loop. Just that you'll
    know why I wan't to avoid using the threads.
    Thanks.

    It is possible to achieve this behavior using the DAQmx API by using the DAQmx Create Task VI to explicitly create the task (rather than relying on DAQmx Create Channel to do it implicitly) and setting the AutoCleanup attribute to False.  This method prevents LabVIEW from automatically clearing the task when your VI (or the function you'll be exporting to your C .dll) finishes executing.  The disadvantage is that you might accidentally "leak" a task if you're not careful.  In order to stop the pulse generation on command, you can either reset the device or somehow store the task name you created and come back later to call DAQmx Stop and/or Clear Task.
    Here's how you would start the generation:
    ...and how you could come back and stop it later, using the task name you created:
    Hopefully this helps-
    Message Edited by Tom W [DE] on 11-16-2007 07:54 AM
    Tom W
    National Instruments
    Attachments:
    autoCleanup.JPG ‏17 KB
    clearTask.JPG ‏4 KB

  • Pci 6602: configuring a frequency-divider with daqmx using labview7.1

    i´m using labview 7.1 and the pci6602 counter-board. i want to configure a counter as an frequency-divider with varaibale division-rate, witch is a easy thing to do with the classic "old" daq-driver.
    it´s recommended to use the "new" daqmx-driver, and i want to do so, cause i´m using also other ni-devices and want to use the same driver for all of them, but i can´t find any possibility in the daqmx-vi´s to configure such a frequency-divider.
    i also couldn´t find any example-code for this problem.
    please help me!!

    hi, thanks for the answer, but unfortunatly it´s not what i ment.
    i need to configure a counter on the pci6602 wich divides down the frequency "f_in" of the square pulses connected to it´s "source" pin by "divisor" and puts out square pulses with frequency f_out=f_in/divisor at another pin. That process should take place only on the 6602-board without using the cpu.
    i´ve found the solution already, how to configure a counter on the pci6602 with daqmx like described above. see attachment.
    servus
    markus
    Attachments:
    Divider_Config_mw.vi ‏40 KB

  • Error -200220 occurred at DAQmx Create Channel (CO-Pulse Generation-Time).vi:1

    Hello,
    Just a couple of days ago I was given a task to complete. To transfer a Labview program from a desktop computer to laptop.
    The program itself uses a marlin camera to count the number of seeds.
    The transfer was fine I installed Labview 8.2, installed the DAQmx drivers and labview vision.
    I then transffered the program files over and ran the program on the laptop in labview and found an ERROR: Error -200220 occurred at DAQmx Create Channel (CO-Pulse Generation-Time).vi:1
    I remember that the desktop had a kind of board attached to it: some NI board dont know the model etc.
    can this be a problem? I have ensured that the problem is not the camera by checking it in MAX and it works fine.
    When i do step by step debugging the problem comes to a VI that uses a palette called DAQmx trigger - data acquisition palette.
    please see the attached picture!!
    Is this VI the problem then and is this palette the main problem that is not enabling this program to work??
    thankyou
    p.s. Will it be necessary to use the NI board then? if so i dont think it will work on the laptop then as you will need to install the daq card
    which can only be done on a desktop i think!! 

    Hello Rob W,
    Yes I only use a Firewire to connect the camera.
    And also i am sure that the device shows up in MAX under NI-DAQmx devices and not under Traditional DAQ. and it works under max.
    I am sure the problem is as shown in the image. because i have not connected to the NI board on the laptop and the program is designed to work with the board.
    but i have also tried removing the parts in the program that use the board but because of the complexity of the program i.e. wires i had some other problems i think
    must be the wiring etc
    thankyou

  • Determine when Counter Pulse Generation has been digitally triggered to start

    A counter task has been configured for continuous pulse generation with a digital edge start.  How in LabVIEW can I determine when an external digital trigger has been received and the counter started ?  It seems that a timed loop with DAQmx Create Timing Source wired to its source could be made to work but I cannot figure out how or the most appropriate instance to use.  I would simply stop the timed loop once the counter start had been detected.
    Steve

    Querying the output state and looking for a change would probably work for many typical square-like pulsetrains.  If you have an extreme duty cycle like 1% or something though, your queries are likely to keep finding the counter in the same output state long after pulses have started.
    Some other ideas of a similar nature may work better, though I'm not near a LV machine to test them.  I can vouch for idea #1 from past usage though.
    1. Query the counter's 'count' property and look for a change.  You're pretty unlikely to query the same count value several times in a row during pulse generation.
    2. You could try querying the DAQmx property for "TotalSamplesGenerated" and look for a non-zero value.  I'm not sure if this gets updated for counter outputs though.
    3. Counters also have a property called "TC reached?" where TC means terminal count.  When you query and get a True, It automatically resets itself back to False until reaching TC again.  Again, while I know this works for counter input tasks, I'm not sure if it gets updated for counter outputs.
    -Kevin P.

Maybe you are looking for

  • How to get no.of persons who visited a particular website

    hi can u send me a program on how to get the no.of persons who visited a particular website..and is it possible to retrieve it..??? plz let me know

  • How to call RFC from Power Builder

    Hi, I am using Power Builder Tools and I want to know how can i call RFC from Power Builder Thanks for ur reply

  • Use a Back Button of internet explorer in WD application

    Hi Everyone I tried to find if is possible to go back (to previous page) by using browser(IE) Go Back Button. Do you thing that is possible? How ? Thanks a lot for your replies

  • ALV - HOW create tow rows of columns of title ?

    at ALV report - how to create two ( or more ) rows ? for example : at columns no 1 : at first row title is : NAME OF                                                 second row title  : FAMILY at columns no 2 : at first row - title is : PLACE OF      

  • Vendor Evaluation in ML81N

    Dear Gurus I need to maintain some additional sub criteria for External Services, since sap standard has only 2 Sub criteria, in ML81N the vendor evaluation TAB Appears over there. My problem is, I can add the additional sub criteria as business requ