Gen Digital Pulse Train Finite Retriggerable - Initial Delay is only for first trigger

The DAQmx example Gen Digital Pulse Train Finite Retriggerable has an Initial Delay parameter. It appears (6602 and an E series card) that this Initial Delay only delays the pulse generation for the first trigger. Subsequent triggers show no delay. Is this the designed behavior ? Any way to get the Initial Delay to occur for all triggers ?
Steve

So, yes, you are seeing the appropriate behavior. However, it is possible to get a re-triggerable finite pulse train with an initial delay. What you have to do is set up a re-triggerable pulse, and have that pulse act as a pause trigger for a continuous pulse train. Let me explain further with an example.
1) Set up counter 0 as a re-triggerable single pulse (Gen Dig Pulse-Retriggerable.vi). Set the low time = initial delay = X, and high time = Y. The re-triggerable pulse will be low for X, then high for Y after every trigger (it applies the initial delay to the first pulse, and the low time to every pulse after the first). The trigger source is your actual trigger.
2) Set up counter 1 as a pause-triggered continuous pulse train (Gen Dig Pulse Train-Continuous-Pause Trigger.vi). This pulse train will be the frequency of the finite pulse train you want. The pause trigger source will be the output of counter 0.
I have attached the VIs I used to accomplish this. There are three VIs, the two mentioned in 1) and 2) and another VI I used just to monitor the signals. These could be combined to a single VI if you would like. Hope this helps!
-Alan A.
Attachments:
Retrig_Finite_Pulse_Delay.zip ‏135 KB

Similar Messages

  • 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

  • Finite pulse train generation​... how to count number of pulses?

    hi guys,
    this has probably been solved a hundred times but i just couldnt find it!!
    i have a pulse train generation happening on my ni usb-6211... using FREQ OUT, using a divisor on this, and routing it to PFI4.
    id like to update my VI so i can specify the number of pulses....
    im pretty much a noob at this stuff so any help would be greatly appreciated!! thanks!
    dan
    Attachments:
    pulse train generation.vi ‏25 KB

    Hi,
    No problem at all, we are here to help. What I’m going to do first is to point you to a bunch of examples for that might give you a better insight of the capabilities of the card in terms of finite pulse generation. What you should be looking at is called retriggerable pulse generation and here are some examples to look at: Retriggerable Finite Pause Trigger Digital Pulse Train Generation, Creating a Delayed, Retriggerable and Finite Pulse Generator, DAQmx - Retriggerable Pulse Train Generation - LabVIEW - CVI - ANSI C - VB.NET - C#.NET and Retriggerable Finite Pulse Train with Changing Pulse Specs.
    Let me know it helps
    Jaime Hoffiz
    National Instruments
    Product Expert
    Digital Multimeters and LCR Meters

  • Sequence 3 tasks - create a finite pulse train-create a delay by creating a pulse train-measure pulses

    Hello
    i use a board 6023E and pc pentium4 3Ghz
    My problem is how create a delay with few microseconds between two tasks?
    I need creat three tasks.
    Fisrt create a finte pulse train for this i use a counter.
    Second create a delay for this i use again a conter to creat a pulse train in witch the delay is equal to frequency x number of pulses.
    Third measure pulses for this i use again a counter but in this case is a counter input.
    In attachment i send a picture with my program.
    I dont understand why my program dont work? my program take a lote of time during the excution. I think the problem is  between stop une task and start another i would like know how i can resolve the problem if is possible.
    picture with my program
    ftp.ua.pt/incoming/labview/sheme
    Marco

    Hi,
    I hope to understand exactly what you want to do. If you need a long delay with your E series board check the following link
    http://digital.ni.com/public.nsf/allkb/f66ccab02d3b901886256a03005ee14a
    Let me know if it's ok.
    Regards
    Omar S. NI

  • LV7 finite pulse train on digital line.

    I was wondering how I would go about creating a digital pulse train on a digital out line. I saw some example that LV7 came with but they were not too clear on what was going on, and also it involed the couter, which in my case I dont really need, Im actually controlling a stepper motor with the pulses.

    Hi Weizbox,
    What DAQ board will you be using to generate the digital pulse train?
    Regards,
    Brooks W.
    National Instruments

  • Finite Pulse Train

    Dear All,
    I have an application where I am using digital finite pulses (see attached example) but I want the generation to be stopped by the user too in addition to the task completed function.
    Also, when I use generate finite pulse / generate continuous pulses can I use the other counter to count the pulses.
    I am using PCI 6221 & LV8.0
    Regards
    James
    Attachments:
    FINITE PULSE TRAIN.vi ‏26 KB

    Hello james!
    Thanks for your post. I think what you want to do instead of "wait until DAQmx task is done" just use the "is DAQmx tasks done". That way you only call the VI once in software and it either returns true or false. If you "wait" until the task is done then you program loop will not continue until the task is finished. Take a look at the following pictures that shows you how I would do it. The task will give you a warning and tell you that you have not finished generating all the pulses yet but its just a warning and the task will stop. Let me know if you have any other questions and if this helps you with your application.
    Cheers!
    Corby_B
    http://www.ni.com/support
    Attachments:
    False case keep generating.JPG ‏44 KB
    True case STOP program.JPG ‏43 KB

  • USB-6009 pulse train generation with digital output....

    Hello!
    I've bought a new USB NI-Card (USB-6009) and now I'm trying to adopt an old vi that uses traditional DAQ drivers. I wrote that vi for a PCI NI-Card (PCI-6024E), which has two counters to generate two pulse trains simultaneously. Now I've only one counter and that's why I'm searching for a good way to create pulse trains using a digital output! The pulse trains are both ranging between 100 Hz and 100 kHz.
    I'm sure somebody has an idea how I can solve the probem in the best way
    Kind regards,
    Peter

    You can't do it with this low cost board. Both digital and analog outputs are software timed only. The analog out is rated at only 150  samples/sec and the digital is about the same. You can't even use one of the counters because it is not a hardware timed counter output. It is an event counter only as an input.

  • Finite pulse train with different frequency

    Hello,
    I'm trying to modify the labview example "generate finite pulse train" to generate a finite pluse train with different frequencies. Each freq will run 400 pulses. The freqs are stored in an array, which is being fed into a for loop. Thus ramp up the freq each iteration. However the program only generate 400 pluse at first given freq. I'm fairly new to daqmx and not sure what is wrong. Anyone have some idea how to fix it?  
    Attachments:
    pulse train finite mod.vi ‏38 KB

    The best "fix" will depend a bit on the needs of your app.
    Is it ok to have a fraction of a second without any pulses each time you change frequencies?  If so, then there's a pretty simple solution:
    1. Outside the loop you'd create a DAQmx virtual channel and configure for Finite Sampling (# samples = 400) using DAQmx Timing.vi.  
    2. Inside the loop you'd chain together a DAQmx Channel property node where you set the pulse frequency property, then perform a DAQmx Start, a DAQmx "Wait for Task Complete", and a DAQmx Stop.
    3. So for each freq in your array, you'll program the counter for that frequency, start the generation of pulsetrains, and then stop the task after 400 pulses have been generated.
    If you must change frequency on-the-fly, producing *exactly* 400 pulses at each freq setpoint will be tricky, and maybe even impossible to do reliably.  Some techniques will get you closer than others though, so post back if you need to do this.
    -Kevin P.

  • How to continuously generate a pulse train with variable frequency

    Dear all,
    I am trying to use NI-USB 6259(BNC) to send Pulse signals to conduct position control of a servo motor with labview. The position control of servo motor follows these rules:
    The number of the pulse train determines how many degrees the motor rotate ;( e.g. the angular position of motor)
    The frequency of pulses determines how fast the motor rotate; (e.g. the speed of motor rotating)
    The digital determines the direction of rotation of motor (e.g. clockwise or counterclockwise)
    My question comes when I need to continuously generate a finite plus train signal in a period of time. Below is a sample:
    Time(s)
    Number of pulses
    Direction of rotation
    (1 is clockwise, 0 is counterclockwise)
    Frequency
    0-1
    923
    1
    923hz
    1-2
    3540
    0
    3540hz
    2-3
    1751
    1
    1751hz
    3-4
    2663
    0
    2663hz
    4-5
    353
    0
    353hz
    5-6
    1017
    1
    1017hz
    6-7
    3436
    1
    3436hz
    7-8
    302
    0
    302hz
    8-9
    1513
    1
    1513hz
    9-10
    570
    1
    570hz
    Here is the explanation of this table, the motor keeps rotating in clockwise direction during 0~1s. When the time reaches 1s, the motor just complete the rotation of 923 pulse signals. And then the motor starts to rotate in counterclockwise direction during 1s~2s. When the time reaches 2s, the motor just complete the rotation of 3540 pulse signals. So we can see that the rotating speed of motor in 0~1s is different from the speed in 1s~2s. Namely, the frequency of pulse signal in 0~1s is different from the frequency in 1s~2s.
    I have already use the counter output of DAQmx, it just can generate pulse signal with certain numbers and certain frequency in one time. The attachment is the vi which can generate a finite digital pulse train from a counter output channel and the frequency, duty cycle, Initial delay, and Idle state are all configurable.
    How can I continuously generate  a series of pulse train with varying numbers and frequencies during a certain period of time.
    Thank you very much for your help!
    Solved!
    Go to Solution.
    Attachments:
    Counter - Finite Output.vi ‏57 KB
    Finite output.png ‏13 KB

    Hi aacuna,
    Thank you for your reply!
    I already checked that  article.  The frequency in that Vi can change dynamically, but the method of adjusting the frequency is ‘manual’ .Below is the front panel of that Vi. When the Vi is running we can change the frequency by press the button.   
    Time(s)
    Frequency
    0-1
    923hz
    1-2
    3540hz
    2-3
    1751hz
    3-4
    2663hz
    4-5
    353hz
    5-6
    1017hz
    6-7
    3436hz
    7-8
    302hz
    8-9
    1513hz
    9-10
    570hz
    Thank you!

  • How to generate sequence of pulse trains with DAQmx?

    I need to generate a sequence of pulse trains with DAQmx (the card I have is a PXI-6229 card). As an example:
    - 10'000 pulses at 20kHz every 5 seconds with an initial offset of 2 seconds (let's say 10 pulse trains in total).
    If I use the CreateVirtualChannel.vi in "CO pulse ticks" mode, I can only specificy offset, high ticks and low ticks, but not that the sequence of pulses should be repeated after some time. 
    Now I thought that I could solve this problem if it were possible to multiply two counter outputs: the first counter would generate the pulses (continuously) whereas the second one would switch between low and high on a slower timescale in order to gate the first counter, thereby providing an initial offset and the "off" phases between the pulse trains.
    Is it somehow possible to multiply two outputs with DAQmx and the card I have? Or is there another solution to the problem?
    Thanks a lot in advance for any hints!

    Hi dlanger,
    what you want to do requires a little bit more work. 
    First look at the example "Gen Dig Pulse Train-Continuous.vi" from the LV example finder.
    This example generates a continuous* pulse train. As you see, you need a sample clock VI for setting the sample mode. 
    * NOTE: Generating a finite pulse train with a M-series card requires 2 counter.
    With a pause trigger (DAQmx trigger property node) you can gate the output of that counter.
    Now you have to generate a gate-signal with the the 2nd counter. That means, only if  Ctr1-out is high Ctr0-out outputs the 20 kHz-signal. 
    Maybe you have to adjust the times in my example a bit. 
    Unfortunately there is just one "small" problem: "let's say 10 pulse trains in total" 
    This is not possible, because a 3rd counter would be necessary (*). 
    As a workaround you can modify the while-loop that both tasks are cleared after 50s. This is not brilliant, but should work fine for you. 
    A more sophisticated way is to perform a correlated DIO. So you can generate custom pattern for multiple outputs. 
    A good example can you find here: 
    Retrigger and Repeat Finite Digital Pulse Train in LabVIEW
    http://decibel.ni.com/content/docs/DOC-8473 
    or here:  
    Generating More Than 2 Pulse Trains Using CompactDAQ
    http://decibel.ni.com/content/docs/DOC-2167 
    Hope this helps.
    With best wishes,
    Ralf N. 
    Attachments:
    Gen Gated Dig Pulse Train-Continuous.vi ‏38 KB

  • Generating multiple Pulse Trains.

    I am trying to generate two different pulse trains. Once the first pulse train has begun I need to start the
    second pulse train approximately .69444 ms after the first has started. I am currently using the two counter channels on the NI ELVIS, but the second pulse doesn't always start after the first, but it does work sometimes. How can I fix this? Attached is my vi file.
    Thanks,
    David
    Note: Each pulse train has a 33% duty cycle.
    Attachments:
    SaO2.vi ‏91 KB

    Hello,
    Here is what I would try:
    1. Set up counter 0 to perform a continuous pulse train (see the LabVIEW example called Gen Dig Pulse Train-Continuous.vi)
    2. Set up counter 1 to perform a continuous pulse train with a digital start (see the LabVIEW example Gen Dig Pulse Train-Continuous-Dig Start.vi)
    A. Modify this example code so that the trigger source is your counter 0 output.
    B. Modify this example code so that the initial delay value of the pulse train is 0.7 milliseconds (or whatever delay you want). Create the delay with the input to the DAQmx Create Channel VI (the delay is currently set with a default of 0.00 seconds).
    What you are doing is triggering the second counter off of the rising edge of the first counter. So, counter 0 will start generating a pulse train. Counter 1 will not start until the rising edge of counter 0's first pulse has occurred. Once this trigger has occurred, Counter 1 will start (after the initial delay time of 0.7 ms has passed). You can cut and paste to put the code of the two examples together.
    Hope this works for you,
    Sam

  • Generate a pulse train

    How do I generate finite pulse train of 3 pulses of 25us pulse width, pulse period (1/(7000Hz)), and retrigger the same finite pulse train every 588.23us with the PCI-6602?
    What are the externals connections?
    What is the right Labview programming?

    this can be done with the 6602 using multiple counters, but this board has 8 so you will still have many left over for other tasks.
    You will need essentially 2 tasks, one taks is a retrigerable gated finite pulse train and the other is a simple finite pulse train.
    I have done something similar using DaqMX and LV 7.0
    To create the finite pulse train, create a CO.PulseTime task, create a channel setting the high times and low times (25 microseconds)and set the low polarity. I will assume that such a pulse train is going to trigger some external event or other DAQ card. Next set the timing to be implicit and sample mode to be finite and the number of pulses to be 3. To handle the retriggering and gate properities use a channel properitiy node and select:
    StartTrigType = Digital Edge;
    Start.Retrigerable = True;
    Start.DigEdge.Edge = Rising;
    Start.DigEdge.Src = PFI number of the out from the continious pulse train.
    This last option will allow you to route the trigger from the controlling pulse trian to trigger your finite pulde train.
    Now set up a second task to put out a continious pulse train with the period equal to the total durration between finite pulse trains (~500microseconds I dont have the exact number in front of me).
    After creating these two tasks, start the retriggerable task first.
    now when you start the continious pulse train you will get a finite pulse train of 3 pulses every time the rising edge of the continious pulse train fires. Stop and start the continious pulse train using software at will but only stop the finite task when you are done. Hope this helps.
    -Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Can daq 6035e,or 6024e used to count pulse train

    i need to count two digital pulse train coming from an encoder, whose frequency keeps changing. the encoder is a typical feed back from servomotor

    Hi,
    Both of those DAQ boards can measure digital pulse train frequencies using the counters. These cards can support 2-pulse encoder measurements on DIO6 and DIO7. This means that if there is a rising edge on Channel A the counter increments and a rising edge on Channel B decrements the count. You can also set the counter application for frequency measurement and that will measure the frequency of the pulse train on the line. These cards also have 2 such counters.
    There are many LabVIEW and CVI examples demonstrating this. If you search the site for position or encoder measurements there should be some example programs for you. Hope that helps.
    Ron

  • Hello, I would like to produce 2 different pulse trains on the CTRo and CTR1 output pins.

    (DAQ-CARD E6024 PCMCIA)I have the 2 output pins monitored on my scope, when CTR0 puts out a pulse train, CTR1 goes high. When CTR1 puts out a pulse train CTR0 goes high. Also, the pulses are interleaved with each other. Is there a way to make then start at the same time
    Attachments:
    Stim_Output_pulses_CTR_0,1.vi ‏94 KB

    Hello Zoltan,
    I would suggest using the counter gates to synchronize the counters. You will need to externally run a wire from one of the DIO lines you're not using to one of the counters' gates. When the counter gate is high, the pulse train will be generated on each counter. Both counters will need to use the same PFI line as the gate.
    There is an example program that ships with LabVIEW 7 called "Gen Dig Pulse Train-Continuous-Pause Trigger" for DAQmx. This demonstrates how to configure the counter to only generate the pulse train when the gate is high.
    With this configuration, you could synchronize the counters by writing to the DIO line which is wired to one of the counter gates when you're ready to start the pulse train generation.
    Hope t
    his helps.
    Kristi Hummel
    Applications Engineer
    National Instruments

  • Count out of pulse train on 6025E,labview(pc)

    hi!!
    I need monitoring continuos count out from
    puse train on mine 6025E
    Thanks for all

    If you are generating a continuous pulse train then you are probably using only one of the counters on the 6025E. Depending on the speed of the pulse train being generated, you will want to use simple event counting or buffered event counting. There are shipping examples within LabVIEW that perform both operations. The Count Edges (DAQ-STC) VI would work if the pulse train was slow enough. If the pulse train has a high frequency, you will want to use the Count Buffered Edges (DAQ-STC) VI so you'll be sure not to miss any edges. I hope this helps.
    Regards.
    Todd D.

Maybe you are looking for

  • Get Map values using loops

    Hi, With a vector I can have a loop and to get the values with a index. Vector vec = new Vector() for(int idx=0; idx>vec.size(); idx++){     System.out.println(vec.get(idx).toString()); }I can do something similar with a map ? in other words have a l

  • Optimize_Index in Oracle Text

    Hi All, I have tried the option Optimize_index in oracle text and it removed the un-necessary data from the $I table. I have used the Sub-String option in my index, so it created the $P table. During optimize_index, only the $I table gets cleaned up

  • Crop tool stuck!! Won't accept changes

    I'm processing a batch of proofs and midway through my crop tool no longer accepts the changes by clicking on the crop marker button. Doing so only brings the image up in full resolution, clicking again puts it back in crop mode. I can't get this beh

  • Process Chain Decision Maker Step

    Hi, Decision Making is required to find the current day is not a 4rth Work Day of the Month. I have written a formula in the Decision Maker which looks like below. Can some one validate? WORKINGDAY_MONTH( RIGHT( 2, Current Date ), SUBSTRING( Current

  • Corrupted files in Photoshop!

    Twice now in the past week or so, while working in Photoshop, rectangular blocks of missing/distorted image have appeared.  This pervades all layers, effectively destroying the entire file.  And even though I quit without saving, the destroyed versio