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

Similar Messages

  • Buffered semi period measurement: discard EVERY first value?

    Hello,
    I perform the buffered semi period measurement. The data aquisition last very long (maybe over one day...).
    I arm the counter and then I execute the "read buffer.vi" in an while loop to read the data continuously into a circular buffer.
    In the 6602-manual I read the first value ist always bogus.
    My question is:
    Will I have to discard always the first value when the while-loop restarts? Or will I have to discard only the first value after the first iteration of the while-loop.
    Regards Peter

    Peter,
    You will only need to discard the first value from the first iteration of the While Loop (Counter Read Buffer.vi). Unless you implement a start trigger, the counter could begin counting in the middle of a pulse. Since the counter does not stop and start counting during each iteration of the While Loop, only the very first value buffered is bogus (great choice of words).
    Good luck with your application.
    Spencer S.

  • 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 

  • 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

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

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

  • 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

  • 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

  • Log an analog channel and counter period channel to hard disk simultaneously

    We are in a rush, and need to log one analog channel and one counter period measurement to disk simultaneoulsy using card controlled timing and set # of samples. Should be easy, but can't figure it out. Labview 6.1 we have & DAQ 6013E we just bought.

    Greetings,
    With regards to logging analog input data to file, I would suggest that you examine the examples available in the following location:
    Examples >> Hardware Input and Output >> DAQ >> Analog Input >> Stream to Disk
    Because you are interested in a finite number of samples, you should look at Acq N Scans to File (wdt).vi.
    With regards to logging period measurement data to file, I would suggest that you examine the following example:
    Examples >> Hardware Input and Output >> DAQ >> Counters >> DAQ-STC >> Measure Buffered Period (DAQ-STC).vi
    This example does not log to file, but it does demonstrate how to program a buffered period measurement. You will need to add the logging functionality to this VI as demonstrated in Analog Input >> Stre
    am to Disk.
    Good luck with your application.
    Spencer S.

  • Period measurement timebase apparently lower

    I'm performing buffered low frequency period measurement using 1 counter, with an NI 6624. I am using the maximum timebase, which is 20MHz. The gate signal has a frequency of about 25kHz.
    The expected period "resolution" due to quantization should be 1/timebase, in this case 1/20MHz=5E-8s.
    The problem is that I am getting an effective "resolution" of 5E-7s, or an apparent timebase of 2MHz. What could be wrong?
    I've checked digital filtering (DAQmx Channel Properties) on the source and gate signals, and are both enabled with the timebase of 20MHz.
    Any comments apreciated.

    Hello Daniel,
    I agree that you should have a period measurement resolution of 50ns. This means that if you have a perfect 25kHz input signal, you should count 800 pulses of the 20MHz timebase within the 40us window. If you count 799 or 801 pulses, you will get 1/(39.95us) = 25.031289kHz or 1/(40.05us) = 24.968789kHz.
    However, the thing to keep in mind is that you must have very accurate 25kHz source in order to determine if this is the case. Using the calculations from above, you would need a signal source with an accuracy of at least +/-0.1249% at 25kHz.
    You may want to verify that your signal is at least this accurate before determining if something is wrong with your board or configuration.
    Regards,
    Bill B
    Applications Engineer
    National Instrume
    nts

  • Meas buffered semi-period continuous.vi with DAQPad-6020E

    Hi,
    Does anybody know if it's possible to use the meas buffered semi-period continuous.vi with the DAQPad-6020E?  Or, if it's not, what workarounds might be possible?
    LabVIEW responds with Error 200220 (Measurements:  Device identifier is invalid).  I know the hardware is definitely good because I can run other VI's with it.
    Thanks,
    Dave

    Dave,
    Are you able to make any kind of counter examples run on your device?  There are two counters on your board, are you using any of the counters for something else while running this example?  Do you also get the same error in Measurement and Automation Explorer (Start >> Programs >> National Instruments >> Measurement and Automation Explorer).  You can create a new task and select Acquire Signals >> Counter Input >> Semi Period.  Please let me know if you get the same error in this environment as well.
    Also, what is your operating system and what is the DAQmx driver version that you are using?
    Thank you and best regards,
    Raajit L
    National Instruments

  • Triggered finite acquisition and period measurement

    Hello,
    My problem is this: I'm not sure on how Labview accesses devices and how setting up multiple tasks affects loop iteration speed.
    The vi I have attached uses a rotary encoder to generate a pulse triggering the acquisition. I have noticed that trying to also perform a period measurement on this pulse causes the iteration time to double. For that reason I have included the case structure so the program reads once every 50 iterations.
    I am using the PCI 6250 (dev2) and PCI 6220 (dev1) which are connected by an RTSI cable. The 6220 and 6250 are connected to CB-68LP and TBX-68T terminal blocks respectively. The latter of which causes some problems due to incompatibility.
    Any help on either te reasons for the slower iteration time and how to solve it would be most appreciated.
    Thank you
    Ingram
    Solved!
    Go to Solution.
    Attachments:
    new.vi ‏64 KB

    Hi Ingram,
    Thank you for your forum post and for including your VI. On reviewing your code I am aware of the following:
     Acquiring 3 Analogue Voltages using a PCI-6220 (Temperature and Torque readings)
     Acquiring 1 Analogue Voltage on the PCI-6250 which represents "Percentage Metallic Content", this task starts when a Trigger is recieved on PFI9
     Acquiring 1 Counter Input on the PCI-6220 which represents the RPM of a motor
    You are also logging test data to a ASCII text file, this data is only logged when the user presses the stop button on the Front Panel.
    As the Counter and Analogue input tasks are seperate from one another it would be worth placing them in their own loops, I think with a bit of rearranging we should also be able to avoid the scenario where you have a while loop embedded inside another while loop. The initialisation of the DAQ tasks should only really be performed once, outside any loops. Another issue dependant on how long the application is executed is the dynamic arrays that are being created, these could become really large slowing down the application the longer it is run for.
    An architecture I would recommend for your application is "Producer/Consumer" outlined in the community example available here.
    The producer loop will be acquiring data and runs really fast (High Priority), the consumer loop logs data to file (Low Priority), data is shared between the loops using a Queue structure, no other wires should be shared between the 2 loops as these might cause a data dependancy.
    Do you require all 3 input tasks to be perfectly syncronized with one another?
    Many Thanks
    Jamie S.
    Applications Engineer
    National Instruments

  • Semi-additive measure using specified time dimension

    Hi,
    I am trying to make a semi-additive measure which will represent an Order Intake calculation.  Please see the data below:
    I plan on taking a copy of my Open Orders (Order Book) on the 1st of each month.  This gives me the ability to show that for example order A was entered in january, but at some point during the month it was increased by a value of 5.  So if I use
    Order_No and Value i see the following - which is good:
    ORDER NO
    Value
    A
    15
    B
    20
    C
    25
    D
    10
    Using snapshot_date as below, is good:
    Date
    Value
    2014-01-01
    30
    2014-02-01
    50
    However, using Brand i see the following:
    Brand
    Value
    X
    15
    Y
    35
    What I don't understand is why the value in X is wrong, but Y is right?  I am expecting the sum of the different orders within the brand, but the latest value by snapshot date.
    The "Value" is using the AggregateFunction "LastNonEmpty".
    I hope this example makes sense and look forward to some responses!
    Thanks

    Hi Dom,
    Does
    Yogisha's suggestion work on your scenario? If the issue persists, please post the detail information about your issue, so that we can make further analysis.
    Regards,
    Charlie Liao
    TechNet Community Support

  • -10920 error when executing buffered period measurements on a PCI 6602 timer.

    I frequently encounter the -10920 NI-DAQ error when I run the C code for single buffered data period measurement .
    The error message is "One or more data points may have been lost during buffered period measurements due to speed limitations of the system". I am unable to resolve this error. I have a Win2K environment and am using VC++ to compile and execute the code. Please help.

    When doing buffered period measurements, the rate at which you can transfer data from the counter is system dependant. To try to get around this there are two things you can try. The first is to set the 'number of counts to read at a time' to a greater number. This way, the 6602 board will use less calls across the PCI bus. If possible, try to limit the number of pulses coming in on the gate that you are using to latch the counts, though in many applications this is not possible.
    Make sure that you minimize the PCI bus activity on your computer. This includes, video activity and any network activity along with anything else that is connected to the PCI bus.
    Brian

  • DAQmx period measurement- buffer is cut when frequency is too high

    Hello,
    I'm using the DAQmx period measurement in order to measure a low frequency pulses. Even though the average frequency is low I still sometime get two pulses that arrive within a short time . When that happens I get  an error message and the buffer is cut. I'm wondering if there is any way to ignore one of the pulses (in the case that the pulse arrives at a time that is too short for the program to read) and for the measurement to keep running until the buffer is full??
    Thank you ,
    Shafran

    Hi all, thanks for your help.
    I'll give more details:
    1. I'm using PCI-6602
    2. The error code number I'm getting is:  200141       Possible reason(s):
                                                                                         Data was overwritten before it could be read by the system.
    3. I'm measuring photon emission from biological samples where each photon is converted to a pulse of a 35.2 ns width. I can control the concentration of the sample and therefore the average frequency of the pulses. I have started with an average intensity of 100 kHz and I went down to 10kHz. My final goal is to run the period measurement program in loops where I decide the buffer size so each loop will take approximately 10 seconds. The problem is that even if one out of all the buffers is cut all my calculations after that are wrong. A filter sounds like the perfect solution for my problem (I need to find out more about that option).
    4. I have checked the limitations of the program and I know that it can't measure pulses that arrive at a higher frequency than a few MHz, therefore I assume that even at an average frequency of 10kHz I still get some pulses that arrive within a frequency of a few MHz.
    Thanks again for all your help. I hope I didn't bore you with to many details...
    Shafran    

Maybe you are looking for

  • F110 Payment processing - Changing Banks

    Hello, I have a customer that wants to be able to process a payment run for a group of 250 vendors or so.  They want to be able to assign  1 million EUROS to Bank A,  250.000 Euros to Bank B, and 750.000 Euros to Bank C.    Last time they ran it, the

  • Synchronize SAP Roles with IDM Roles

    Hi, i have a question concerning SAP integration in IDM. Is it possible to import the Roles from SAP (named Activity groups) in IDM? And how does the "synchronize identity system roles with resource roles" function work? Thanks in advance! gojo

  • Reporting database creation without purging any data

    We want to create a reporting database where no 'Purge' operation can be performed & all the records will be retained .Production DB & reporting DB are at different geographic location.In this scenario; what tool should be used for replication ? Can

  • Which phones require which data plan?

    Hello!  I'm planning to upgrade my phone and am looking at possibly getting a phone that requires a data plan.  How do you tell which phones allow you to get the $10 data plan?  The only thing I've found says a data plan is required but it doesn't sa

  • Bursting from a dataTemplate

    Hi, I'm having trouble bursting from a dataTemplate. The problem I'm having is with how to pass the request id to my default package at the after report trigger. I have my dataTemplate set up and without the dataTrigger section it all works fine. Whe