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

Similar Messages

  • Counting TTL pulses from A between TTL pulses from B

    I have two sources of TTL pulses. I need to count, from a c/c++ script, how many TTL pulses are received from source A between each of the  TTL pulses received from source B.
    I have a PCI-6229 connected to a BNC 2090A, and both of my TTL pulses sources are connected via BNC plugs.
    Is there any function that can do that?
    I tried to get an example script using the DAQ assistant from LabWindows, selecting acquire signals -> counter input -> Edge count. The function that I got as a result was DAQmxCreateCICountEdgesChan, and I am afraid that it only takes the counter as an argument and not the second digital input that marks the intervals.

    From your description it seems to me that the best option is to use two-edge separation measurement. I am not on a PC with CVI installed so I cannot point you to a specific example but this tutorial gives you a brief explanation and some guidance on examples to look at.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • 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

  • Counting TTL pulses within specified integration time

    Dear all,
    I have a PCI-6014 board, and I use Labview 7.1 and would like to do the following task with DAQmx7.4:
    Analog source:  analog square wave (or = 1Hz TTL pulses) produced by a function generator
    Signal: photon signals from a photomultiplier (random TTL pulses)
    I would like to count the photon signals at 100ms integration time, repetitively. But I don't want cumulative counts, just the number of photons (TTL pulses)  in every 100ms.  I would also like to make sure that I synchronize the counter with the analog source, i.e. to make sure I get exactly 10 data points in each analog cycle. ( I can't use the computer to start the function generator and it just keeps running., so I want to make sure I start counting on the starting edge of the analog wave.)
    I used to do this with the traditional DAQ and connected the analog source to the "GATE" pin of the counter , so i could count "while gate is high" ( or while gate low, or count on rising edge/ falling edge. ) However I found some problems and I think my counter wasn't counting correctly, and I would like to rewrite the task  with DAQmx anyway.  Ideally I would like to separate the signals that occur in the first 1/2 and the second 1/2 of each analog cycle. But if that is not quite achievable, I can do the separation later when I process the data, provided that I know each 10 data points from the counter correspond to each analog cycle.
    I have read several threads on the discussion board, but I still couldn't configure my applications using those examples.
    Also I wonder if the "Arm Start Trigger" function is not available on my PCI-6014 card ? Because I can not find it in the Start Trigger property node.
    Thank you very much for your reply. Any hint or advice would be greatly appreciated.
    Joyce

    ...(Continued from prev post due to 500-char limit)
    Now, here's a proposal for a method that should be able to work, though it'll require more data and more processing.  One key area to watch out for under DAQmx is the property node for "Duplicate Count Prevention."  The behavior changed between 7.1 and 7.3 (on E and/or M series, but not on TIO-based counters), then the defaults changed in 7.4, and something changed yet again in 7.5
    Bottom line: you can set it to True or False.  One setting will allow you to buffer up 0 values for intervals where there are no Source signals (photon events) within a sampling period (10 Hz hw clock).  The other setting will not record anything in the buffer for those intervals.  Clearly, you need the former setting, so you can always experiment to see how it behaves.  I kinda gave up on trying to interpret it, understand it, or keep up with the differences by DAQmx version and DAQ board.
    Ok, here goes:  I'm going to propose that you actually oversample by about 10x and that you capture the Analog square wave in sync with your photon counts.  Then your post-processing can determine for sure which samples correspond to Analog Square High and which to Low.  You'll also be able to adjust for times when you get 1 too many or one too few samples in a square wave cycle, due to having independent un-sync'ed timebases.
    So on one counter you generate a 100 Hz clock.  The other one is programmed for buffered period measurement using the 100 Hz clock as a SampleClock and the photon pulses as the Source signal (this must be set up using a DAQmx Channel property node I believe).  Remeber to be careful also about the DuplicateCountPrevention property.
    You would further setup an AI task using the same 100 Hz clock as a Sample clock.  Be sure that the 100 Hz clock task is started after starting both the other tasks.  Also, be sure to always read the same # of samples from both tasks to keep the counter period and AI data in sync.
    Voila!  You now generate a data record of # of photon pulses for each 10 msec interval along with the voltage of the analog square wave at the end of that interval.  A bit of post-processing and you're covered.  If you're not required to manipulate data while the acq tasks are running, you can surely afford to bump up the oversampling rate considerably.  The main advantage is to gain resolution on the time of transition of the analog square wave.  For any interval ending with a TTL state change, you won't know where within that interval the transition occurred.
    -Kevin P.

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

  • Need to generate a TTL pulse of 3 ms using USB Daq 6361

    Hi all,
    I need to generate a TTL pulse of 3 ~ 5 ms to trigger my external device. I am using USB daq 6361 with BNC connectors. I tried to use this examples(attached) but was not succesfull , can any one help me out in this, I just want a TTL pulse out to trigger my device. I tried to modify the example to see the wave form out but all it shows is a straight line. I want to generate a TTL pulse as soon as my program starts.
    Am I using wrong example? should I use somethis else to generate the pulse. please let me know.
    Thanks,
    Attachments:
    Capture.PNG ‏76 KB
    Digital - Continuous Output_ttl.vi ‏65 KB

    AnkitG wrote:
    Jeff·Þ·Bohrer wrote:
    Why would you create an Task with an analog output?  its a Digital line you want to drive! and, just create it in the project.
    Hi Jeff,
    thanks but I couldnt understand , what you meant by create in project? Can you please explain. should I create digital line but I am still getting the same error.
    Creating DAQmx items in Project Explorer saves the DAQmx object properties as part of the *.lvproj file.  This can be very useful when the Task configuration does not change in the built application and you seldom want to use the task elsewhere.  If you want to make minor tweaks to configuration of the run-time app there is even a human readable text file in the build output where properties like scale offsets, timing rates or ranges can be modified without redeploying a new app.  
    Jeff

  • Counting ttl pulses

    Hello Everyone,
    I am attempting to continuously record (i.e. time stamp) only positive (i.e. 'Logic High' event) TTL pulses from a PMT using a PCI-6602 board via a BNC-2121.
    From reading the LabVIEW tutorials/examples it seems that I should be able to get very high precision (15 digits) from the "Get Date/Time In Seconds" VI. I need to be able to record times to the microsecond (at least). Yet when I look at the data it appears that for every digit less than a millisecond either a 9 or a 0 is recorded, which leads me to believe that I can't get better time resolution than a millisecond. Is there anything I can do to change this?
    Assuming that I can get this to work I would also like to simultaneously monitor and record a second PMT channel. Any hints or tips would be great!
    I've attached my very basic VI below.
    Cheers,
    CJ
    Message Edited by CJKS on 05-22-2006 11:53 AM
    Attachments:
    PMTcounter.vi ‏126 KB

    Yes the simpliest way to do what you want is to count the time between rising edges using a counter (the 6602 has 8 80 Mhz 32-bit counters).  Yo will not use digital io but time counting.  The gate of your counter will be the TTL/Cmos pulse from your PMT and the source of the counter will be the 6602 master clock 80Mhz, so you can count clock ticks between photons, now you have a 12.5ns time resolution.  You can use the system clock to get a time zero if you would like to use absolute time.  The olny thing to keep in mind is that you will be limited to a maximum time between pulses of 2^32/80M or 53 seconds, you will get an overflow of your counter but usually this is not a problem with photon counting.  You will be also limited to a maximum photon rate of about 20Mphoton events.sec this is also not a problem since the interesting photon events seem to happen between these time scales.  if you want a longer time scale you cvan always casceds 2 counters to get 64bit resolution but this is probablu not necessary.  Look at the buffered period measurment examples.  You can easily scale this to 8 counters with 8 PMTs if desired with your curent hardware but this gets expensive.  Goodluck.
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Count ttl pulse only over 2 V

    Hi I have a problem while I was trying to count a ttl pulse by using the DAQ Assistant. The problem may be simple but I just cannot solve that since I am new to LabView.
    There is a TTL pulse generated from our APD which is about 30 ns width, 5V. I want to use LabView to do the photon counting. However due to the noise, I would like to set a count limit of 2V, so the software only count the TTL pulse which is greater than 2V. But I cannot do that. There is no option to set the limit.
    And our hardware is BNC-2110 and PCIe-6323.
    Can someone help me with this? Thanks.
    Solved!
    Go to Solution.

    Okay so perform a finite or continous read of your analog input.  Then you can perform a threshold, where all values below 2 become 0.  This can be done many ways but I'd suggest an auto indexing for loop and using a select function in the for loop.  Then you can perform any normal edge detection you normally would to count pulses.
    EDIT: Post some code if you can.
    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.

  • 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

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

  • I have copied over my music file to a new computer and the music shows on itunes but wont play. When I track where the song is located it is reading the wrong information. How do I change this as Edit Preferences has the right location

    I have copied over my music files to a new computer and the music shows on itunes but wont play. When I track where the song is located it is reading the wrong information. How do I change this as Edit>Preferences has the right location?

    Select one of the tracks with a broken link, press ctrl-i to Get Info. Say No when iTunes asks if you would like to locate the track, then look at the Summary tab for the location expects to find the file in.
    Now try to locate the file in question. The two locations should give a clue as to what to do next.
    Here is an example with a file I've deliberately moved from the new layout to the old pre-iTunes 9 layout.
    This means iTunes is expecting to find the file at:
    D:\iTunes\iTunes Media\Music\a-ha\Take On Me\01 Take On Me.mp3
    but it isn't there because I've moved it to:
    D:\iTunes\iTunes Media\a-ha\Take On Me\01 Take On Me.mp3
    which is where it would have lived back in iTunes 8 (though the media folder would have been called iTunes Music back then as well).
    If you can provide the expected and actual locations of a broken track I should be able to suggest the easiest way to resolve things.
    tt2

  • Looking for an app that allows our business to track where our company issued Iphone4S's are at all times.  Ideas?

    We are looking for an app that allows our business to track where our company issued IPhone4S's are at all times.  Any ideas?

    Requires each device/user have an unique Apple ID(verifiable email address):
    http://itunes.apple.com/us/app/find-my-friends/id466122094?mt=8
    Otherwise you can use Find My Phone, but requires logging in for each separate user. Find My Friends(built by Apple) will show everyone's location on one device.

  • What is the newest GTS/GRC Release? Where is the difference between GRC/GTS

    Hi Folks,
    I am glad cause I found this forum.
    What is the newest GTS Release?
    I am a bit confused cause I saw
    GTS 7.1 must be the newest.
    But also there is a GRC 8.0 but I think this is not a GTS this is a GRC only for Governance
    G = Governance R = Risk C = Compliance.
    Where is the difference between GRC and GTS?
    Hope you can bring some light into this shelter.
    Regards
    Dieter

    Actually it is GRC GTS 8.0.
    But there will be soon GRC GTS 10.0
    As you see the "full" name is GRC GTS.
    But there are also some other GRC solutions.
    As far as i know GRC is a more strategic tool. Eg. to get AEO Certificate or to minimize risk of a compay.
    GTS is used for the daily foreign trade business (import/export/SPL,trade preference).

  • A way to track where all the Sub Var are applied?

    Hopefully this is the section where to post.
    Is there a way of tracking where all the substitution variables are being used in the reports?
    Either in reports or calc scripts, or in a 3rd format, if there is one.
    We just don't want to open up each script individually and scan for use of the sub var, or open each report and see if it's used.

    Hi there,
    Is this HFM or Essbase?
    Regards,
    Thanos

Maybe you are looking for

  • Set List Manager Values

    I use a List Manager (based on Popup LOV) in a form. On submit, I insert the list manager values by creating a array using the wwv_flow_utilities.string_to_table function and inserting the values one by one in a loop. I would need to be able to set t

  • HT4623 Update ios not working. Please help

    I have updated iTunes, My iPhone 4 is on ios 4.3. Nothing else has worked to update ios. So I manually downloaded ios 5. When I held shift on update and selected the ios 5 it worked.Now that I have the update it gets stuck on "preparing software" and

  • Ati driver

    In the long past, when there was a Mac Called POWERPC they had this thing called ati catalyst where u could solve problems with the display size and stuff like that, somehow this application ahs been how to say it... discontinued, now that i have my

  • Tracing material master changes

    Hello, I am trying to log changes made to material master - classification tab. We dont want to use CDHDR to track changes made to Classification data. Because we are reluctant to run the report RCCLUKA2 because of various related issues. Has someone

  • Can't save library error -54

    This error has just started to pop up all the time. What library is it referring to? Where is it stored? In my iTunes folder I see both iTunes Library.itl and iTunes Library.xml. Also under file menu I see Library export, so I quickly exported the fi