How can I measure a 0% or 100% duty cycle signal ?

I want to measure the duty cycle of an input signal using a counter of a 6030-E board.
I work with a PXI Rack under Labwindows/CVI.
My program already works properly for duty cycle between 1% and 99%, but it is not able to detect 0% duty cycle (ie : signal to ground), nor 100% duty cycle (ie : signal to power supply).
The problem is I don't understand how the counter works in such a situation (it cannot detect any edge, as long as the signal is continuous 0V or continuous 12V).
Please have a look on the following code :
1- First, the counter is configured
// Reset Compteur
i_Status = GPCTR_Control(iDevice, iCptID, ND_RESET);
//Definition du type de mesure du compteur (mesure temps impulsion)
i_Status = GPCTR_Set_Application (iDevice, iCptID, ND_SIMPLE_PULSE_WIDTH_MSR);
//Definition de la vitesse d'echantillonage (20 Mhz)
i_Status = GPCTR_Change_Parameter(iDevice, iCptID, ND_SOURCE, ND_INTERNAL_20_MHZ);
//Definition du signal a mesurer (defaut)
i_Status = GPCTR_Change_Parameter (iDevice, iCptID, ND_GATE, ND_DEFAULT_PFI_LINE);
// initialisation du compteur
i_Status = GPCTR_Change_Parameter(iDevice, iCptID, ND_INITIAL_COUNT, 0);
// Preparation du compteur avant de l'armer
i_Status = GPCTR_Control (iDevice, iCptID, ND_PREPARE);
2- Then, every 10 ms, the value of the counter is read, so that I can calculate the duty cycle...
i_Status = GPCTR_Watch(iDevice, iCptID, ND_COUNT, ul_val_cpt);
3- ...and the counter is armed again for the next reading
i_Status = GPCTR_Control(iDevice, iCptID, ND_ARM);
When duty cycle changes from x% to 0% or 100%, the counter always keep the value corresponding to x%.
Even if I reset the counter between each measurement, it keeps this value ! I don't understand how it is possible.
How can I know that the counter didn't see any edge, and so that duty cycle is 0% or 100% ?
Thank you in advance for your help !
FraB

Hi,
Just have a look at this link, it can be interesting for you...
http://forums.ni.com/ni/board/message?board.id=40&message.id=2161&requireLogin=False
Regards
DD

Similar Messages

  • How can I measure the frequencies of two analog input signals simultaneously?

    Hi
    I have two AI signals, and I need to determine the frequencies of those signals. The frequencies range from 1-125Hz. I currently have a VI where I can sample one of the signals for 1 second (sampling at 300 Hz for 300 samples) and determine the frequency. 
    I need to read two signals at the same time and get both of the frequencies at the same time, but I can only figure out how to read them individually, so I can read one signal, then one second later I read the second one, then I read the first one again, then the sceond one, etc..  How can I read two signals simultaneously?
    Thanks
    Attachments:
    FreqMeas11.vi ‏41 KB
    FreqMeas11.PNG ‏18 KB

    "at same time", this depends on the hardware, you can do as has been previously stated just set up a 2 channel acquisition and you will get 2 sampled waveforms back.  Most hardware A/D as multiplexed and true simultaneous sampling is not done.  At 125Hz this is not an issue unless you are interested in very small phase changes between the samples.  just keep this in mind if you are expecting samples to be completly synchronized.
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • How can I measure the phase difference of two input signal?

    Hello,
    I'm trying to measure the phase difference of two input sine waves with the
    same frequency.
    Is there anybody how I can do this with labview?
    Thanks,
    Dae-han

    This is my case! I have TDS3034 which can measure phase. However when I open Read Waveform Measurement vi that comes with tkds30xx.llb, I have a number of options under "measurement function" but not the phase measurement. May be I need another vi to do this?

  • How can I measure the hertz in a wave form?

    How can I measure the hertz in a wave form?

    As an example, this is from BBC Technical Requirements for HD material:
    3.1.1 Stereo line-up tones
    All stereo tracks must use EBU 1KHz tone (left ident). All tones must be sinusoidal, free of distortion and phase coherent between channels.
    Digital Audio Reference level is defined as 18dB below the maximum coding value (-18dBFS) as per EBU recommended practice R68.
    See also:
    http://www.bbc.co.uk/guidelines/dq/pdf/tv/tv_delivery_to_network_programmes_v1.2-2011.pdf
    for full document.
    And for BBC Radio:
    Not every Network requires tone. Check the delivery requirements with the commissioning network or click here.
    Reference tone, where used, should be at -18dBFS or PPM 4 on A, B and/or M.
    If submitting material with reference tone, tone and programme material must be have been monitored and measured through the same technical chain. The level of the tone must be equivalent to 0dBu and no less than 8dB below peak audio level for the programme material.
    THE LEVEL OF TONE MUST HAVE A KNOWN RELATIONSHIP WITH THE LEVEL OF THE PROGRAMME MATERIAL AND THIS MUST BE STATED; for example: “Tone at 8dB below peak programme level”.
    As a newcomer to digital sound (my background is camera) I confess to being somewhat confused. We are normally told to record at the highest level possible. So for voice podcasts I tend to record at about -6dB below peak for maximum volume, distributeds on MP3 files.
    But I can underatand that televison and radio especially for analogue transmission) may have limited headroom, hence the requirement for -18dB peak = 0dBM.
    I remember when we first rented out Digital Betacam cameras, some recordists were recording almost everything OVER -18dBM.
    I suspect that until we have an all-digital world, these requiremnents will still be in place.
    Many thanks to all. It's a ghreat community!
    Brian Rose

  • How can I measure the Graphics Card usage? I.e. percent load

    Hello,
    How can I measure the Graphics Card usage, like with the processor in Task Manager, but instead giving a percentage usage for the graphics card instead? Is there an easy way to do this, or would it require a lot of code? Is it even possible?

    Ah, so It's unlikely that Java3D will include anything for reading this data then? I was really aiming at measuring the GPU usage under this API which although i have limited knowledge using, I do at least have some knowledge - I wouldn't have a clue how to access any other API's!
    I'm using an NVidia TNT2 card at the moment, which is quite old.

  • When I try to backup my files from photoshop elements 12 the "calculating total media size" box will only get as far as 46% and then freeze, how can I make it go to 100%

    When I try to backup my files from photoshop elements 12 the "calculating total media size" box will only get as far as 46% and then freeze, how can I make it go to 100%

    hi barbara
    thank you for your response, i appreciate it.  there's definitely nothing wrong with the mouse or trackpad, both work fine in every other application....i can also easily change size dimensions in other programs on my computer so it doesn't seem to be that either.  it seems like there is something weird going on in the way that pse and my mac are interacting with each other, just wish i knew what it was.    thank you again, wish me luck!

  • How can I zoom between 50% to 100%

    How can I zoom between 50% to 100%
    50% is too small while 100% is too big
    Because my Comp height and width is very different , fit is not useful for me
    so do anyone know how can I zoom between 50% to 100% ?

    Post the code you currently have

  • How can I measure TREX server.

    Hi,
    I'm from Nakisa forum as below.
    <How can I calc sizing of TREX server
    I'd like to install minimum TREX server for Nakisa.
    A document of nakisa is written about nakisa server but it isn't written trex server.
    <https://websmp209.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000728933&_SCENARIO=01100035870000000202&>
    I found SAP note 1266024 which is written about sizing guide line of Nakisa but it's so difficult to calc.
    How can I measure TREX server and which minimun sizing is best to use Nakisa?
    Hope you can help us.
    Best regards,
    Makoto

    Hi Makoto,
    try the infos for TREX under http://service.sap.com/sizing.
    They are not made for Nakisa. But I am sure you will be able to roughly map them to your use case.
    best, Karsten

  • How can I measure memory allocation of a Java Application?

    We built a web application that enables images to be loaded into a database through a servlet running on Tomcat. We have inconsistent behaivor when more than x number of people are loading images simultaneously. No doubt a memory allocation problem, but how can I measure it?
    For example, I'd like to be able to create a graph showing the resources used against the number of people making uploads. I am using Linux and Tomcat/Apache.
    I am hoping for something like Memory counters that are available for measurine Windows applications on MS Windows - comes with the Resource Kit. Does this type of tool exist for the Java/Linux market?

    It is difficult to gauge memory usage from a Java application as the JVM handles garbage collection and even if objects are not referenced they might still be sitting in memory until the next garbage collect.
    Anyhow, a way to query available memory is:
    Runtime.getRuntime().freeMemory()
    You can run this at the begining of a process and at the end and examine the difference. You should call System.gc() before each freeMemory() call in order to try to force garbage collection.
    Another method would be to turn to the underlying OS. On linux you could use 'top' or 'ps'. With ps you could do something like:
    ps -o rss,vsz,%mem <pid>
    Where <pid> is the parent Tomcat process' id. The resulting three columns are:
    - Amount of real memory used.
    - Amount of virtual memory used.
    - Percentage of real memory used.
    'man ps' wil give you more options on how to use ps.
    There are also fancy graphical stuff like 'gtop' as well.
    Hope this helps.

  • How can I measure how much Data I am using?

    As the headline say:-
    How can I measure how much data I am using?
    Thanks in advance.

    Not a problem at all - without wishing to push the point at all, the manual really is very good and worth a read ! although I must admit I have never read it all
    http://manuals.info.apple.com/en/iphoneuserguide.pdf

  • How can i measure distance ?

    i am making afire fighting robot that us camera to detect the fire i made the vi which find the fire through match pattern but now i want to measure the distance between the camera (which on th robot ) and the fire (which located in the image using match pattern) so how can i measure this distance?
    khaledyr 

    Ok... this is sad, I should be asleep now instead I'm here thinking about this problem.
    I've worked out how to do the distance caluclation with no extra H/W and only 1 camera - as Henrik said, the standard solution is triangulation, but you just want to measure distance, so I'm going to assume you're already pointing in the right direction.
    Assumptions:
    1) It is usual to use triangulation to to measure intenisity, this is because light will have 2 different distances to travel from source to sink.
    2) It is possible to use 1 sink if you use mirrors to increase the path of the light so you can have 2 seperate source -> sink distances.
    3) having 2 cameras (sinks) next to each other, one covered with a physical filter would have the same effect as the amount of light reaching the 2 sinks from the source will be different.
    ... following on from 3, it can be assumed that taking 1 image and applying 2 levels of filtering to it before processing will give the same result as if we had 2 different images. Careful setting of the software filter level will then allow it to remain contstant and then the system can be calibrated just as any other system would be calibrated:
    Measure the intensity of the source from sink A at distance X
    Measure the intensity of the source from sink B at distance X
    Measure the intensity of the source from sink A at distance Y
    Measure the intensity of the source from sink B at distance Y
    If Y=2X the calibration calulation is easy....
    Hope this provides more food for thought.
    James
    P.S. Lynn - currently a firefighter and worked for the emergency services ehh? Always good to see your posts when you have something to add. (Firefighter / Software programmer - what's the difference?)
    Message Edited by James W on 04-22-2010 10:56 PM
    Message Edited by James W on 04-22-2010 10:56 PM

  • How can i measure the speed of the fan in sound and vibration signal simulator box

    how can i measure the speed of the fan in sound and vibration signal simulator box
    provided the values  tach out:2 pulses/revolution and  maximum speed = 6000rpm

    Hi. I tried your suggestion and I could not get it to work well. In
    fact it worked better without the running average (which suprised me).
    I also played with the number of data points but still could not get it
    to work well.
    Do you have any other suggestions on how I could sort this problem out?
    I
    have attached a screen shot of the signal. To recap, I'm trying to
    measure the'y' position of the flat regions of the signal. The signal
    does not have a constant level, so this 'y' position varies with time
    in a non-unform manner.
    I am currently differentiating
    the signal and selecting the y position when the differential is equal
    to zero (within a tolerance band).
    In the screenshot, the
    signal has been zeroed using the method I have described above.
    However, it occasionally has glitches which may be caused when the code
    picks up a zero gradient at a peak or valley in the signal.
    I therefore need some kind of algorithm that only measures the position of the flat regions.
    Many thanks
     John
    Attachments:
    screenshot.gif ‏121 KB

  • How can I measure selected area of pixels using photoshop elements 12?

    how can I measure selected area of pixels using photoshop elements 12?

    Show the 'information' panel F8).
    In the middle horizontal section, select 'pixels' on the left drop-down menu.
    Use the rectangular marquee tool to select your area: the dimensions in pixels of the rectangle is shown under 'dimensions' on the right.
    I think there are other ways to measure a line segment, but you could use the above measure by adjusting the rectangular marquee tools to both extremities of the segment,
    - use the move tool to rotate the rectangle so that the diagonal measuring the segment is horizontal,
    - move the rectangle to the left, and check validate, which creates another rectangle including the first one
    - read the pixel dimension (L:) in the info panel like above.

  • How can I measure the copy speed of my compact flashcard to folder?

    how can I measure the copy speed of my compact flashcard to folder?
    I dont have a stop watch.

    Hi Steve Zavodny;
    Generally compact flash cards or basically slow because of them being flash memory and USB. What are you after here?
    Allan

  • Problem to measure 0% and 100% duty cycle of a PWM.

    Hi,
    I am using counters of USB-6341 to measure duty cycle of PWM just by following the example 'Meas Duty Cycle-Buffered-Finite.vi'. It works almost all the time. However, when the duty cycle of a input pwm is 0 or 100%, the DAQ can't read anything, in another word, it can't measure 0 or 100% duty cycle.
    How to modify that?
    Thank you very much :-)
    Nan

    That's the thing about PWMs, you never really know if the PWM is 0% or 100%.
    Let's say we have a 50% duty cycle, at 1/2Hz.  So low for 1 second, high for one second right?  What if we run at 1/20Hz, so low for 10 seconds high for 10 seconds.  Or is this a 0% duty cycle for 10 seconds, and a 100% for 10 seconds?
    A true PWM read will never be 0% or 100% it will just keep waiting until the trigger is seen, and recalculate the frequency and duty cycle of it.  The solution to your problem is for you to define a duration to watch for a change, and if one isn't seen, then you can define 0% or 100% appropriatly.
    So I would recommend taking your duty cycle like you normally are, and then at the same time watch the digital signal for however long you want, if the digital line does not change state, then output 0% if it is low and 100% if it is high and ignore what ever duty cycle you read.  But if the digital line does change state, then use the read duty cycle as the actual value.
    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.

Maybe you are looking for

  • PROBLEMS WITH IOS 4.2.1 ON IPAD - WHY NOT UPGRADE TO IOS 4.2.1

    Hello anyone! I recently updated to 4.2..that's great! Multitasking,folders, blablabla.... I'm asking why the iPad is so cool?? 1.BATTERY. 2.3G always with you. 3.Mobility. 4.Loud spiker. Sow I recently updated and it looks like the battery lasts onl

  • Need to create tree-view page.

    I'm trying to create a tree-view display using Oracle JDeveloper 10g Release 3, ADF and JSF. I need to show a tree (folder names) and on a click of the last level folder to show table with File names that are related to the selected folder. Data is s

  • Clear iphone cache

    How do I clear deleted contacts and imessages from my iphone 4s cache?

  • Printer wont do as its told in I.E

    I have a Hp photosmart  C410 When printing from Internet explorer, for some reason it defaults to double sided printing, even thou for every other program on the computer its single sided. Even if i click on printer properties and change it back to s

  • HT2534 I would like to change me rescue email address on my itunes account.

    My rescue account needs to be change because it no longer is available to me. Can I change my rescue email address?