Can I send a TTL Pulse in a given rhythm?

I am new to LabView and using version 8.1.1.
I am trying to send a series of TTL pulses in a particular rhythm, (a train of 3 pulses at 50Hz repeated every 200ms). Is it possible to do this with accuracy?
Each pulse need to be accurate to the millisecond.
Thank you in advance.

Hello Lanny22,
Lynn is correct.  If you have hardware timed (correlated) digital lines then you can do this by using the values he suggested.  If you're using a National Instruments multifunction DAQ device with LabVIEW then I would recommend looking at this example program.  Open LabVIEW and go to Help» Find Examples.  Then navigate to Hardware Input and Output» DAQmx» Digital Generation» Cont Write Dig Port-Ext Clk.vi.  This is the example program I would use to generate this pulse train.
Cheers,
Brooks

Similar Messages

  • How to acquire analog signal and send a TTL pulse at the same time based on PXI 6123

    Hi,
    I am using a PXI-6123 data acquisition card, as the picture show in the attachment ,I want to acquire the analog signal of ai0 through reference analog window and at the same time send a TTL signal to trigger my camera. I have tried two methods, one is using the DAQmx Export signal.vi another is using DAQmx connect terminals, but when the data acquisition card acquire the analog signal, the DAQmx Export signal.vi and the DAQmx connect terminals sometime can send an TTL pulse ,sometime can not.
    I don’t know why?  or some other method that can achieve my arm is appreciated.
    Regards
    chunlei
    Attachments:
    method export signal.vi ‏21 KB
    method connect terminal.vi ‏36 KB
    Send a TTL pulse.JPG ‏288 KB

    Hi,
    Have things changed over the years?
    I need to syncronise a digital output (Modul NI9474) and an analoge input (AI-Modul NI9203) module. I need to measure time intervals from a flank in signal A to a flank in signal B. I would like accuracies of the order of 1 ms. Currently, the signals are not synchronised, with errors of the order of 2 times the block length (block size x sample rate), sometimes much higher. The best I got so far was a block size of around 20 with a sample rate of 1 kHz.
    If I use the master and slave settings on the RTSL settings, my program doesn't run properly.
    If I use digital signals for input and output, I can syncronise them with RTSL settings and everything is good, but I can't always do that.
    Also, if I do anything in the GUI (such as scrollowing something or going to another window), my output gets screwed up properly.
    1. What can be done to synchronise AI with DO?
    2. Is there something that can be done to avoid messing up the output when something happens in the user interface? (I know that I am messing up the outputs as they make some valves switch and that is loud).
    Thanks in advance!

  • DAQCard 1200: How can I send two TTL singals on separate channels with adjustable delay shortly after (typically a few milliseconds) external triggering?

    Hi, this is probably a simple question, but I have never used the digital and timing part of any DAQboard before... I wish to use an old Power Macintosh 7200 with a DAQCard 1200 for timing and synchronizing external events . The scenario is as follows; an external device (in my case; a CCD camera) sends a trigger signal (TTL, 600 ns). I want this signal to trigger the DAQCard, whereafter I want the DAQCard to send two TTL pulses (20 microsecond duration) from two separate channels (one pulse from each channel). The first pulse must be sent within a few milliseconds after the trigger is recieved. Th
    en I wish to be able to control the delay from the first pulse is sent and to the second pulse. This delay should preferably be adjustable from a few microseconds and up to at least 20 milliseconds. How can I achieve that kind of operation? (I need a few tips to get started.. like for instance: should I connect the external trigger signal to the EXTTRIG pin or to the gate pin of one of the counters? Do I have to interconnect the counters in some way? Do I have to invert the OUT signals? etc..)Thanks for your help in advance.
    regards,
    Michal

    I have not personally used the DAQCard 1200, but if it is similar to the E-series devices, you route the trigger signal to the gates of both counters.
    In your code, use the Data Acquisition->Counter->Generate Delayed Pulse VI twice, once for each counter. You can then set an input on that VI to select to trigger on the gate, and set the delay and pulse width of the pulse. Since both will start from the same trigger, you can delay either pulse as long as you wish, from microsecond to seconds, making the second pulse follow the first.
    Mark

  • How can I control 3 stepper motors w/ amplifier by sending TTL pulses from DIO96

    We have NI PCI-DIO-96 board and we have 3 stepper motors with amplifier and encoders. We want to control the motors by sending TTL pulses directly from the DIO-96 board to the amplifiers. Is this possible? What would you recommend if this is not a good approach? Thanks in advance.
    Roman Zeylikovich

    Roman,
    Thank you for contacting National Instruments. While using a motion controller would be the recommended approach for any type of motion application, you may be able to use your DIO board to generate a TTL pulse train to control the step and direction inputs of your drive and motor. You will need to make sure that the current sinking and sourcing specification for the DIO-96 fits your stepper motor. That board is not designed to source very much current at all so this is one issue you will need to verify. Also, this board does not have any counter/timer logic that can handle quadrature encoder inputs.
    Again, this digital device is probably not the best solution to control a stepper motor, but, depending on your hardware, could be configured to work proper
    ly. The PCI-7334 is a low-cost stepper motion controller that can control up to 4 axes and is designed to easily accommodate these types of applications. You can browse through more information on our Motion controller boards at the following website:
    http://sine.ni.com/apps/we/nioc.vp?cid=3809〈=US
    Let us know if you have any more questions or comments.
    Regards,
    Michael
    Applications Engineer
    National Instruments

  • Can BioBench be triggered with a 20ns standard TTL pulse?

    I am using a CCD camera system to trigger BioBench to acquire data synchronously with the camera. The camera system sends a standard 20ns 1v TTL pulse every time it takes a frame, the time it takes for BioBench to start taking data varies from experiment run to experiment run. Anyone can help me fix this and get the two systems to synchronize?

    Amiliotis,
    Since the triggering functionality in BioBench uses one of the analog input channels to acquire the trigger signal, the 1 kS/s sample rate limit present in BioBench will impose a minimum limit to the pulse width of a trigger signal, which is guaranteed to be detected. This limit is 1 ms (= 1 / 1k). The fact that your trigger signal has a pulse width of 20 ns definitely explains why your start times are not consistent from run to run. You may want to consider using a development environment, such as LabVIEW, which will allow you to overcome this issue by providing more flexible triggering options.
    Good luck with your application.
    Spencer S.

  • Can analog outputs simulate a 60hz ttl pulse?

    The only outputs free on my 6020e are 2 analog. I need to drive a TTL device at 60hz. Can the analog outputs do this?

    Paul;
    You can do that but keep in mind that will not replace the counter pulse train generation operation. I'm saying that because the counter will execute a hardware operation, and so, will be able to have a completely system independent operation, generating a nice and accurate TTL pulse train.
    By doing that trough the analog output, as the data transfer in between the computer memory and the DAQ board is system dependent (since it uses DMA), you might have some glitches at the pulse train because of some delay caused by the data transfer. But that is definitely something to try out.
    Hope this helps.
    Filipe

  • Tracking where I am in between TTL pulses

    Greetings.  I have a little Labview experience but very little with counters.  I have a PCI-6602 card with a CB-68LP connector block.  I have used up 7 of the 8 channels counting events so I have one channel left. 
    What I have is a Z pulse that is followed be four events and then another Z pulse.  I know the point in the cycle at which each of these events occurs.  I need to write in my program which event is occuring. 
    I apologize for the confusion.  It's difficult to explain.
    The ideal situation for me is that if the Z pulse is a 360 degree cycle I could track in my program if I am in the first, second, third, or fourth quarter of the cycle between Z pulses.  I know that sounds almost impossible since my Z pulse can change. 
    For what it's worth, I CAN run one of the events in a separate TTL input if that helps me. 
    I have been trying to just reference the Z pulse to a timebase, then a little math would get it done for me but I don't have a full knowledge of counter/timers. 
    Any help would be appreciated.  Sorry for the confusing post.
    Dave B
    www.signalg.com

    I am measuring the speed of an event.  To keep it simple, I am measuring the edge separation between TTL pulses.  As the event moves through a cylinder it sets off probes that will send my system a 5 volt, TTL pulse.  Knowing the time between the event passing probe 1 and probe 2 will tell me the speed of the wave.  I have 7 probes in each of 4 tubes.  Because we are running at 40 hz or less my boss would like to run all seven probes for each tube together.  This way we are writing a smaller amount of data and only using a 7 channels of a counter card rather than 28. 
    So probe 1 in each tube will generate a pulse to the same channel.
    To determine which tube I'm in I am referencing the spark for each tube.  My plan is that when the spark for tube 1 occurs it initiates case #1.  Spark 2 will make case 2 true, etc for 3 and 4.  Each case performs the exact same reading on the exact same channels.  Since not all tubes are exactly the same, each case will have custom formatting for that tube. 
    In each of these cases I am measuring the time between probes to figure speed.  We can run one tube up to all four.  My program should work for all without any intervention from the user since unused tubes will never send their corresponding case structures to true. 
    Using the 90 degrees per was when I was considering using the Z (timing) pulse to determine which tube is active.  Now that I'm using sparks for each tube that is much simpler (I hope).  The sparks coming into the DIO (adjusted to give me a clean TTL) will activate the case for their corresponding tube. 
    The 6221 is pretty affordable but I think this should work with what I have.  If it doesn't I could sell them on another piece of hardware. 
    Do you think this will work?
    Thanks
    Dave
    www.signalg.com

  • Triggering outgoing TTL pulse based on incoming position signal

    Hello all,  
    For my research study looking at reflex responses in human subjects, I have the subject's ankle attached to a motor that moves the joint back and forth through a 30 degree range. I am sending a 5-V TTL pulse from a NI BNC-2090A to a constant current stimulator (Digitimer DS7A) each time the ankle passes a specific angle. I want one pulse sent out each time the ankle passes the target angle. The VI works fairly well, but it does not fire at the exact target I set 100% of the time (sometimes off by a degree or so). We are sampling at 2000 Hz, reading 100 scans per channel with the DAQmx Read.vi. The median of the position signal is constantly being evaluated and sent to the In Range and Coerce function, the output of which is sent to a Case Structure. The min and max inputs to the In Range function are set at what I have found to be the ideal parameters (translates to roughly + or - 0.5 degrees). If I set them any narrower, the pulse is not always sent out. 
    I've attached what I believe are the relevant parts of code. If anyone has any ideas of how I can make this vi run more smoothly and accurately, it would be much appreciated. Thanks in advance.  
    Attachments:
    Trigger outgoing pulse based on position.vi ‏58 KB

    Triggering with the DAQ card:
    The 6229 unfortunately doesn't support analog triggering.  Comparable cards which do are the 625x or 635x (also the more expensive 628x and 636x).  On such cards there is an Analog Window Triggering feature that would produce the exact signal I think you are looking for (see X Series user manual).  So if you have one of these handy or are looking to acquire new hardware then this would be a good solution.
    Software detection for trigger signal:
    If you want to continue using the 6229, see if something like the following would give what you want.  Keeping the loop simple might help make this approach usable for your application depending on how long the window is you are looking for.  It still isn't as reliable as a hardware-triggered approach.
    External circuitry:
    The simplest external comaprator circuit would just consist of an op-amp.  You could use the analog output to set the threshold.  The comparator output could trigger a counter output which would issue a pulse of some pre-defined width.  The issue here is that the output signal would not be high during your exact window, but rather a fixed amount of time starting at the beginning of your window (so if the speed is changing it might not be what you are looking for). 
    You could in theory just build your own external circuit to generate the exact window trigger as well at which point you wouldn't need to output anything from the DAQ card (except for perhaps control voltages for this circuit).  If you're at a university perhaps you could look for a EE student that you might be able to contract the work out to?
    Best Regards,
    John Passiak

  • How do I get the difference in time using 2 ttl pulses

    Hi everyone,   I have a question using the delay time.  What I need to find the time interval between 2 incoming TTL pulses and fire the output TTL pulse precisely the same time interval after the second TTL pulse.  I have been using Labview 7.1 with real time module and FPGA module (I think 1.0 because I can not find wait for rising edge vi).  I am using NI 7830R card.  The length of each TTL pulse is about 1-5 microsec.  Second pulse comes in at about 1 millisec after the first one.  So I need to fire aboyut 1 millisec after the second incoming TTL pulse.  Because of the non constant TTL pulse length, I would like to reference at rising edge of incoming ttl pulses.  Can anyone give me a help on this?
    Thank you very much.
    Hideya 

    Hi Hideya,
    As is the case with many programming questions, there are several ways to go about solving this one.  The solution I have in mind is to poll the digital input line for a transition from low to high.  The simplest way to do this would be to use a loop with a shift register to store the previous digital input value.  When the current digital input value is greater than the previous value, you can get the tick count (microsecond resolution sounds like it would be sufficient).  You can then do that sequence of operations a second time.  The difference between these two tick counts can be used as the input to the wait (microsecond) function.  After that you can send your digital output pulse.
    Best regards,
    David H.
    Systems Engineer
    National Instruments

  • How can I use a TTL signal at my PFI to start a VI

    Hello,
    I am writing a VI to controll a motor with Digital Output, this is working. But this Vi has to start after the first (second, third or fourth) TTl pulse. How can I do that? I see some trigger options by AI and AO Vi's. But these Vi's are for different purposes.
    Is there a simple way to "receive a pulse and than start a VI?
    Thank you.

    Hi wilco,
    If you don't mind a slight delay on the order of a couple ms then you could simply poll that bit in software and start your sub-block when that line becomes true.
    If you require more precise timing, you could use a counter and configure an interrupt to fire on the output of the counter. You would need to setup the counter for pulse generation and then configure the "pulse spec 1" register with the number of pulses you want to wait before you output (will have to be more than 1 on a counter though). DAQ Occurrence 4 will be the one you want to configure an interrupt for rising edge of a counter output. The LabVIEW help file describes these occurrences and you should also be able to find some examples using occurrences in the shipping examples.
    None of them use event 4 but you can get the basic programming concept by looking at the examples.
    Anyway, hope that helps. Have a good day.
    Ron

  • I want to create a TTL pulse. The stepper motor I'm trying to control responds to a high to low edge, when the low pulse width is greater than 0.5 microsecon​ds. What is the best way to go about creating a pulse like this?

    I'm using the NI PCI-6025E card connected to an SCB-100 wiring peripheral. I'm programming the DAQ card using LabVIEW 6.0.2 on a win95 box.
    My first attempt has yielded some surprising results.
    I created a vi with a single while loop set to true. Within that while loop is a two frame sequence. Both frames use the "Write to Digital Line.vi".
    The first frame sets the line in wire to false.
    The second frame sets the line in wire to true.
    The device channel on both frames has been set to my user defined channel nam
    e -> clock.
    clock --> sets the DIO0 channel to be digital write out.
    Using an oscilloscope and some wires I hook ground to the SCB-100's digital ground and I hook the probe to the DIO0 channel. What I see are two different pulses alternating between one another. One has a pulse width of 5ms and the other has a pulse width of about 50ms. You seem to get a grouping of one type of pulse followed by a grouping of the other type of pulse.
    Obviously this is very strange and not what I want. It is also far too slow. So I'd like to know if anyone knows how to do this properly. Remember I only need a low pulse width of 0.5 microseconds.
    Thanks,
    Any help or guidance would be much appreciated.
    Scott

    Scott,
    You don't need to use a digital line to create a TTL pulse. The PCI-6025E has two onboard general purpose counters. You can use one of these counters to create a single pulse of the desired pulse width. For an example of how to program the counters on your board, refer to LabVIEW's Search Examples>>I/O Interfaces>>Counters>>Pulse Generation>>DAQ-STC based.
    The advantage of using a counter over the digital line is that it allows you to control the timing of the pulse through hardware and not software. Thus, it is inherently faster, and the timing resolution is more accurate. The counter will count down an internal 20 MHz timebase to create the pulse delay and the pulse width.
    For more information on the hardware capabilities of your board, you can refe
    r to the User Manual online at www.ni.com/manuals.
    Hope this helps.
    Regards,
    Erin

  • How to send a ttl signal with a good exactitude less than 10ms?

    i have a pci 6013 (8 input channel) and pci 6711 (4 outpout channel).Then i need to send a ttl signal to a camera ccd to take a photo when a waveform sinus is equal at zero (rising), but when i send this TTl signal with dasylab using generator pulse or combi trigger and readind this signal, i have difference between dasylab pulse(that is exactly) and measurement pulse that is approximate 40ms after.But i need to have less than 10ms is it possible?
    Frequence rate =1000hz and block size=512 the waveform sinus is 0.2Hz.i have already try to increase the sampling rate but nothing happens.Thank for your help.

    Yes, it's possible.
    You just have to reduce your block size to 10 !
    For more informations, visit Forum Dasylab en français at http://forum.aceboard.net/?login=128657
    Frédéric Miqueau
    MD Electronic, France
    http://www.mdelectronic.fr
    French Dasylab Forum : http://www.dasylab-forum.de/forum/index.php?showforum=43

  • HT1222 I can't send photos to my friend it says "Not Delivered" my MMS Messaging is on , my Cecullar data is on , i reset the network settings and still my photo did'nt sent.

    I can't send photos to my friend it says "Not Delivered" my MMS Messaging is on , my Cecullar data is on , i reset the network settings and still my photo did'nt sent.

    It is peculiar, that Chrome, Safari, and Skype can access FB, but not the iPhoto uploader.
    Do you see any error messages/ diagnostics in the Console Window, when you try to connect to Facebook?
    Launch a Console window from Applications > Utilities and clear the Console Window. Then try to upload. Are there any new messages?
    And also launch a Terminal and have a look, if "facebook.com" is properly resolved:
    Type 
    ping facebook.com
    into the window. Do you see any transmissions? What is the IP address used?
    I see:
    PING facebook.com (173.252.110.27): 56 data bytes
    64 bytes from 173.252.110.27: icmp_seq=0 ttl=243 time=110.486 ms
    64 bytes from 173.252.110.27: icmp_seq=1 ttl=243 time=109.365 ms
    64 bytes from 173.252.110.27: icmp_seq=2 ttl=243 time=110.101 ms
    64 bytes from 173.252.110.27: icmp_seq=3 ttl=242 time=109.829 ms
    64 bytes from 173.252.110.27: icmp_seq=4 ttl=242 time=111.323 ms
    64 bytes from 173.252.110.27: icmp_seq=5 ttl=242 time=110.346 ms
    64 bytes from 173.252.110.27: icmp_seq=6 ttl=242 time=110.708 ms
    64 bytes from 173.252.110.27: icmp_seq=7 ttl=242 time=112.685 ms
    64 bytes from 173.252.110.27: icmp_seq=8 ttl=243 time=124.256 ms
    64 bytes from 173.252.110.27: icmp_seq=9 ttl=243 time=112.106 ms
    ^C
    --- facebook.com ping statistics ---
    10 packets transmitted, 10 packets received, 0.0% packet loss
    round-trip min/avg/max/stddev = 109.365/112.120/124.256/4.159 ms
    Try the same with "dig":
    dig facebook.com
    ; <<>> DiG 9.8.3-P1 <<>> facebook.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25051
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
    ;; QUESTION SECTION:
    ;facebook.com.                              IN          A
    ;; ANSWER SECTION:
    facebook.com.                    775          IN          A 173.252.110.27
    ;; Query time: 11 msec
    can you "ping" facebook?

  • How do i generate the TTL pulse from PCI 6024E DAQ card

    Hi, I'm trying to write a program which generates a single TTL pulse when it is run. My goal is to generate the pulse, send it to the output channel of my PCI 6024E DAQ card, and then use a BNC cable, to display the signal on the oscilloscope. I have written the code and I think it appears fine but when I try to view the signal on the scope I am unable to see the pulse. I have tried slowing down the sweep on the scope and have adjusted the voltage and time scales but have not seen any response. After examing my DAQ card, I noticed that none of the PFI/TRIG terminals on the card are wired; the output channel connects to terminals for DAC0OUT and Ground. I'm wondering if this pin needs to be wired in orde
    r to generate the pulse since PFI0/TRIG1 is the start trigger terminal. Any help would be appreciated. Thanks.
    Attachments:
    ttl.vi ‏26 KB

    Hi,
    You are looking for a retriggerable pulse generation. Please check the Generate Retriggerable Pulse (DAQ-STC).vi example that ships with LabVIEW.
    Regards,
    RamziH.

  • Counting TTL pulses at high speed

    Hi all,
    I am using PCI-6221 board with DAQmx to count the number of TTL pulses (which varies in its frequency between 0Hz to 10MHz) at a high speed (200,000 samples/sec.) and I am having a problem when the TTL pulse frequency drops below a certain level.
    I am using CTR0 to generate continuous pulse train at 200kHz frequency to feed to CTR1 Gate input. I verified that the pulse train is being generated fine.
    I am using CRT1 with buffered counting to collect the count for 200,000 samples at a time (duration of 1 sec.). I got the example code (Cnt-Buf-Cont-ExtClk) and pretty much used it as is.
    CTR1 Gate is coming from CTR0 Out, which is 200kHz pulse train with 50% duty cycle, and CTR1 Source is the TTL signal that I am trying to count. At first, I thought that everything was working fine with the Source signal being at around 5MHz. Then, when I had the Source signal down below about 300kHz, I noticed that the program is taking longer than 1 sec. to collect the same 200k samples. Then, when I got the Source signal down to 0Hz, the program timed out.
    I am guessing that somehow the counter is not reading for the next sample when there has been no change to the count, but I cannot figure out why and how.
    Any information on this and a way to get around would be greatly appreciated.
    Kwang

    One thing you can try is to set the counter input CI.DupCounterPrevention property, this setting will filter the input, it is possible that when the ctr 0 is slow then many of the values you are counting become zero as well and are filtered out, since they are nolonger points, the counter will not collect enough points before the time-out occurs and the counter input read times out.  I am not sure if this is your issue but I found out the hard way that this occurs when I switched to daqMX where this feature was added.  Let me know if it worked,
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

Maybe you are looking for

  • No video output to extended monitor

    Is there an known fix for the Mac Book Pro when the video-out port on the side ceases to function?

  • Updating columns in master/detail form

    Changes were made to the database that is in the master part of a master/detail form. I have tried to add the new fields using "Create Item" on the page definition. I have gone through the wizard and set the source items to: Source Used: Always Sourc

  • IChat 4 does not accept any more AIM contact!

    I bought Leopard the day of its release, and the problem seemed to apeared since then. When I click on the + button, to add a new contact, I choose the contact in my list, then I click okay. The contact appear in the Ofline Buddies list, but after a

  • No sound with any file type!

    hi, ive rendered some videos from 3D studio max at work and put them into premier, then added wav's and mp3's for sound effects and background themes. they all worked fine at work but when i opened the project in my copy at home the sound files dont

  • Description from WF Container not shown in e-mail

    Hi, In my WF container there is value &ABSENCE.ABSENCETYPE.DESCRIPTION&. in SWIA in logs I can see value in container, it is also in email message text in SWIA. but it is not shown in email that user gets as confirmation from WF. Which is really inte