Software triggered single Pulse Generation

Hi,
I have an AT-MIO-16E10 board and I am trying to generate multiple but
finite digital pulses without having to reset, configure and rearm the
counter for every pulse. This takes too much time for my application. I
would like to configure just once the counter and gate it by any
software method. I am using LabWindows/CVI.
Does anybody know if it is possible to rearm the counter without having
to reset and configure it previously?.
Does anybody know how to generate a software trigger?
Thanks
Manolo

Hi Manuel,
Configure your counter for retriggerable pulse generation, and connect
one of the digital lines to the counter gate. Toggle the digital line each
time you want to generate a pulse. See GPCTR_Set_Application(),
application = ND_REGRIG_PULSE_GNR in the NI-DAQ Function Reference
Manual for details. Please feel free to email me if you need more help.
Regards,
Reed.
Reed Blake
Beta Technology
Industrial and Scientific Computing
Manuel Prieto Mateo wrote in message <[email protected]>...
>Hi,
>I have an AT-MIO-16E10 board and I am trying to generate multiple but
>finite digital pulses without having to reset, configure and rearm the
>counter for every pulse. This takes too much time for
my application. I
>would like to configure just once the counter and gate it by any
>software method. I am using LabWindows/CVI.
>Does anybody know if it is possible to rearm the counter without having
>to reset and configure it previously?.
>Does anybody know how to generate a software trigger?
>
>Thanks
>
>Manolo
>

Similar Messages

  • Triggered single pulse width measurement

    I am trying to measure the width of a single pulse, but would like to use the pulse itself as the trigger for a counter input pulse width read using a PXI-6608.  I would like to do this since the pulse can come at any time (much longer than any practical timeout)  and I would like to avoid having to place a DAQmx read in a while loop waiting for the pulse to appear.  Also, while the pulse is high, I would like to produce front panel feedback (light a boolean indicator).  I seem to be able to achieve that by using a digital input line, but again requires a DAQmx read in a while loop.  I haven't had much experience with triggers and my attempts so far appear to seem like triggers are not compatible with counter input pulse width measurement.  Is it possible to set up a trigger for a pulse width measurement?

    Hello kayotik,
    I think the best thing to do here is to use separate while loops. You can put most of your code in a main while loop, and then put your DAQmx read in a separate while loop. Both loops can run in parallel (just don't wire any outputs of one while loop to the other while loop, because then one will become dependant on the other). In order to pass data between the two loops, you will need to use a local variable. The DAQmx read can write to a local variable, and the main loop can read from that local variable. 
    You will also need to stop both loops with a single stop button. This article shows how (and also demonstrates the use of local variables to pass data between independent while loops):
    http://digital.ni.com/public.nsf/allkb/267704CDE91156D186256F6D00711AAE
    Colden

  • Pulse Generation application with DAQmx and a PXI-6624 module?

    What is the best implementation method for the following pulse generation application
    using LabVIEW, DAQmx and a PXI-6624 counter\timer module?
    I have two rising edge trigger signals (Trigger-1 and Trigger-2).
    There is ample spacing between each trigger. They never occur at the same time.
    I need to generate a single pulse (fixed width, variable delay) whenever Trigger-1 occurs and
    a finite pulse train (fixed width, variable delay, N-pulses) whenever Trigger-2 occurs.
    However, the output must appear on one counter output because this composite signal
    will be used as a trigger source for another PXI module in the rack.
    With DAQmx and a TIO counter\timer can I use both the GATE (for Trigger-1) and
    AUX (for Trigger-2) at the same time on the same counter to gate out the desired pulses?
    Trigger-1 would be wired to the GATE of CTR0. One Trigger-1 event would generate one pulse on the output of CTR0.
    Trigger-2 would be wired to the GATE of CTR1 and the output of CTR1 would be routed to the AUX input of CTR0.
    One Trigger-2 event at the GATE of CTR1 would generate multiple pulses on output of CTR0.
    Would DAQmx and the PXI-6624 TIO support this implementation?
    What is the best way to accomplish the task at hand.
    Thank You.
    Best Regards,
    Scooby

    Hi Scooby,
    I have looked into the application you have described and I see a potential problem with what you describe.  In DAQmx, it is not possible to call the counters of the same DAQ device in the same task, so you cannot have the finite pulse train generation and the single pulse generation tasks running at the same time.  What you can do, since you mention the triggers will not occur at the same time, is to stop one counter task while you are triggering another.  The way I would suggest you merge the outputs is with a two input Or logic gate to avoid damaging your counters.  Your signals will effectively be added together by this logic gate.   I do not see any way to merge the outputs internal to the DAQ device. 
    Please let me know if I can be of additional assistance.
    Laura

  • Comedi pulse generation VIs?

    Does anyone have a set of VIs supporting (single) pulse generation on E series or 660x series boards that use comedi drivers? I found the STC (eg E series) and TIO (eg 660x series) pulse generation VIs on this website, but they are not functional with comedi. If any R/D engineer--or other knowledgeable fellow out there--has built VIs that support pulse generation with comedi, and would like to share them, I'd be most grateful =).
    If not, I guess I'll get busy making them...
    (I'm using a NI6071E and NI6602 boards...)

    So it sounds like voo-doo magic you are doing so I will ignore the whole applications talking to eachother for a moment.
    Generating a square wave is as simple as using the "Square Waveform.vi" under the Signal Generation palette.  Give it the parameters like rate and amplitude and it generates a nice waveform that can be wired directly to the Waveform Graph.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • 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.

  • In Delayed Pulse Generation vi,Problem With THE PULSE WIDTH??

    In Delayed Pulse Generation vi, I want to input a very low number for the Pulse Width while using an external timebase source. But the minimum pulse width has to be 2. Does anyone know how can I solve this problem??

    Hey 45,
    Unfortunately, there is no way to generate a pulse width smaller than 2x your external timebase.
    There is an option to create a pulse of arbitrary width of your external source if you can afford some software processing in between. What you can do is use 1 counter to measure how many source edges of your card's internal timebase (80 MHz for TIO only, 20MHz or 100kHz for TIO and STC) your external signal is. This uses pulse width measurement as the counter application. Once you know how many source edges it takes to represent your pulse, then you can use triggered pulse generation and use the internal timebase with the pulse specs set to create the exact pulse width you want (and delay) and you can use your external pulse as the trigger. Th
    is works well if your pulse is always the same width and you can measure it before hand. As an example, let's say your pulse is 20 internal timebase pulses when measured. This means you can use the pulse specs to specify a pulse width of 0.75 your pulse width by using only 15 internal timebase edges for your pulse width.
    I don't know if I was clear above or not but if you give me your exact application you are looking to achieve, I might be able to help you out. Hope that helps.
    Ron

  • 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

  • Synchronous submillisecond pulse generation on 2 outputs

    I'm using a 6052E with LabView6.1. I need to simultaneously trigger two devices. The first is to send a trigger signal to another LabView program via Trig1 to tell it to begin collecting data. I can't modify that progam. The second is a TTL pulse to another device. This pulse needs to be between 100 and 500 usec. The two outputs need to be independent as sometimes the second device is activated when the first is not. I've been trying to produce two synchronized pulses using the counters, but can't figure it out. Thanks!

    Hello,
    Thank you for contacting National Instruments!
    What you are describing calls for an application called triggered pulse generation. What you can do is configure both counters to produce individual pulses when a trigger signal is received on each counters gate. You can connect the same trigger signal to gate of each counter.
    I have attached an example program that shows how to generate a triggered pulse from a single counter. You will need to do the same for the second counter. A good way to do this is to configure counter 0 then configure counter 1 ,then enter the while loop and arm counter 0 and then arm counter 1. Then when the trigger signal is received on the gates of the counters, they will both produce a pulse. If you do not want one c
    ounter to produce a pulse, you can simple not arm the counter in the while loop by using a case structure and a boolean control.
    Regards,
    Bill B
    Applications Engineer
    National Instruments
    Attachments:
    Generate_Single_Triggered_Pulse_(DAQ-STC).vi ‏104 KB

  • 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

  • Please How can I capture and integrate a single pulse of a DC signal from an external circuit

    Hello everyone
    I am trying to integrate a signal from an external circuit I have built. I want to capture just a single pulse from the signal and integrate it. Please can anyone assist me with how I can perform this?

    The 6008 has no hardware analog trigger, so to capture a single pulse, you will need to trigger in software.  It does have a digital trigger, so if you have a digital way to signal the start of your pulse, it would make your life easier.  You will need to ensure you take enough data to get an entire pulse.  At that point, use one of the trigger VIs to find the start (and possibly end) of your signal.  Take a subset of your data and integrate it (LabVIEW does support integration).
    If you have trouble finding anything, let us know.  Find the trigger and integration VIs using the search feature of the palettes.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Digital pulse generation

    hey there, i am now trying to generate a simple pwm signal using digital write and read. so far, i've been trying to manipulate the square waveform and offset it so that it only goes from zero to one volts. den i would compare this analog output with a zero comparator whose output would be sent to NI-DIOwrite.this doesnt work at all. some help would be greatly appreciated. it would be best if there is a file that i can look into. thanks and regards

    Right now you are trying to capture a digital signal right?
    First, connect the output of the comparator to a oscilloscope which can capture single pulse, thus test your comparator.
    If the output is correct, connect it to NIDIO, also probe the voltage there, if the output is not correct, then the channel of that DIO might break down.
    If the output is correct, it will be the problem of your software, or unluckily the NI card.

  • 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

  • Pulse generation

    Hello,
    I programmed a single pulse, which is limited by hardware to around 2us at the moment I assume.
    Is it possible to change the pulse length to a certain value? For example 16us, 32us, 64us?
    My programm:
    My stuff:
    1 x NI 6537 I/O Card
    1 x LabVIEW 2009
    1 x Programming slave (myself )
    Thank you for your help or suggestions!
    BR Chris

    I would always start with the example finder, you can teach yourself much daqmx with the axamples alone.
    Continious buffered hardware writing will stream out the sequence that you write to the buffer with a hardware timming,
    so the buffer 0, 1 will alternate 0 and 1 on each clock tick, "look ma no coding"!
    changing the values in the buffer will allow you to alter the pulse width on the fly with no software timing, that is your output will be exact with no software jitter.  Using the wait is limited to 1ms increments and is not precise and windows can burn you since it is not a RTOS.
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Software triggering

    Dear All,
    I'm using LabVIEW 8.0 and Daq-mx to program an application where I use
    a finite retriggerable pulse train to time analog output of a waveform.
    Currently, I'm using a hardware trigger pulse from another counter to
    trigger the pulse train. Is there any way that I can change this to a
    software trigger, such that, once I run the program, if I press a
    button on the block diagram, it will set off the pulse train and I can
    keep on repeating it without having to stop and restart the program?
    Anyway help would be greatly appreciated.
    Thanks in advance.
    -Ashesh
    Message Edited by Ashesh on 08-23-2006 01:41 AM

    Hi Ashesh,
    Thank you for contacting National Instrument's support!  That's an interesting question, and I think that you're very close to the solution already.  It sounds like you already have the foundation to your program, which will probably be very similar to our shipping example called "Gen Dig Pulse Train-Finite-Retriggerable."
    Basically, our counters are only hardware triggered.  If you look at the source list for all potential trigger sources, you'll notice that they are all hardware related.  Unfortunately, we don't have any software triggers as such.
    However, what you could do is use a software trigger to generate a digital high on one of your digital ports, and wire that over externally or internally (depending on your hardware, using the Connect Routes vi.  Check in your Measurement and Automation Explorer >> DAQmx Devices >> Device Routes to see what available options you have).  You would want to do something similar to the "Write Dig Chan" example program that is also shipped with LabVIEW. 
    I hope that this points you in the right direction.  If you have any questions on implementing this solution, feel free to ask again and I'd be more than happy to help.  Thanks for choosing National Instruments!
    Regards,
    Daniel L.
    Applications Engineer
    National Instruments

  • Retriggered single pulse

    I am using NI-DAQmx C/C++ API. How can I set up a counter to produce a retriggerable single pulse? That is, I need to trigger an output pulse, and while the pulse is being generated, if a new trigger comes in, it resets the counter so that the pulse timing is extended.
    Is that what the DAQmxSetStartTrigRetriggerable property does? I'm guessing that the ability to do this depends on the hardware being used?
    Thanks!
    John Weeks
    WaveMetrics, Inc.
    Phone (503) 620-3001
    Fax (503) 620-6754
    www.wavemetrics.com
    Solved!
    Go to Solution.

    WM_John_Weeks wrote:
    I need to trigger an output pulse, and while the pulse is being generated, if a new trigger comes in, it resets the counter so that the pulse timing is extended.
    The need is a replacement for the (ancient) NI-DAQ API GPCTR_Set_Aplication() with ND_RETRIG_PULSE_GNR with something equivalent in NI-DAQmx.
    I'm glad you clarified.  ND_RETRIG_PULSE_GNR does not extend the pulse timing if an additional trigger is received during generation.  From the NI-DAQ Function Reference Manual:
    ND_RETRIG_PULSE_GNR:  ... Any gate transitions received during the pulse generation are ignored.
    With this in mind, DAQmxSetStartTrigRetriggerable is in fact what you would want to use to get the same behavior in DAQmx.
    Best Regards,
    John Passiak

Maybe you are looking for