CI Semi Period Digital Filter

Hello!
I'm having difficulty configuring my counter inputs.  Pretty new to Counter/Timer setups as well.
LabVIEW 8.5 and MAX 4.5.
The signals I am sampling are 200 Hz, PWM ranging from 5% to 95%, cycling back and forth.
I'm using 7 counters in a PCI-6602.  The code I'm including is an example from my setup.
We are requiring the use of the Rising Digital Edge, and I'd like to include CI.PulseWidth.DigFltr.Enable to enable debouncing.
All inputs are connected to the Gate terminals on each counter.
Is my programming for the Risin edge correct?  I am seeing the falling edge come through first on several occasions.
And for the debouncing programming, I always get error -200452.  None of my searches revealed anything applicable.
I have also tried setting my Min value on the Semi Period configure to 0.0002 instead of 1e-7 with same results.
This is a hot project, so thank you for your time in advance!
Attachments:
Counter PWM Setup 0.vi ‏17 KB

Hi Oley,
It looks like there's two questions here:
1.  Programming for the Rising Edge:
I'm assuming that you want to start the task on the rising edge of your input signal.  It looks like you have set the 6602 to arm off of the rising edge of your 20 MHz timebase (which is independent of the input signal).  Rather than setting the Arm Start Trigger, you can use a DAQmx Channel Property Node to set the starting edge (see below).
2.  Error -200452 (Specified property is not supported by the device or is not applicable to the task.)
The property node that you have configured to enable the filter needs to be specific to the type of task that you are running (in your case, CI.SemiPeriod).  You have selected CI.PulseWidth which is a different task type.  The filtering is usable with a SemiPeriod task by simply changing the property node accordingly.
The property node that you configure should look like this:
This will both enable the filtering and tell the device to begin measuring on the first rising edge.  Make sure that all the properties begin with CI.SemiPeriod--it can be easy to overlook at times since many of the different task types have identical properties available.
I hope this helps out, let me know if you have any questions or run into any issues implementing the above.
Best Regards,
John Passiak

Similar Messages

  • NI PCI-6602: semi-period measurement stops unexpectedly or returns wrong values

    Hi,
    Using an NI PCI-6602 card we try to measure the semi-periods of a digital signal.
    In "continuous sampling mode", 10 samples are collected in the buffer and then are read
    out.
    Up to 6 counters on this card are sampling the same signal in our testing configuration.
    Here we found these issues:
    1. Failure
    In principle, the measurement runs correctly, but one or more counters sporadically may
    suffer a complete failure. I.e. these counters don't provide samples anymore.
    Only after stopping and restarting the assigned task, a failed counter works again.
    Apparently, a counter failure is most likely to happen when
        - the sampled signal "changes", i.e. when the pulse width of the signal changes,
        - or when the computer load is high, e.g. when opening a window of another application.
    Every counter occasionally failed, but the issue was found very often at counter 1 of
    the PCI-6602 card, if we used counters 0 through 5 in parallel.
    Using another PCI-6602 card, the failures happened preferably on counters labeled "near"
    number 5.
    2. Wrong values
    Occasionally the "interpretation" of the sampled values changes, i.e. the length of the
    "high level" period is returned, where the "low level" period length should be given, and
    vice versa.
    This is our task configuration:
    Configuration done with MAX:
    Signal input range:    2 usec - 2 sec
    Custom Scaling:        None
    Sample mode:        continuous
    Buffer size:        10 Samples
    In addition these calls are made:
    ret = DAQmxSetDigEdgeArmStartTrigSrc( task->mHandle, <use the same terminal as is used for
    the signal to be measured>);
    ret = DAQmxSetArmStartTrigType( task->mHandle, DAQmx_Val_DigEdge);
    ret = DAQmxSetDigEdgeArmStartTrigEdge( task->mHandle, DAQmx_Val_Rising);
    ret = DAQmxSetCISemiPeriodStartingEdge( task->mHandle, <the channel>, DAQmx_Val_Falling);
    Best regards
    Manfred

    Hi Manfred7,
    did you already test this behaviour with a simple example from us?
    Just go through the example database and try the examples there.
    These examples should work. 
    If it works, there is a problem with your programm.
    If it won't work, please tell me more about your software:
    - Version
    - DAQmx Version ,...
    best regards
    Dippi 

  • Configure digital filter for external clock

    I am trying to use a digital filter on my PXI-6602 card and I can't get it to configure for an external clock. It keeps telling me the numbers don't match up but I don't see the logic to the numbers it supports. Here is the error I got for a time base of 100 Hz and a min pulse width of 1/(100 / 2) based on the period of 2 clock cycles.
     Desired Minimum Pulse Width could not be produced.
    Minimum Pulse Width is affected by the Digital Filter Timebase Source and the Digital Filter Timebase Rate. To see how these two property settings can affect the Minimum Pulse Width, refer to product documentation for more details.
    Property: CI.CountEdges.DigFltr.TimebaseSrc
    Requested Value: /PXI1Slot2/PFI36
    Property: CI.CountEdges.DigFltr.TimebaseRate
    Requested Value:  100.000000
    Property: CI.CountEdges.DigFltr.MinPulseWidth
    Requested Value:  20.0e-3
    Supported Values:  80.0e-3 to  171.798692e6
    Task Name: _unnamedTask<49>
    I know my math is off since the filter uses the leading edge of the pulse but 0.08 seconds is 12.5 Hz and I don't get it. Other frequencies produce different but also odd (to me) numbers.
    Attached is a copy of my VI
    Attachments:
    External Clock for Filter.jpg ‏131 KB

    Digital filtering ensures that a high pulse is high for at least a certain time (minimum pulse width) in microseconds.  This is to ensure that a fluke noise signal does not count as a high pulse.  It also ensures that a voltage overshoot to the high value does not register more than one high pulse as it settles in to the value.
    The specifications of the digital filtering is outline on page 3-1 to 3-3 of the 660x User Manual, found here. It specifies on page 3-3 that there are five different settings for the digital filter minimum pulse width:
    5 µs 
    1 µs 
    500 ns 
    100 ns 
    Or, programmable with a custom tfltrclk (period in seconds of Filter Clock).  However, when using tfltrclk, minimum pulse width needs to equal to 2*tfltrclk.  Your current setup has the minimum pulse width set up for minimum pulse width = 1/(tfltrclck/2) = 2/tfltrclck rather that 2*tflrclk.
    I think you already knew all of this.  However, the Filter Clock does not equal the Filter Clock Timebase.
    If we look on page 3-3 in the manual we seed that Filter clock is actually 1/4th the speed of the Filter Clock Timebase.  
    Therefore, in your setup:
    Filter Timebase Rate = 100Hz
    Filter Clock Rate= 1/4th *100 Hz = 25Hz
    Filter Clock Period = 1/25Hz = 0.04 seconds
    2*Filter Clock Period = Minimum Pulse Width = 2*0.04=0.08 seconds.
    Which is the minimum value it was suggesting.  This will always be four times as large as what you were guessing before.
    Eric S.
    AE Specialist | Global Support
    National Instruments

  • Quadrature encoder on PCI 6220 DAQ custom digital filter problem

    I am using both counters on my 6220 DAQ for quadrature encoders.  What I am trying to do is filter some bounce that I am getting on the axes.  I want to be able to custom set the minimum pulse width for each encoder (or both the same should be fine). The problem is that the digital filter using DAQmx channel property for each line seems to work fine (I haven't proven that this actually works) but one has to choose from preset values (the smallest being 2.55ms).  I want to reject anything that is less the 10ms.  This document mentions that you can set up a programmable filter based on an external filter clock.  How do you actually do this?  Is there no way to use one of the internal timebases for this?  If so how?  The "Digital Filtering Conciderations for TIO-Based Devices" entry in the NI-DAQmx help states that you can choose one of four different values for a debouncing filter on a PFI line (different values than the previously linked document) and a custom filter value.
    OK here is the short question .... is there a way for me to digitally filter the lines coming into my counters to reject anything less then 10ms through software only?  If so, how?  If using an external timebase is required, how do I do this?
    Thanks in advance for any help
    Greycat 

    Hi Greycat,
    Although the documentation does mention that you can have one programmable filter setting, this is only true for TIO-Based devices. Unfortunately, the NI-6220 is a M-Series, which means that the only allowable minimum pulse widths settings are 125 ns, 6.425 µs and 2.55 ms. More information on this can be found in your NI-DAQmx help under NI-DAQmx Device Considerations » Digital Filtering » C and M Series.
    I believe for your application requirement, we would have to look into some oour Counter/Timer devices.
    S_Hong
    National Instruments
    Applications Engineer

  • Samples Not Acquired on NI 660x or NI 6624 Devices When using pulse width, semi-period or two-edge separation buffered measurements with the NI 660x and NI 6624 on counters 0 and 1, some samples may not be acquired under certain circumstances.

    In the DAQmx 9.4 Readme the following is stated:
    Samples Not Acquired on NI 660x or NI 6624 Devices When using pulse width, semi-period or two-edge separation buffered measurements with the NI 660x and NI 6624 on counters 0 and 1, some samples may not be acquired under certain circumstances.
    Could anyone elaborate on this? I am particularly interested in knowing under what circumstances this problem arises for the 6602 PCI devices.
    How should I understand 'NI 660x and NI 6624 on counters 0 and 1'. Is it only a problem on counter 0 and 1 for the 660x or does this only apply for the 6624 devices.
    /mola 

    Are there any NI Product Support Engineers out there who has an answer to this question and who are willing to share it with me?

  • How to synchronize two PCI-6602 via RTSI for semi-period counting of four signals?

    Hello,
    I try to measure 4 PWM signals. For that, I created 4 tasks (newest DAQmx), each with semi-period measuring one signal.
    I want to use DMA so I have two 6602 for each two signals.
    The task aquire a finite number of samples.
    This works fine when starting the tasks subsequently.
    Now I want to start the tasks via a trigger on the RTSI bus.
    But I have no idea how to get this done.
    I use the MX drivers for the first time an find it very difficult to get through the help files.
    I looked at many examples but did not find a solution.
    Most of the time my experiments end with an error message saying that the property is not applicable to this task, or s.th.similar.
    Ans sometimes, when there seems to be a trigger defined, the task will not wait for the trigger and time out.
    Is the anybody who can help me out of this?
    Maybe a little sample program?
    I program in CVI.
    Many Thanks
    Michael.

    This topic is discussed here:
    http://forums.ni.com/ni/board/message?board.id=250&message.id=13383&requireLogin=False
    Hope this helps!

  • Simulating a Digital Filter using Z-Transform

    Good evening!
    I have some sampled data logged in text (.lvm) format which I would like to perform off-line digital filtering to.
    I have a Z-transform of the form ( 1 + a * z^-1 )/( 1 + b * z^-1 ) to describe the behaviour for the given sampling rate.
    I will use the "Read from Measurement File" to import to LabVIEW as dynamic data, I can then arrange that in an array if need be.  I am just unsure of how to implement the z-transform; are there any examples performing a similar function?
    I apologise for the "can you help me?" type post but I have struggled to find information on building this.
    Any help/references appreciated!
    Peter 
    Regards,
    Peter D

    I used the "NI LabVIEW Digital Filter Design Toolkit" and the difference equation method to create my filter.  But I am getting some odd results when I apply my input data to the filter.
    I have made some notes on the VI to what I am trying to do.
    Basically trying to reduce the response time of a first-order system using filtering; the filter will cancel out the previous time constant and replace it with a new one.  I have pasted the bode plot of the system into my VI as there is no Flash on my computer to upload on here.
    I am still trying to get my head around what is happening - the noise content of my real input signal could be having an adverse effect.
    [ edit : attaching the VI ] 
    Peter
    Message Edited by PjayD on 04-14-2010 09:38 AM
    Regards,
    Peter D
    Attachments:
    Convert_LVM_Array.vi ‏223 KB

  • CI Semi Period, Error -200141

    I try to measure the semi-period of the signal in attach with a CI semi period counter in Labview 7.0.
    I am using the example VI Meas Buffered Semi-period Continuous with a acquisition card PCI-MIO-16E-4.
    I can measure the semi-period of a signal of 50KHz with a duty cycle of 25% but when I try to measure the signal in attach, signal that the frequency is lower, I obtain this message.
    Error -200141 occurred at DAQmx Read (Counter 1D DBL 1Chan NSamp).vi
    Possible reason(s):
    Data was overwritten before it could be read by the system.
    If using interrupt data transfer, try using DMA. Otherwise, divide input signal before measuring.
    What can I do ??
    Marc Ducommun
    University of applied sciences
    Switzerland
    Attachments:
    Signal_Capteur_modified.bmp ‏38 KB

    Marc
    Do you get this error when measuring the lower frequency signal? Or do you only get this error when switching from one signal to another?
    How are you switching from one signal to another?
    Switching from one signal to another usually causes high frequency noise which can cause this problem.
    For example, if your program is running fine with a 50kHz signal, and then you flip a switch to measure a lower frequency signal, the switch could introduce high frequency which could overflow the counter.
    Russell G.
    Applications Engineering
    National Instruments

  • Multi counter PCI 6602 daqmx semi period measuremen​t

    Hi All, Currently I am working on 20 PWM input channels. I have some problem on my labview code. Would some one give some advice on my vi? I crated labview code for 2 channels for now. I am doing semi period measurement. I want to measure the frequency and duty cycle of the PWM signals. But when I run it, it has error. Please give some advice where I did wrong on my vi. thanks Johnny
    Solved!
    Go to Solution.
    Attachments:
    Multi PWM Reading.vi ‏118 KB
    erorr message.doc ‏91 KB

    Hi marconi,
    This error that you are getting is a buffer overflow error and is likely due to the value that you used as an input to "number of samples" on the DAQmx Read VI. You had it set to 4 but depending on how fast the PWM that you are reading is, you may be acquiring values to the onboard buffer much faster than you are retrieving them with the DAQmx Read VI. Then when you call the DAQmx Read VI, which reads relative to a read pointer the data that you are expecting to read from the buffer has already been overwritten. One way to get around this is to increase the number of samples to read each time you call the DAQmx Read VI. I tried out your VI and got it to work with a slight modification to the start trigger (using PFI0 instead of the 20MHz timebase) and added a loop condition to stop from getting a buffer underflow error as well. Take a look and see if this helps out. Also, why are you triggering off the 20MHz timebase? is there a particular reason? This is essentially like using no start trigger since you should get the first rising edge of that almost immediately after the DAQmx Start VI is called. I am just curious, since using this start trigger did not actually work for me (though I didn't look into why). 
    Chris W
    Attachments:
    Multi PWM Reading.vi ‏51 KB

  • Digital Filter Design Toolkit for LabVIEW 8.0

     I need Digital Filter Design Toolkit for LabVIEW 8.0 and I cannot find it on the site.Where can I get it from?

    Contact your local NI representative. He might just sent you one.

  • Install Digital filter design toolkit on labview 8

    I get an error that says:
    You must install labview FDS or PDS 7.1 (or later) before
    running Digital Filter Design Toolkit 7.5 Setup.
    I have only Labview 8.0 installed.

    Hi storeytime,
    Are you running LabVIEW in evaluation mode or as Base Version, than this could be the reason why it doesn't work.
    You have to activate LabVIEW as Full Development System (FDS) or Proffessional Development System (PDS) to install the DFD Toolkit.
    If you have allready activated LabVIEW as FDS or PDS you need to start it once to get the registry updatet, then the installation of the Toolkit should be possible.
    Regards, Christian

  • 2 channels on semi period measurements M series 6221

    Can I perform measurements of semi period on 2 seperate channels with my M series 6221?

    Hello rawpaw,
    The NI-6221 has two general-purpose counter/timers, which means that you should be able to perform a semi-period measurement with each one (for a total of two semi-period measurements).
    For more information on performing these measurements, please refer to the "Counters" chapter of the M Series User Manual. Hope this helps,
    Daniel S.
    National Instruments

  • How to interpret the Coefficient Report from the FXP Digital Filter Design

    Hi,  I tried to design a low pass IIR filter in cascaded form II. I then pass the filter into the filter structure conversion VI and then pass the filter into the FXP conversion and get the Coefficient Report.
    However, I got problem understanding the report. The index of the coefficient does not correspond to the description of the Filter structures in the Labview help:
    In the labview help where they describe the filter structures, the coefficients have two indices, one for the stage, and the other for intra stage.
    In contrast, the report only gives out coefficients with one indicices.
    My question is: how to map the coefficients to the structure.
    Attached is the digital filter structures appeared in the Labview help.
    The following is the report:
                Reference Value               Quantized Value              Note
    Forward Coefficients:
    b[0]       +1.0105197822678145E-6       +1.0104849934577942E-6      
    b[1]       +2.0210395645356291E-6       +2.0210864022374153E-6      
    b[2]       +1.0105197822678145E-6       +1.0104849934577942E-6      
    b[3]       +1.0105197822678145E-6       +1.0104849934577942E-6      
    b[4]       +2.0210395645356291E-6       +2.0210864022374153E-6      
    b[5]       +1.0105197822678145E-6       +1.0104849934577942E-6      
    number of Overflows:    0
    number of Underflows:   0
    number of Zeros:        0
    Reverse Coefficients:
    a[0]       -1.9962855130669792E+0       -1.9962768554687500E+0      
    a[1]       +9.9628955294911659E-1       +9.9627685546875000E-1      
    a[2]       -1.9984573661467793E+0       -1.9984741210937500E+0      
    a[3]       +9.9846141042409486E-1       +9.9847412109375000E-1      
    number of Overflows:    0
    number of Underflows:   0
    number of Zeros:        0
    gain       +1.0000000000000000E+0       +1.0000000000000000E+0       Floating-point
    * Gain processing is on the host
    Attachments:
    IIRcascaded.GIF ‏7 KB

    Hi David,
    The following Developer Zone article discusses important concepts involved in utilizing the digital filter design toolsets. It specifically address the form in which the design coefficients are expressed.
    I hope this helps.
    Cheers,
    Emilie Kopp | National Instruments

  • Digital filter design toolkit

    Me and my teacher would like to use the Labview Digital filter design toolkit. He has lot's of different CDs from Labview in his Lab. He said maybe find out if it's maybe on one of the Labview CDs we already have here The question is : Is the Labview digital filter design toolkit only on one CD, or can we find it somewhere on an other Labview CD ?

    Hello,
    The DFDT is sold sperately but it could also be bundled in a Developer's Suite. Most of the time its a seperate CD. So should check to see if you have a CD for DFDT or perhaps a LabVIEW Toolkits CD.
    Regards,
    Chetan K
    AE-NIC

  • Designing digital filter for analog output

    Hi all,
    Iam working on pci-6723 NIDAQMX 7.3 LABVIEW 7.1 ENVIRONMENT.I have designed 16 channel data acquisition system.in order to supress glitches in the analog output signal ,which filter i have to adopt to the analog output generation. since i dont want to design hardware low pass filter , if i adopted digital filter will it improve the output signal performance ,kindly suggest me.with some example.
    Regards
    labview boy

    Hello,
    If you are talking about a software digital filter with the program that is producing the analog output, that will have no affect on an analog output signal. The glitching comes from the digital to analog converter (DAC). Check out this knowledge base article:
    http://digital.ni.com/public.nsf/allkb/3BB2D5D837F6C9FE86256EAC007C123B
    Really, your only solution is hardware.
    If you are acquiring this signal on another data acquisition system and you want to remove the glitches from what you are seeing, you could use software filtering there.
    -Alan A.

Maybe you are looking for

  • _clientsetup_$ - Looping install of wse2012 r2 clint connector on windows 8.1 pro with media

    This was first posted on the win 8.1 forums. Have a laptop computer I was trying to connet to a wse 2012 r2 evaluation trial. Having set up the server, I loaded the connection software on to the laptop,  HP G6. This machine has been connected to a wi

  • How to reduce the Logout time in IDM

    Hi Everyone, Help me in Solving the issue. When i click on the logout button of the end user interface in sun idm, it is taking 20 secs to come back to the login page (login.jsp) which is causing very much delay in the process. I want to reduce this

  • Import settings

    I recently bought iPods for my sons (shuffles) and for myself (nano). We already have sony PSP and I have alot of their cd's on the computer in mp3 format. as i import new cd's onto itunes, its saving them as MPEG (m4a) files. will mpeg files play on

  • Contracts - VA41

    Hello friends, I have the following assignment in OVKK. S.Area Doc Pricing Pro.Customer Pricing Procedure + Pricing Procedure - Condition typ 101010A1PR10PR00 - for normal Orders with out any contracts 101010V1PR11PR01 - For contracts only. I have pr

  • Body missing in recievr Communication channel payload

    hi all. i have done a  file to file scenario and when i tested it its working fine the message is showing in greencolour in sxmb_moni but when i look at reciever channel message(payload) its showing only header and trailer but no body (i can see the