Unable to measure pulse time, using Counter pulse time 1samp.vi

Hi
I am using pci6624 board to measure pulse time . I have selected counter 0 to measure  pulse time & connect the signal to gate0+ & gate0-.
When i used Counter pulse time 1samp.vi to read the pulse time , i am not able to read the value and i am getting following error msg . If i used Counter DBL 1samp.vi  i am getting out put.
Please help me
Attachments:
pulse_time_measurment.vi ‏11 KB
Counter_errors.JPG ‏44 KB

Hi,
You can try changing the mode to counter -> single sample -> DBL in Daqmx read function
You can also try this example 'Meas Pulse Width-Buffered-Cont.vi' or related examples from NI Example Finder.
Cheers,
Sahil Gupta
NI India

Similar Messages

  • Using counter to time stamp to text file

    Dear all,
    I am using counter to acquire singnal from quadrature linear encoder. I would like to time stamp the data acquisition to text file but I found that I can't choose to read time. Anyone know how to solve this problem?
    Attachment is my program.
    Thank you very much!
    Best regards,
    George
    Attachments:
    encoder continous 21-4-2013.vi ‏28 KB

    Hi,
    Have you seen these two articles?
    http://digital.ni.com/public.nsf/allkb/68806B93A21​355E98625726F0064822B
    http://digital.ni.com/public.nsf/allkb/5D42CCB17A7​0A06686256DBA007C5EEA
    Basically, it can be done, but be aware it may not be as accurate as you would like.  Follow the code in the first article and note that the easiest way would be to just use the basic File I/O VIs to write to text file, since the Write to Measurement File VI will only work with waveforms and you have counter output.
    Matt Lee
    National Instruments
    Applications Engineer

  • How to display the Date Time using the System Time zone

    Friends,
    Can anyone help me with below scenario..
    I have to display Date Time on a jsff page, This value associated to one of Transient View object populated from the database.. Is there any way I can handle on the screen to display the same date /time bassed on the system time zone ?
    I know one way how we can handle it.. while populating to View object we can set the time based on the system time zone.. but it would be easy and simple if there is any approach I can use on UI layer itself..
    thanks

    I don't understand why this display doesn't pay attention to the date/time format settings that are set in the language and text prefs.
    Those settings are used for date OR time, and provide for different displays depending on the space available. The menu bar does not have a fixed space available, and wants both date and time.
    In Leopard, it used the medium time format. To get the date and time, you could modify that format to include the date, but that could cause problems with software that happened to use the medium time format and expectede just the time. Also, you might want to change the medium time format without changing the menu bar display. For these reasons, Snow Leopard's menu bar clock uses its own formatting for data and time display.

  • Getting the current time using java.sql.Time

    I need to set the current time in a database field. I tried the following code (using my logic) to set the current time. But, I end up getting "Jan 1, 1970" in the time field in the database.
    Here is the code :
    Calendar cal = Calendar.getInstance();
    Java.sql.Time now = java.sql.Time.valueOf(
              cal.get(Calendar.HOUR_OF_DAY) + ":" +
              cal.get(Calendar.MINUTE) + ":" +
              cal.get(Calendar.SECOND));
    What should I do to get the current time in the "now" variable? Right now, it ends up in the database as "Jan 1, 1970".
    Thanx in advance.

    Can you show me the code to do SimpleDateFormat?
    Assuming that I use the following skeleton to get the
    time value from the database, can you show me the
    code for the missing link (so as to display in the
    format "hh:mm:ss") ?
    java.sql.Time timeFromDb =
    obj.getActionTime();
    // The above code gets the "time" field from
    the database into "timeFromDb"
    // Use SimpleDateFormat to display the time
    java.text.SimpleDateFormat sdf = new
    java.text.SimpleDateFormat("hh:mm:ss");
    // Now what do I do with "sdf" and
    "timeFromDb" ?
    // Print out the time value
    System.out.printf("Time is : %s\n",
    .... );Hi,
    I don't know if you want 24h clock or not. This is the pattern for 24h clock.
    "HH:mm:ss"
    You get the text string by calling sdf.format(timeFromDb)
    Kaj

  • Generate a delayed counter pulse

    I am posting this to see if anyone can shed any light on various DAQmx operations with counters.  I appear to have found a solution for the project but various counter operations are certainly not well documented and the notes I am posting may help anyone trying to do something similar.
    The project is to monitor an analog input channel and when a certain criterion is met generate a pulse with a specified width at a specified delay from the event.  It is being done in a LV Real Time system.  Initially I tried to start a counter task within a loop, wait until done and stop the task.  What I have found is that it takes a long time (of the order of 10-100's of ms) for the start task to return and the wait until done doesn't reliably return at the time the counter pulse is finished being generated.  Other people seem to have found the same problem.  This is described in the part 1 attachment and the attached vi.
    The other way to do it is with a retriggerable counter task and using a digital line on the same card to trigger the counter.  Then the way the counter works if there is a single pulse or multiple pulses is different.  The way low time and high time are interpreted is odd.    This is described in the part 2 attachment with screenshots from Scope captures.  I have a proposed solution but I'm not sure if it is the best way to do it.
    Any suggestions appreciated.
    Attachments:
    Generate delayed Counter Pulse problem part 2.doc ‏108 KB
    Generate delayed Counter Pulse Problem part 1.doc ‏25 KB
    Generate Counter Pulse.vi ‏153 KB

    Andrew,
    If you want to start a counter output task based on an analog input you should use an analog trigger (if your device supports analog triggering). Take a look at the example Cont Acq Sample-Timed Loop-Analog Start.vi (in the example finder - search for "trigger") for how to set up an analog trigger in DAQmx. Also, you can use the Start.Delay property in the DAQmx Trigger property node to specify an amount of time to wait after the Start Trigger is received before generating the first sample
    Michael P
    National Instruments

  • Counting Pulses

    my  aim is toimplement position control of DC motor,i am using NI USB 6221,to find the position i am using  IR LED  and Photodtector and an encoder wheel ,in which when light is received it counts as one and if not zero,is it possible for me to count the number of pulses and find the position,ihave only the above hardware resources,plese help me
    my position Encoder resolution: 5.44mm / pulse.

    Hi,
    Use Counter logic to implement above. You will be able to find examples under "Drive:\Program Files\National Instruments\LabVIEW 2010\examples\DAQmx\Counter". Go through the relevant examples and you will get answer.  
    Sriram Iyer

  • About +ive Time Mgmt with Clock Time .

    Hi SAP-HR Experts .
    Plz give me idea about +ive Time Mgmt with Clock Time.
    I maintained , Infotype 50 , (created from 01.04.2007)
    When i tried to maintained Infotype 2011 . (from 01.04.2007) record is not created , it gives
    warning (date is with in selection period) when i press Enter Key over it , No record is created in infotype 2011 .
    I sat feature TMSTA = 1 .
    In infotype 7 , i maintained Time Mgmt status = 1 .
    I want to know what Time Evaluation Report (RPTIME00) will give to me ?
    How do i confirm my self that now SAP-HR is running on +ive Time Mgmt with Clock Time.?
    Please guide me ...
    Regards : Rajneesh (9873607039)
    Edited by: Rajneesh Kumar on Nov 18, 2008 6:02 AM

    Hi Rajneesh,
    When you run time evaluation through PT60 schema TM00 you will get the following:
    1. Clock in and Clock out entry
    All recorded time data documenting the actual attendance times or the actual absence times of employees.
    Actual time has the opposite meaning of planned working time.
    Example:
    According to the work schedule, an employee is supposed to work from 8:00 a.m. to 5:00 p.m. on December 3, 1999 (planned working time). The actual time data (actual times) from this day is shown below:
    8:00 a.m. to 2:30 p.m. Attendance
    2:00 p.m. to 5:00 p.m. Absence - doctor's appointment
    2. SKELETON TIME
    skeleton time is a time account in which payment-related times of an employee are managed.
    Skeleton time is determined in time evaluation.
    Example:
    Skeleton time in the standard SAP System consists of:
    u2022     Attendance, absence, and off-site work within a contractual period (start and end of working time)
    u2022     Overtime hours that exceed approved overtime
    u2022     Paid break times
    3. FLEXTIME
    Working time pattern in which employees can individually determine their own start and end times, as long as a certain number of hours is worked within a defined period of time each day.
    *4. FILL TIME
    A specific period of working time described in time evaluation that lies within the contractual start and end of working time (excluding breaks).
    If an employee works a flextime schedule and is also expected to be at work at certain times (core times), then fill time indicates the difference between the start and end of working time (without breaks) and the core times
    5. PRODUCTIVE TIME
    The usable working time for a resource. The system determines the productive time using the working time data and utilization rate for the resource as follows:
    Productive time = (End of working time - start of working time - break
    duration) x Rate of utilization / 100%.
    You estimate the downtime at the resource using the utilization rate.
    And the results of the following will depend on your settings...
    Time evaluation will update the quotas and it will form time balances
    I hope this information is enough to understand...for more clarifications revert to me..
    Regards,
    KPJ

  • Use timing measured using counter 1 to set the pulse width on counter 2

    I am measuring time between 2 edges on counter 1.  I want to be able to generate a pulse on counter 2 that is dependent on the time measured by counter 1.  The delay on counter 2 is a multiplicative of the time measured on counter 1. Is this even possible?

    Hi Thaison V,
    I am using a PCI 6251 M series card and using DAQMX.  Your assumptions are alomost correct.  I am using a period measurement to measure time in between two leading edges on counter 1 inside a while loop.  I had set up the second counter to generate a single pulse on each trigger (retriggerable digital trigger) inside the same loop and update the low time of the pulse using the channel property.  There seems to be a 2 iteration delay between when counter 2 catches up with time measured on counter 1 time.  I believe this is because the pulse is already generated before the vaule is measured on counter 1.  I suppose if I can use counter write after the counter 1 is read out it might work, but I haven't figured out how to use DAQMX write to write a single pulse ( it works only for pulse train??).
    thanks for your help
    V

  • How to use Counter/timer PWM Pulse as a trigger to aquire data??

    (1) I'm using the NI DAQpad 6015 multi-function card with the new DAQmx Driver. I'm using the counter/timer (counter 0, and counter 1) to generate 2 different PWM pulses to supply my sensor circuit. each pulse is a 1 second in duration. The pulse with 5m.sec duty cycle is the supply for my sensor. In addition to that, I'd like to use the 5 m.sec as a trigger to aquire the sensor reading. The DETECTIN POINT should be the middle of the HIGH State of the 5m.sec pulse (i.e just at the 2.5 m.sec point of the high state).  
    (2) another point is: how to display the counter/timer pwm output pulses on the front pannel?? 
    Attached is the VI i'm using (Complete PWM.vi)
    regards,
    Attachments:
    Complete PWM.vi ‏49 KB

    Hello alaali,
    It sounds like what you need is a trigger delay property node.  This property node specifies an amount of time to wait after the Start Trigger is received before acquiring or generating the first sample. This value is in the units you specify with Start.DelayUnits.  This way you can still acquire using the trigger, and you can specify the delay to be 2.5 ms so that the point that you actually acquire will be 2.5 ms after the trigger.
    Hope this helps.
    Regards,Message Edited by Raajit L on 04-23-2007 04:34 PM
    Raajit L
    National Instruments
    Attachments:
    DAQmx Trigger Delay.jpg ‏6 KB

  • Generate a pulse train using a count from a quadrature encoder as the clock

    I am trying to generate a pulse train with the same frequency as my quadrature encoder.  Every time the encoder counts, I want the pulse to go high until the next count and then go low and so on.  I am using a 6602 PCI card and a BNC 2121 accessory.

    Maybe I'm not understanding your app, but I *think* you and I are approaching it from two very different directions.
    As I understand it, you'd like to emit a pulse with each quad state change.  Then that pulse would act as a counter Source signal.  The counter will then increment on each pulse, to keep track of accumulated position.  Further, you'd use your device-under-test (DUT) as a counter Gate signal, which would buffer the position count each time there's a rising edge on your DUT.  The end result is a buffer of position values, captured at each rising edge of your DUT.
    I'm talking about a different approach to produce the same data.  You'd use 2 tasks on a M-series board.  One of them is a hardware-timed digital input task based on "change detection."  Each time one of the specified bits has a transition, your whole set of digital input bits can be captured and an internal "change detect pulse" is generated on the board.  This task should be sensitive to the DUT edges.
    The other task would be a buffered position measurement.  It would receive the reference encoder inputs and internally do quad decode and keep a running count.  The sampling clock for this task would be specified as the other task's "change detect pulse."
    Net result: on each specified edge of your DUT, you'll buffer a reference encoder position value and a digital state of your DUT.  You can choose to be sensitive to rising edges, falling edges, or (!!!!) both at once. You can also choose to be sensitive to many bits simultaneously.  These are better capabilities than you get with the 6602 alone.
    I *think* the 6220 should be ok, based on a quick overview of specs.  I assume your 3.6 MHz is the rate of ref encoder quad state changes, right?  In the approach I'm suggesting, you only need concern yourself with the rate of DUT edges which appear to be in the 10's of kHz or less.
    Gotta go for now.  Post back if any further questions.
    -Kevin P.

  • Counting pulses and measuring flow rate per second

    Hi everyone
    I am using a compactField Point (cFP-2220) controller to measure the flow rate. The flow sensor that i have, gives the output in terms of the pulses. I need to count the number of pulses for a particular interval and divide it by a K-factor( constant value) to get the flow rate. If i select the interval to be of a second, i would want to count number of pulses per second and divide it by K-factor to get flow rate ( per second). 
    How do i count pulses per second and consequently measure flow rate using this count and K-factor.
    Any kind of help would be highly appreciated.
    Thanks in advance.

    You may be able to use the Edit Tempo function to work this out. With you waveform in Edit view Right Click on the time scale at bottom of waveform and select Bars and Beats display. Select a number of beats by highlighting with the cursor. Then again on the Time bar select Edit Tempo. In that dialogue you can try clicking on Extract to find the Tempo ie. beats per minute. Also you can try adjusting the tempo by entering avalue manually to see how close that gets to your waveform.
    Haven't used this function of Audition much so you may have to refer to the help file to find out more about it.

  • Low-Frequency measurements using counter/timer

    I am trying to measure speed, and am using the FP-502 counter timer module to count the pulses from my sensor. The field point example that uses a fixed width gate pulse will not work for my appliation because I need a gate pulse so big that it updates way to slow.
    Does anybody have any sugestions on how to measure a low frequency signal using a counter/timer?
    Thanks
    Dan

    Hello guys
    Thanks for all your sugestions I have the final results. I got it to work but I would like to add some comments for anybody who is trying to attempt this.
    Triggeing on the gate is a must for low frequency measurements. I used the divide by sugestion however using a factor of 3 only gets you about 60 Hz after that you can't sample fast enough. My application required me to measure from 0 to 150 Hz. I added a "gear shifter" routine where the terminal count was set to 3 on frequencies lower then 45 Hz and 15 for frequiencies greater than 45 Hz. Using a terminal count of 15 for all measurements made the udate rate on really low frequencies way to slow i.e. .5 seconds for 20Hz (check the math on this).
    I a
    lso needed to cascade the counters. At low frequencies the count went higher than 6550. Using the previos channel function of the fieldpoint module enable me to get 32 bit worth of terminal count data.
    Finally I needed to add a timeout condition for 0 Hz. If there are no pulses coming from the senser the program displays the last value read. That won't be 0. So I added a time out routine that if I didn't see a pule in a certian amout of time, output 0 and reset the gate count.
    Thank you for you help you relly saved me. I hope my comments made sense.
    Dan

  • LabVIEW/SignalExpress: How can I automate measuring the time between two pulses?

    Hi everyone, bit of a newbie here so please bear with me.  
    I'm a student at a university conducting a muon decay experiment with an oscilloscope connected to some photomultipliers.  To summarize, if a muon enters the detector it will create a very small width pulse (a few ns).  Within a period of 10µs it may decay, creating a second pulse.  The oscilloscope triggers on the main pulse 5-15 times per second, and a decay event happens roughly 1-2 times per minute.  I am trying to collect 10 hours of data (roughly 1500-2000 decay events) and measure the time it takes for each decay.
    I've been able to set recording conditions in SignalExpress that starts recording on the first pulse and stops recording on the last.  The Tektronix TDS 1012 oscilloscope however feeds 2500 points of data from this snapshot into a text file (for use in excel or other software).  Even if I perfectly collected the data, I would have 100,000+ data points and it would be too much to handle.  I don't know how (or if it's possible) to reduce the sample size.
    To conclude, using Labview or SignalExpress, I would like to be able to have the software
    1.  Differentiate between the single pulse detections and double pulse decay events
    2.  Record only when two pulses appear on the oscilloscope
    3.  Measure the time between these two pulses and ONLY that to minimize the amount of data recorded.
    Any help would be GREATLY appreciated, thanks!

    Hi wdavis8,
    I am not that familiar with Tektronix, but there should be a place in the dialog that you go through when you create the action step to acquire date to specify a sampling rate. That would allow you to reduce the number of data points you are seeing, but may reduce the quality of the data.
    If it’s just a matter of that much data being hard to dig through when you have that many points, you could do some analysis on the data after the fact, and then create a new file with only the data you want to look at. For example, you could identify the peaks in the data, and based on the distance between them or the difference in magnitude, selectively write data to a new file.  
    Here is some information about peak detection in LabVIEW:
    http://www.ni.com/white-paper/3770/en/
    You could also do some downsampling on the data to get fewer data points:
    https://decibel.ni.com/content/docs/DOC-23952
    https://decibel.ni.com/content/docs/DOC-28976
    Those are just a few quick ideas. 
    Kelsey J
    Applications Engineer

  • How to generate a pulse waveform 90 deg phas shifted with respect to a pulse generated using a counter in PXI 6070E daq card ?

    Hi
    I ma using 6070E daq. I am generating a infinite pulse train using one of the counters. I want to generate another pulse train which should 90 degress phase shifted with respect to the previsously generated pulse. How to implement this using the counters in the DAQ card.

    Hi Gopal,
    1) yes the frequency generator is programmable. You have 2 timbebases (10MHz and 100kHz) and you can divide down by any integer between 1-16. Those are the only frequencies you can use.
    2) The way counters work is that you can apply a gate signal to the counter which will cutoff the output. Therefore, you can have a second counter generating a pulse train of an equivalent frequency to the frequency generator (fout) but you don't want it to start immediately. You want it to start only after a short delay (equivalent to a 90d phase). Therefore, you need to "gate" or prevent the output on this counter for that small delay period of time. The way you can do this is by using a second counter to create a delayed pulse. You would
    connect the output of that counter to the gate of your pulse train function. That way, during the delay period of the pulse, you won't be outputing your pulse train yet. When the pulse (high-time) of your pulse reaches the gate, then your pulse train will start generating its pulse train (which is consequently delayed by the amount of delay used in the single delayed pulse counter). Since you don't want your pulse to go back low, you will have to turn off or clear your pulse counter while it is high. That way the signal on the gate will remain high forever.
    Your better solution is to use a PCI-660x card to perform this action. You will have more counters which will give you a greater range of frequencies to choose from and you will have more accurate timing of the signals.
    Anyway, hope that clears things up. Have a good day.
    Ron

  • How to use Counter/ti​mer PWM Pulse as a trigger to aquire data??

    I posted this question on the Counter/timer BOARD, but i got no replies. So i decided to post it here.
    (1) I'm using the NI DAQpad 6015 multi-function card with the DAQmx Driver. I'm using the counter/timer (counter 0, and counter 1) to generate 2 different PWM pulses to supply my sensor circuit. each pulse is a 1 second in duration. The pulse with 5m.sec duty cycle is the supply for my sensor. (Imanaged to generate the required pulses). 
    In addition to that  I'd like to use the 5 m.sec as a trigger to aquire the sensor reading. The DETECTIN POINT should be the middle of the HIGH State of the 5m.sec pulse (i.e just after the 2.5 m.sec point of the high state). Detection takes place only at the HIGH State of the pulse. How Can i read my sensor voltage for this limited duaration (2.5 m.sec) each time the pulse is high.
    (2) another point is: how to display the counter/timer pwm output pulses on the front pannel?? 
    Attached is the VI i'm using (Complete PWM.vi), and the pulses diagram
    regards,
    Attachments:
    Complete PWM.vi ‏49 KB
    pulse.JPG ‏10 KB

    This question has been replied to on this other post.
    Thank you,
    Raajit L
    National Instruments

Maybe you are looking for