Measuring duty cyclse of the signals at PFI through counter

I have NI PCI-6052E-DAQ card. I have four square waves at PFI lines. I want to calculate the high time of each signal picking the signals one by one from PFI lines using triggering concept for counter to start with rising edge and stop with falling edge and then . This concept is already used in measring-9-frequencies.vi
Please Email me with plain explaination for your answer.
My Email: [email protected]

Hello;
As your board only has two counters, you will be able to read only two sqaure waves at one time. You have two options at this point:
1) To acquire a PCI-6602 which has 8 counters
2) Do the measurement of the first two and then take the measurements of the last two square waves.
To do that, you can create a Labview sequence in which the first sequence does the first two square waves and the second sequence does the last two waves.
You can find a Labview example at Search Examples->I/O Interfaces->Data Acquisition->Counters->Pulse-Width Measurement->Measure Pulse (DAQ STC).vi, which does the width measurement. You can cheange that example to work with two pfi lines instead of only one, and create a sequence of events to do the same measurement on the last
two waves.
Hope this helps.
Filipe

Similar Messages

  • How to measure/estimate Bias of the signal

    Dear Sir
    I am performing the FFT of the signal which collect in real time from the hall effect current tranceducer SCT-013-005. I need to measure/estimate bias of this signal. Can you please guide me how can I do that. (Attached is my vi which is developed in LabVIEW 2012)
    I shall be thankful to you for your attention and consideration.
    Kind Regards
    Urfee
    Solved!
    Go to Solution.
    Attachments:
    How to measure Biase of the signal.vi ‏930 KB

    Hi tronoh,
    what about using the "Basic Averaged DC&RMS" function on your periodic signal?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How do I use a counter to measure frequency and multiple analog signals in the same VI?

    I have a PCI-6071E, an SC-2345 with multiple modules, and a PXI-8184 (with a PXI-1002 Chassis).
    My goal is to monitor pressures, flows, temperatures, and speed in one VI.
    I am using Measurement and Automation Explorer version 3.1.1.3004 to manage my channels.
    My speed is a PWM signal which I recently rewired through the counter 0 of my board.
    I was hoping to configure this to read frequency directly in measurment
    and automation, have this scale the value to RPM, and then feed it
    directly in to my labView program.
    In labView, it will not except this signal though.
    I get error -200300 from the DAQmx Start Task.vi
    Possible reasons(s):
    Invalid timing type for this channel.
    Property: SampTimingType
    You Have Requested: Sample Clock
    You Can Select: Implicit, On Demand
    After doing some research, it seems that the counter wants "Implicit"
    selected for the DAQmx Start Task.vi, but then I cannot use my other
    channels. Also, counter is included in the "Sample Clock" option
    description, so I do not understand why it is not working.
    Does anyone know how to work around this problem or a way to configure the counter so that it will work in this way?
    All my other channels are Analog.
    Thank you.

    I am working on getting just the counter working by using
    the program posted previously, and I am running into issues. Periodically I get
    the error:
    Error -200141
    occurred at DAQmx Read (Counter DBL 1Chan 1Samp).vi
    Possible reason(s):
    Data was overwritten
    before it could be read by the system.
    If Data Transfer
    Mechanism is Interrupts, try using DMA. Otherwise, divide the input signal
    before taking the measurement.
    It seems to work better if I use cascaded counters, but I need timer 0 for
    analog channels when I run this code along with the program for the other
    measurements.
    I have tried averaging, and selecting different values for the millisecond
    timer, and these did not seem to have an effect.
    I tried different DAQms configurations and "Counter DBL 1Samp" seemed
    to work the best.
    The program will work for a while and then it will give me the above error
    message.
    If I use counter 0 as a cascaded counter input, the program runs fine. If I run
    this with other analog channels, it errors out because the analog channels use
    counter 0.
    If I use counter 1 as a cascaded counter input, it seems to work better than a
    single channel, but it will still error out with the above error.
    If I use only counter 1, I get the error above even faster.
    Also, none of the
    configurations give measurements outside the While Loop.
    The only place I can add a speed dial for the front panel is within the While
    Loop.
    Is there someway to get the signal to continuously send out of the while loop?
    I thought if I could get the signal out of the while loop, I could condition it
    anyway I wanted without the program erroring out.
    Any suggestions would be much appreciated.
    Thank you.
    Attachments:
    Counter_error.jpg ‏45 KB

  • Tone measurement express vi affect the output signal?

    Hi everyone, I am doing a oscilloscope to measure the input signal coming from my analog input of myRIO. I am still new to Labview and I not sure how to implement the tone measurement to measure my signal frequency, amplitude and phase. The first diagram below show the program before i haven't add the tone measurement express vi, the signal get from the waveform graph seem great. However, when i added the tone measurement express vi, the signal seem distorted and unstable. Does anyone know how to solve this problem? Is it the way I implemented is wrong?
    Figure 1: without tone measurement express vi
    Figure 2: with tone measurement express vi

    I would like you to prove the "bug" that you're describing by creating an example that shows the calculated and the expected results. By opening the code of the "Spectral Measurements" Express VI you can dig into the heart of the calculation, and there (in the "ma_FFT Power Spectrum and PS Density no State.vi") you will see that the Power Spectral Density indeed IS calculated by using the formula PSD = (Power Spectrum/(df*Noise Power BW of Window)). See the attached PSD.jpg that shows where the calculation happens.
    The Power Spectral Density is supposed to be dependant of the chosen Window. Please read chapter 5 "Smoothing Windows" in the "La
    bVIEW Analysis Consepts" manual.
    Best regards,
    Philip C.
    National Instruments
    - Philip Courtois, Thinkbot Solutions
    Attachments:
    PSD.JPG ‏139 KB

  • Generated Pulse waveform is distorted when I deliver the signal to the output port in the DAQmx

    Problem: Generated Pulse waveform is distorted when I deliver the signal to the output port in the DAQmx.
    Environment: Windows XP sp3 (32bit), Visual Studio 2010 sp1, NI-Measurement Studio 2010
    Device: NI - DAQmx PCI 6251
     Analog Input: 1.00MS/s multi-channel (aggregate)
     Analog Output: 2 Channel 2.00MS/s
    Reference Example: AO_ContGenVoltageWfm_IntClk / AI_ContAcqVoltageSamples_IntClk
    Generated Pulse:
    1) AO0 = Square Waveform /0-5V / 8KHz / 0.5㎲/sample / sample 50% Duty
    2) AO1 = Square Waveform /0-5V / 8KHz / 0.5㎲/sample / (Reverse Image)
    Description: I’d like to deliver the waveform stream satisfied with specified constraints to the 2 channel output port in the DAQmx. To verify accuracy of the generated waveform, I did an electrical wiring from the Analog output channel (2 channels) to the Analog Input channel (2 channels) in DAQmx. As a result of this experiment, I could get a result which has signal distortion. Since the waveform has to satisfy with both high frequency (8KHz) and very short moment interval time (△t = 0.5㎲/sample) between samples, I cannot handle some parameters of the function in the referenced VC++ example. Following formulas shows an approach to deliver the generate pulse waveform to output port satisfied with constraints.
    Analog Output Channel
     Frequency = 8,000 cycles/sec (constraint)
     Sample per Buffer = 2,000,000 = 2*106 samples/buffer
     Cycles per Buffer = 80,000 cycles/buffer
     Sample per Channel = 1,000,000 = 1*106 samples/channel
     Sample Rate  = Frequency * (Sample per Buffer / Cycle per Buffer)
                              = 8,000 * (2*106 / 80,000) = 2*106 samples / sec
     △t  = 1 sec / 2*106 samples / sec
               = 0.5 * 10-6 sec/sample (constraint)
     Buffer Cycle  = Sample Rate / Sample per Channel
                              = (2*106 samples / sec) / (1*106 samples/channel)
                              = 2 channel / sec
    Analog Input Channel
    Sample per Channel = 1,000,000 = 1*106 samples/channel
     Sample Rate  = 1 MS/s * (2 Channel) = 5 * 105 Samples / Sec
    Program Code
    AO_ContGenVoltageWfm_IntClk / AI_ContAcqVoltageSamples_IntClk (VC++ Example)
    Result: The proposed approach was implemented in the experiment environment (VS2010, MStudio2010). As shown in Figure 1, we could get the unsatisfied result. Although I intended to make a ‘square’ pulse wave, the result looks like ‘trapezoid’ pulse wave (Figure.1). However, there is other result which was undertaken with different parameter condition. It looks like the square shape not the trapezoid shape.
    Please let me know what the conditions make the problem of signal distortion. (AO0 = Green line / AO1 = Red line)
    [Figure. 1] Frequency 8000 Hz / Cycle per Buffer = 8000 Result
    [Figure. 2] Frequency 1000 Hz / Cycle per Buffer = 1000 Result
    Questions: Please let me know following questions.
    1) Is it possible to deliver the generated pulse wave satisfied with constraints (f= 8KHz), △t = 0.5㎲/sample) to the output port without distortion using PXI 6251?
    (Is it possible to solve the problem, if I use the LabView or MAX?)
    2) Are there some mistakes in the proposed approach? (H/W or S/W program)
    3) What is the meaning of the Cycle per Buffer?, It could effect to the result?

    Hi Brett Burger,
    Thanks for your reply. For your information, I have set the sampling rate as 10000 as for the sound format, I have set the bits per sample as 16 bit, the rate as 11025 and the sound quality as mono. I tried using your method by changing the sampling rate as 8K but still my program encounter the same problem.
    I wish to also create a button that is able to generate a preformatted report that contains VI documentation, data the VI returns, and report properties, such as the author, company, and number of pages only when I click on the button.  I have created this in my program, but I am not sure why is it not working. Can you help troubleshoot my program. Or do you have any samples to provide me. Hope to hear from you soon.
    Many thanks.
    Regards,
    min
    Attachments:
    Heart Sounds1.vi ‏971 KB

  • Is it possible to measure duty cycle of 6 pwn simultaneously using pci6624 board?

    Hi
    in my application i need to measure duty cycle of 6 pwm signal simultaneously  .
    Is it possible to measure duty cycle of 6 pwn simultaneously using pci6624 board?

    Here's what I mean...
    However, it only sends one command at a time. You didn't say if your servo controller requires all 4 commands at once. If so, then you can remove the case structures and concatenate all 4 slider values into one string.
    Message Edited by LabViewGuruWannabe on 11-15-2007 01:05 PM
    Attachments:
    SliderEvents-FP.PNG ‏31 KB
    SliderEvents.vi ‏36 KB
    SliderEvents-BD.PNG ‏63 KB

  • How can i display the signal out of a FFT block to a graph?

    What conversion is required in order to convert a the output of a FFT block to a waveform display? The signal input to the FFT block is a binary pattern signal!

    Hello St Augustine,
    Unfortunately, I cannot open these files that you have attached so I cannot tell you for certain where your problem lies. However, if you are using one of the FFT VIs from the Analzye>Waveform Measurements sub-palette, then you should be able to wire directly from the VI to a Waveform Graph. Make sure you are trying to wire to a Wavform Graph not a Waveform Chart. If you are using the FFT VIs on the Analyze>Signa Processing>Frequency Domain sub-palette, you should also be able to directly wire into a Waveform Graph, but please refer to the KnowledgeBase document linked below for more information about plotting complex numbers.
    http://digital.ni.com/public.nsf/websearch/C010A823CEA80D5386256938005A066E?OpenDocument
    Rega
    rds,
    Jyoti F
    National Instruments

  • Using USB-9211 to measure a small voltage - apparent signal offset?

    Hi,
    I wish to acquire a small voltage signal (0-20mV) using USB-9211.  I know that this device is designed for use with thermocouples, but I have been informed that it can also be used for measurement of small voltage signals (24 bit resolution over +/- 80mV range).
    The problem I am having is that the device seems to generate a small voltage (~3.2mV), which causes a degree of 'offset' in the signal I acquire.  My first guess is that this is caused by the internal CJC of the device, however I cannot find any way of removing this signal within LabView.  If this is the case, is the magnitude of the offset dependent on the temperature of the device itself?
    Can anybody confirm what the source of this voltage is, and advise what is the best way to acquire my signal through LabView?
    I have already raised this query with the helpdesk (ref #613180) but have not yet had a definitive answer.
    Many thanks
    Pete

    On Feb 5, 7:10 am, peteryoung <[email protected]> wrote:
    > Hi,
    > &nbsp;
    > I&nbsp;wish to acquire a small voltage signal (0-20mV) using USB-9211.&nbsp; I know that this device is designed for use with thermocouples, but I have been informed that it can also be used for measurement of small voltage signals (24 bit resolution over +/- 80mV range).
    > &nbsp;
    > The problem I am having is that the device seems to generate a small voltage (~3.2mV), which causes a degree of 'offset' in the signal I acquire.&nbsp;&nbsp;My first guess is that this is caused by the internal CJC of the device, however I cannot find any way of removing this signal within LabView.&nbsp; If this is the case, is the magnitude of the offset dependent on the temperature of the device itself?
    > &nbsp;
    > Can anybody confirm what the source of this voltage is, and advise what is the best way&nbsp;to acquire my signal through&nbsp;LabView?
    > &nbsp;
    > I have already raised this query with the helpdesk (ref #613180) but have not yet had a definitive answer.
    > &nbsp;
    > Many thanks
    > &nbsp;
    > Pete
    The offset is dependent upon the temperature of your cold junction.
    To prove this try heating the cold junction with a hair dryer with
    your signal leads shorted.
    Howard

  • NI 6602 measure quadrature encoder with two signal edge sepearation

    Is it possible to improve the position measurement for X4 encoders,
    that the measurement starts at start trigger and stops at the stop
    trigger signal like the normal two signal edge seperation measurments.
    Everything I tried don't works. Does anyone have an idea. Thank You
    for Your trouble.

    Hello Yong,
    You have no wait time within your for loop.  This means that the loop will execute as fast as possible, but not at a constant rate.  To acheive a more constane rate, try inserting a Wait Time of 1 ms.  This will get you a loop with a 1 kHz rate.
    How fast is your PWM Signal?  It may be that you are missing some two edge measurements while waiting for the loop to iterate.
    I suggest merging your error clusters out of the DAQmx Read.vis.  Right now, you are just clearing out any errors.  Let me know if you start returning any errors once you have done this.
    Regards,
    Sean C.

  • How to measure SNR of an EMG Signal?

    hi
    i want to measure SNR (Signal to Noise Ratio) of an EMG signal. I have attached a VI. Please have a look in the front panel. Among the three XY-graph, one is EMG, 2nd one is ECG and last one is EMG+ECG. I want to measure SNR for the signal EMG+ECG. Here ECG should be considered as noise. How to do so? I didn't find any convenient way for this. Please help me out.
    Thanks at advance-
    Taslim
    Attachments:
    SNR-1.vi ‏140 KB

    Taslim,
    Typically signal to noise ratio is defined on simple signals such as sine waves. Even if you have a "clean" version of the ECG signal, you cannot simply subtract or divide it because it will have a a slight phase shift and probably a small difference in the waveform due to the separation of the ECG electrodes from the EMG electrodes.
    The SINAD VI in the Signal Processing >> Waveform Measurements palette uses FFT methods to identify the fundamental frequency and to isolate that "signal" from other components in the total signal.  
    With a signal which looks much like noise (the EMG) you must define exactly what you mean by signal to noise ratio and how it could be measured.
    You might be able to take the RMS of the composite signal and compare that to the RMS of a clean ECG, but you would need to normalize the amplitudes in some way to make the result reproducible and meaningful.
    Lynn

  • Can my Airport Express be used to extend the signal for an iPad2

    I am using a Linksys wired router as the beginning of my home network. There is an ethernet cable running from it through a wall to the Xbox 360 and an Airport Express serving as the base for the wireless network. I have an iBook on the other side of the wall and about 10 feet and an iMac about 20 feet with one wall in between. These two have some fluctuation in their signal but only between 4 bars and 3. I just got an iPad 2 and it is causing me grief because it struggles to maintain a connection just another 10 feet from the iBook. If I put it next to the iMac when it has full 4 bars the iPad gets maybe 2. The iPad has full bars if next to the router. That kind of defeats the purpose of buying an iPad. So, my question is how to rearrange the network so the iPad is happy in the living room where I mostly use it. I had considered moving the iMac and using it as a base station to free the Airport Express for other duty but where I want to move it is further away from the living room. Right now the Airport is wired to the router. Is this necessary for it to be a part of the network? I know I can use it to get music from iTunes to speakers but would that placement also work as a wireless extender? Would just buying another router for the Xbox location and putting the Airport there also be a better solution?

    ladybastet, let's clean up some terminology. You should designate only one router for your network. At present that is the Linksys. Your wireless access point is the Express, and it gets its network connection from the Linksys. Is that correct?
    If I put it next to the iMac when it has full 4 bars the iPad gets maybe 2. The iPad has full bars if next to the router.
    Now that you know your Linksys is the router, is the above correct? Unless the Linksys is also a wireless access point, the iPad's proximity to it will not matter. Only its proximity to the device creating the wireless network is a factor. In your case, I believe that is the Express.
    There is an ethernet cable running from it through a wall to the Xbox 360 and an Airport Express serving as the base for the wireless network.
    I'm not sure I understand. Is one Ethernet cable going to two places? What is it connected to, precisely?
    Right now the Airport is wired to the router. Is this necessary for it to be a part of the network?
    In the case of a wired router, yes.
    I'm wondering if you have things configured properly, particularly if you have configured the iMac to share its network connection over AirPort. I'm even wondering if your iPad has unintentionally joined a neighbor's wireless network.
    I had considered moving the iMac and using it as a base station to free the Airport Express for other duty but where I want to move it is further away from the living room.
    Using the iMac to share a wired Ethernet connection to create its own wireless network is certainly possible, but it is less than ideal. For one, the iMac would have to be powered on all the time.
    You do not need or want another router.
    It is impossible for me to be certain of your network environment (meaning, the size and configuration of your home, the proximity of competing wireless networks, the number of network devices, and the potential for interference) but you might be better off replacing the wired Linksys router with an AirPort Extreme. That would give you the ability to create a "roaming network" or to use your Express to extend the Extreme's wireless network. I think this would be the easiest solution, but given the uncertainly of your description this expense may not be necessary.
    Much of my confusion stems from your original question: "Can my Airport Express be used to extend the signal for an iPad2" - the quick answer is yes, but a prerequisite question is, "what signal?" The only "signal" I can determine that may be relevant is the one created by the Express. Once we have the terminology fixed, perhaps we can fix what's wrong with your network.

  • Question about the Signal Processing Toolkit

    I am using Measurement Studio with Visual C++ 6. Is it possible to use the
    Signal Processing Toolkit in this environment or does LabWindowsCVI have to
    be used? Would the toolkit supply a lib/dll that could be linked into a
    VC++ project and called directly from the program?
    Thanks

    You can use the signal processing toolkit libraries in VC++, but the libraries do depend on CVI libraries. The easiest way to create a Visual C++ project that links to the CVI libraries would be to either a.) create the project in CVI then convert it using the Measurement Studio CVI conversion wizard, or b.) create a Visual C++ project that uses the CVI libraries with teh Measurement Studio application wizard.
    For more information on the conversion wizard, see the following topic in the Measurement Studio references:
    (Measurement Studio for Visual C++ 6)
    Visual C++ Help\Tutorials\Getting Started\Measurement Studio for Visual C++ 6.0\Converting LabWindows/CVI Projects to Measurement Studio for Visual C++ Projects
    (Measurement Studio for Visual C++ .NET)
    Visual C++ Help\Tutorials\Getting Started\Measurement Studio 6.0 for Visual C++ .NET\Working with LabWindows/CVI Projects in Visual C++
    - Elton

  • Pulse width measurement on two to four signals

    Using the shipped PWM measurement solution I am able to make this work as needed on one signal. I would actually like to be able to do this same measurement on up to 4 signals at the same time. First, is this possible, and second, can this be done using a PCI-6601 counter timer card. My current card is a PCI6024E, and I am aware of the limitation of 2 counters, but I am hoping that the methods to get 2 signals to work will work with 4 signals.
    Troy

    Spencer, thanks for the answer. I tried using a PCI6024E with its two counters and single DMA channel, and the computer kicks back that the DMA channel is busy and cannot be used.
    Do you have some suggested code that might work?
    Troy

  • Measure phase difference between 2 signals

    I am very new to labview. i m trying to use labview to measure phase between 2 signals from encoder. I also want to measure the state of 2 quadrature square signals. anyone has any idea how to do it?

    Hi "rvn10",
    Quadrature encoders do by nature have a phase difference of 90 degrees between channel A and B. This phase difference is required to know in which direction the shaft is rotating when a transition from one of the channels is received. Please see these two links for some useful information:
    Encoders
    Linear and Rotary Encoders
    Quadrature Encoder / Position Measurement
    If your goal is to measure the angular position using the two quadrature square signals, then your task is quite simple if you use one of our Counter/Timer cards. Check for example the shipping example called "Measure Angular Position.vi".
    If you want to read more about our most affordable Counter/Timer product, then check this link:
    NI PCI-6601
    Please let us know if you are using different hardware to acquire the signals.
    - Philip Courtois, Thinkbot Solutions

  • Does the PXI447X and PXI3060E divide the signal by two when connected differentially?

    I would like to measure vibration motion with sensors which measure ground velocity.
    I would like also to work in a differential way to eliminate the noise. We have bought the acquisition device NI PXI1042Q that contains two acquisition cards : NI PXI4472B and NI PXI6030E.
    For the NI PXI4472B, we have connected the positive signal and the negative signal of one sensor to one (of the eight) channel of the DAQ (See the outline on the attached file). So, we are in a differential way.
    For the NI PXI6030E, we have put the switch to "diff" to be configurated as differential. For one sensor, we have so connected the positive signal to the channel 0 and the negative signal to the channel 8 for example (See the outline on the attached file).
    I would like to know if my two acquisition cards, after having substracted positive from negative signals of my sensors, make themselves the division by two of the resulting signal, or if I have to the division by my own. In fact, substracting positive and negative signals make the amplitude to be multiplied by two. So, the amplitude have to be divided by two.
    Attachments:
    outline.doc ‏38 KB

    Hello Sannaa,
    Thank you for your reply. So, you said that I don't have to divide my acquisition result by two. But is it because the division is done by the DAQ, or is it because the signal result of a sensor is ‘(positive signal – negative signal)’ and not ‘(positive signal – negative signal)/2?
    Also, for the NI PXI4472B, I said that I had connected the positive signal and the negative signal of one sensor to one (of the eight) channel of the DAQ to be differential (pseudo) But I don’t know if that solution was good because the documentation say that we can't make a non-ground connection to the shield.
    So the other possibility was to use 2 channels, one for the positive signal with its ground and the other one for the negative signal with its ground (see the outline in the attached file). Here, I do the subtraction between the two channels by my own thanks to a software (‘Matlab’). So, I don’t know if the positive signal is divided by two (and the same thing for the negative signal), or if I have to do it by my own thanks to a software (in the case that the signal result of a sensor is ‘(positive signal – negative signal)/2)
    Thanks a lot,
    benMessage Edited by benbol on 05-24-2005 07:01 AM
    Attachments:
    schema_forum_sanaa.doc ‏28 KB

Maybe you are looking for

  • Nat/pat asa 5505 asdm ver 8.4

    hi all, i have a problem with portfoarwarding on asa 5505. i have this situation: internet ---> pubblic ip address-> router albacom -- 10.0.0.15 ---> -nat farward port 80--10.0.0.1 -outside -firewall asa -inside - 192.168.0.1------------server web 19

  • Weired problem when encoding String

    Hi guys, I need to send an String via HttpConnection (POST), but I get a rather weired error Following Code does not work giving me an IOException : (Uncaught exception java/lang/RuntimeException: IOException reading reader invalid first byte 1111110

  • J2SE path for SQL Developer

    I have downloaded and installed SQL Developer 3.0 (JDK not included) for Linux as per Oracle's download page. The page advises that JDK 1.6.0_11 or greater must be installed. $ java -version responds: java version "1.6.0_20" OpenJDK Runtime Environme

  • File check on boot up?

    I am a first time computer builder, my specs are as follows: MSI|VIA K8T800 K8T NEO-FIS2R Retail ATI RADEON 9800PRO 128M OEM 3000+ ATHLON 64 Retail ZALMAN CNPS7000A-CU DDRAM 512MB 32MX8 PC-3200C2 Corsairx2 1.44MB SONY MPF920 Beige Western Digital 10,

  • Hyperion Essbase on VMware Help

    Hi there....I would be very thankful to you for your precious suggestions..........I am using "windows xp pro" operating system on my laptop. (The lenovo laptop-Core 2 Duo 1.5Gh processor speed and 2.5Gb of RAM). I am going to use MS SQL SERVER 2005