Pci-6224 counter measurement

We need to make simultaneous counter pulsewidth measurements with our PCI-6224 DAQmx card.  It has two counters and the function panel info/help indicates specifically that it can do simultaneous measurements by creating 2 different tasks (DAQmsCreatTask()) and then using two separate DAQmxStartTask() calls.  We then do 2 separate DAQmxReadCounterScalarF64() calls. 
  The problem is that DAQmxStartTask()doesn't initiate the measurement like the function panel documention indicates.  The measurement(s) aren't initiated until the DAQmxReadCounterScalarF64() is executed, which makes simultaneous measurements impossible (i.e. if the measurement isn't initiated until the Read, then the first Read will be executing while both simultaneous pulses are generated and the second read will be too late).  I've put breakpoints in and verified this repeatedly.
  How do I get the DAQmxStartTask() to initiate the counter measurement immediately?

Hi nap3n,
What Dustin said is true of buffered tasks, but it sounds like the original poster is using an on-demand counter task, which is where the device starts counting when you call DAQmx Read. I think your best bet might be to use buffered tasks by calling DAQmx Timing (Implicit) like in the Meas Pulse Width-Buffered-Cont example. It may also be helpful to synchronize their arm start triggers, though implicit timing will still cause them to drift apart depending on the input signals.
Brad
Brad Keryan
NI R&D

Similar Messages

  • How do I connect and detect a high frquency pulse (0-3500hz) with a variable pulse voltage (0v low,5-10v high), on a SC-2345 connected to a PCI-6224?

    How do I connect and detect a high frquency pulse (0-3500hz) with a variable pulse voltage (0v low,5-10v high),  on a SC-2345 connected to a PCI-6224?  Labview doesn't generate a waveform if I try to graph the signal, and my analog input doesn'y recognize that the signal is even pulsing, only that it has a voltage.  Some advice would be much appreciated.
    Thanks in advance,
    Garrett

    Hi Garrett,
    It sounds like you want to do Frequency Measurements of a signal that is somewhat digital.
    There are two ways you can really do this:
    Wire your signal to the counter input and use the Digital Frequency examples (Help > Find Examples > Browse > Hardware Input and Output > DAQmx > Counter Measurements > Digital Frequency)
    Continue taking analog measurements and use some sort of logic to determine where you are getting rising and falling edges.
    I would recommend doing method #1, but you must determine which one is the best for your system.
    If you want to connect to the counter pins then you will find the
    terminals located on the side of your SC-2345.  If you don't need
    to condition your signals then simply wire everything into the proper
    pins for your counter (below).
    Default NI-DAQmx Counter Terminals (Connector 0)
     Terminal 
     Counter Context (Default) 
     Motion Encoder Context 
     Signal Name 
    37
    CTR 0 SRC
    CTR 0 A
    PFI 8
    3
    CTR 0 GATE
    CTR 0 Z
    PFI 9
    45
    CTR 0 AUX
    CTR 0 B
    PFI 10
    2
    CTR 0 OUT
    PFI 12
    42
    CTR 1 SRC
    CTR 1 A
    PFI 3
    41
    CTR 1 GATE
    CTR 1 Z
    PFI 4
    46
    CTR 1 AUX
    CTR 1 B
    PFI 11
    40
    CTR 1 OUT
    PFI 13
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

  • Digital I/O of PCI 6224

    Actually I have a small doubt regarding PCI 6224.So far I have seen that the digital pins are only used for frequency measurement and PWM generation. But there are 48 digital pins which is more compared to analog pins. so can you suggest me some new applications using these digital pins

    First of all, the frequency measurements and PWM generation can only be done on the counter pins.  As far as the other static DIO, I've used them for relay control, UUT communication (read and write), microcontroller communication, read UUT output status, and more of the sorts.  DIO are extremely important for test sets.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Where we can use PCI 6224 in an electronic industry other than Testing?

    I have PCI 6224 card  and SCB 68 box with me. Upto now i have devoloped VIs for measuring volatges and currents and generating a test report. I want to further use them for some other applications. Can anyone suggest me some applications where can i use LabVIEW other than measurement and testing?

    This is a strange question.
    You can do pretty much anything you want to with LabVIEW.
    But a PCI 6224 is a DAQ card, a piece of hardware that is meant to measure electrical signals.  What else do you expect to use it for?  You could possible use it for a coaster, but that would be pretty lumpy.  An AOL CD makes a much better coaster.

  • Interface with I2C SDA and SCL with PCI 6224 digital ouputs in C/C++

    I am trying to use the pci 6224 in order to send SDA and SCL to an I2C. I have been able to control the Digital Output, but I have been unsuccessful with generating a clock source to satify the I2C. I am writing this code in C/C++. Any ideas or examples would surely be appreciated. I need a good starting point, but I have not been able to find any useful examples that have worked. I am using the SCB-68 and I am trying to use my digital multi-meter to verify my code. 
    I have looked at the examples provided, but is there a description of these functions that are being called using the NIDAQmx.h? 

    Hello VJohnson,
    The counter will give you control of the clock frequency and duty cycle.  However, this card also has correlated DIO, which means that you can clock your digital lines.  Because of this, you can write a specific pattern (101010) to the buffer and just have it continuously output.  However, you will have to write this in a way that you know what values you're writing based on the part of the clock you're at.  
    My I2C implemetation knowledge isn't the greatest, so I do not know how big each of your communication packets will be, but one implemetation would be to write your data in packets to regulate your SDA and SCL lines.  The WriteDigChan-ExtClk is the best option that shows how to write a digital channel with a clock.  You will just need to modify the DAQmxCfgSampClkTiming( function call.  The second input should be changed from "/Dev1/PFI0" to OnboardClock or NULL.  Hope this helps! 
    ColeR
    Field Engineer

  • Transmit/Receive Manchester signals using digital output of PCI 6224

    How can a manchester signal be transmitted and received using the DIO of the pci 6224 board?
    I want to create a NRZ manchester signal on a digital ouput channel and then have the ability to receive and interpret the same type of signal on a digital input channel.
    Any assistance would be greatly appreciated.
    Solved!
    Go to Solution.

    Hi VJohnson,
    You might find this discussion forum post useful.
    Looks like LabVIEW does not have Manchester coding/decoding built in, but it should be do able in your VI by replacing every element with the corresponding two elements, and using double the baud rate as your clock rate.
    Thanks
    Scott M.
    Applications Engineer
    National Instruments

  • Regular measures(measures with SUM function) are not working along Distinct count measures

    Hi All,
    I am creating a cube that got to have a distinct count measure and a sum measure. if i have created only sum measure then it is working fine. if i create both measures and process the cube only distinct count measure is populated. the sum measure is showing
    all blank values. i am using 2008 R2, and creating 2 different measure groups for both measures, after i include the distinct count measure the sum measure becoming null. can you please help me with this? i am breaking my head for last 2 days on this.. Thank
    You

    Ramesh, measures are affected by the context of the queries that contain them, for example and in some cases, you can get a different total count of something by two different queries, this is because the context of the first query is different than
    the second one ... keep this in mind.
    Now, I've noticed that you are "creating 2 different measure
    GROUPS for both measures", and i guess that you are trying to view those two measures _which are from different measure
    groups_ at the same time and in the same report.
    considering the info in the first point and as you are create the calculated measures in two different measure
    groups, I'm not sure but i guess that this is the problem, and i suggest you create those two calculated measures
    in the same measure group, then try to view them again and let's see.
    if the previous point didn't solve it, please post the expressions you are using to create the calculated measures, maybe this will help in finding the problem.  

  • Count Measure by Minimum values in Dimension only

    Hi, I am drawing a huge blank here -
    I have a Count measure on my fact table, and need to count the rows only if a code in the dimension table is the minimum code for the Fact
    For my fact, I need to count from the following dims:
    Dim A (count all from this dim - which would be a distinct?)
    Dim B (count only the minimum code from this dim)
    Any suggestions?
    Thanks

    Hi oroborus , you are basically trying to have two new measures in your Fact, based on some conditions.
    Ex: You have a measure Total_Orders in your Fact and based on some conditions you want two new measures say Total_US_Orders and Total_OnLine_Orders.
    Lets assume you have two dimensions Country_Dim and Store_Dim. which gives you location and Store of an order.
    In your business model, duplicate the Total_Orders measure and name it as Total_US_Orders. Check the Use existing logical columns as the source box and go into the Expression Builder.
    Here you define the formula for this new column. Which will be something like
    FILTER(Fact.Total_Orders USING Country.Country_Code='US').
    Similarly, create the Total_OnLine_Orders by duplicating the Total_Orders measure and write a formula something like
    FILTER(Fact.Total_ORDERS USING Store.Store_Type = 'Online')
    I hope this will give you a brief idea of how to create calculated columns in business layer.
    Good Luck
    Sai

  • PCI 6224 error code -88302 during self test

    Hello,
    I'm having a problem with self testing my PCI 6224 board in my computer. I am able to run 2 different boards successfully on 2 different computers, but this computer is seeming to give me troubles.
    When I open NI MAX to run self test, it gives me an error code -88302 and says issue with connection. I tried unplugging the DAQ to my circuit and running the self test again but got the same error.
    How can I further trouble shoot this problem to take my next steps to resolving this?
    Thanks,
    Brandon Deal
    Brandon Deal
    RDD Intern
    Solved!
    Go to Solution.

    Yeah, at this point it does sound like a software problem on this particular compute - most likely an issue with DAQmx. What version of DAQmx do you currently have installed? When you were trying the first troubleshooting steps I recommended, did you just repair DAQmx, or did you upgrade to the latest version of the driver? If you just repaired your existing installation, you can try upgrading to DAQmx 9.8 instead. You can download DAQmx 9.8 from the link below.
    NI-DAQmx 9.8
    http://www.ni.com/download/ni-daqmx-9.8/4297/en/
    You can also try resetting the MAX configuration data. While it is rare for it to happen, the MAX configuration database can become corrupted, which can cause sytem issue like you're seeing. Follow the steps in the document below to reset the configuration data.
    What is the Process for Resetting the MAX Database?
    http://digital.ni.com/public.nsf/allkb/2C7480E856987FFF862573AE005AB0D9
    At this point it's probably just a matter of pinpointing which piece of software is malfunctioning/corrupted and repairing/reinstalling it. You can continue trying to do that for this machine, or, if you do have another working machine available, you could switch to that computer - whichever is more convenient for you.
    Regards,
    Ryan K.

  • DMA transfer rate for PCI-6602 counter/timer

    I'm strongly interested in raising the DMA transfer rate between the PCI-6602 counter and computer. At the moment, I've got a Pen-4 2.4GHz operating under Win98. I have to move an 80 Megaword array at an ~5 MHz speed. So far, I've been able to reach just 2 MHz. Would it be possible? What is the battleneck here - the soft- or hardware?

    Hello,
    I think the bottleneck you are seeing here is a limitation of the dma transfer capabilities that is dependant on the bus of your PC and not your 6602 card. Here is a link of a knowledgebase that you could try to use to see if that would improve your transfer rates. I still doubt you will be able to achieve approximately 5MHz.
    http://ae.natinst.com/operations/ae/public.nsf/fca7838c4500dc10862567a100753500/1b64310fae9007c086256a1d006d9bbf?OpenDocument
    Regards,
    Steven B.

  • Windows 7 et PCI-6224

    Hi,
    I have a DAQ board (PCI-6224) under Win XP and use Matlab to read the data.
    I'd like to upgrade to Win 7 for the summer... is there anyone that use this board under Win 7 (with Matlab)?
    if yes, what version of DAQmx?
    thank,
    MEK

    Hi !
    It depends of your OS !
    We can find the list of all DAQmx versions to this link : http://search.ni.com/nisearch/app/main/p/bot/no/ap/tech/lang/fr/pg/1/sn/catnav:du,n12:en,n19:Windows...
    Benjamin

  • PCI-1200 counter function/connection

    Hi all,
    If there's anybody out there that is
    familar with the PCi-1200 please help me
    with this.
    Somebody please clearify this for me,
    1)
    The counter function :
    ICTR_Read(devicenumber,ctr,count)
    returns the counter (count) value to
    the caller whenever there is a pulse to the CLK input pin , is this true?
    2)
    What is the relation of the counter
    value with the clock frequency or the
    pulse input?
    3)
    If I leave the gate input not connected to anywhere, will it be consider
    always High?
    That's all I can think of right now, if
    you think there is anything else that I
    should know please tell me also.
    Thanks!
    Regards,
    MK. Tan

    "Tan" wrote:
    >>Hi,> >Does anybody know what daq fuction that performs >the task of sending
    a binary patern to the digital I/O port.> >Example: >If I what do sent 1
    to PA0 , 0 to PA1 and 0 to PA2 simultaneously,>Is there a function that do
    that?> >Thanks.
    Hi Tan,
    First, use "status = DIG_Prt_Config (deviceNumber, port, mode, dir)" to configure
    the ports.
    Use these arguments:
    devicenumber: as specified in the measurement and automation explorer
    port: 0 ( PA)
    mode: 0 (no handshaking)
    dir: 1 (standard output)
    Then, call "status = DIG_Out_Prt (deviceNumber, port, pattern)", with
    devicenumber: as specified in the measurement and automation explorer
    port: 0 ( PA)
    patt
    ern: 10000000 (binary)
    See NI-Daq help index -> 1200 Series Device Function List ->DIG_Prt_Config
    / DIG_Out_Prt
    for more info.
    In LabView:Tthe VI's will probably also be called something like"DIG_Prt_Config"
    and
    "DIG_OUT_Prt". Enter these same arguments into the VI.
    Hope it helps,
    Walter

  • PCIe-6321 frequency measurements

    I am trying to use a PCIe-6321 to perform a simple frequency measurement (800-2500hz).  Are there daqmx functions for frequency measurments?  I tried some of the CVI examples but they throw error messages.  Is there an example were I can measure frequency on one of the analog inputs?

    Your card have both analog inputs and counter inputs; they behave differently and for each of them there is a set of examples that explain the basic measurement types together with cabling.
    Search with the example finder (Help >> Find examples... menu item) with "counter/timer" keyword and you'll find the examples you are looking for. Also looking for "frequency" drives you to the same examples.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • 6020E Counter measurement slow

    Slow performance using the 6020E counters to measure pulsewidth.
    Using traditional DAQ (device not supported by DAQmx)
    Using hardware triggered measurement.
    After configuration, doing the following:
    - program
    - loop until no longer armed
    - read count and check for overflow
    This cycle takes 100ms to perform on a signal that pulses every 10ms (pulse between 1ms and 8ms)
    As I understand, after programming, the counter arms itself on a falling edge (hardware trigger) and measures the next pulse passing by. So this would mean worst case 20ms + communication overhead. Either this hardware triggering isn't working or the overhead is 80ms?
    Any help appreciated A LOT!
    Peter

    Thanks JV,
    Unfortunately, we want to read the pulswidth of the first pulse to come (hardware triggered), then do some things with it, do some other stuff in parallel and then read some more. So buffered reading isn't going to help much.
    We started from the 'Measure Pulse (DAQ-STC).vi' sample, changing it to do triggered measurements and tweaking timeout and errorhandling to our needs.
    It does seem that the 6020E has been a bad choice for the our task at hand (many single reads), as we've had performance issues in analog readings as well. Probably have to dump it all and go for some PCI solution.
    Peter

  • Pci-6602/ period measurement

    I use the pci-card to count the arrival time of photons in my detector (photonmultiplier PMT). Until now we use the progam I enclose within this mail. But that program is to slow because it asks frequently if there is a photon or not in the detector. My aim is to change that program so I could read during a period of 10sec the arrival time of photons in my detector and then put results in a screen and then read again the arrival time of photons. How could I change this program to do that?
    Thanks
    Attachments:
    Intensity.vi ‏271 KB

    Hi Anne,
    You might not need to worry about much of this. From what I understand, you would like to the number of inputs in a given period of time so you can graph the output. Let me know if I'm wrong, but you want to how many of your pulses fall into a small period of time and you want to be able to graph a continuous spectrum of these values. So for example, you can measure the number of pulses that occur every 1ms so that you can graph an output with a resolution of 1ms. Lets say you get 15 pulses in the first 1ms interval and then 27 in the next and so on... you can build a graph from these data points. Is this correct?
    What is the period of time you want to measure photons (1ms, 10ms etc.)? Because this should be the rate at which your first pulse train generates at. The second issue is that you want to read all this data every 10s. This means you would need a counter buffer larger enough to store roughly 20s worth of data. You would also need to change the "counts to read at a time" terminal to 10s/1ms = 10,000 counts (if your period of sampling the number of photons in a period is 1ms). That being said, the only 3 things you really need to change is your buffer size (instead of 1000 use 20s/1ms = 20000), your counts to read at a time (instead of 1 use 10000) and finally, add a wait until next ms multiple VI in your buffer read loop that will wait almost 10s. This is to prevent your system from locking on the Counter Read Buffer.vi.
    A more efficient way to do this is to wait 100ms in your buffer loop and use 2 Counter Read Buffer VIs. The first one will read 0 counts to read at a time. You will want to monitor the "scan backlog" terminal to see if it is greater than 10,000 (10s worth of data). If it is, then use the 2nd Counter Read Buffer.vi to read 10000 points. But if it is not greater, you will not want to read points from the buffer yet. You can use a case statement to accomplish this task (if true read 10000 points, if false don't do anything).
    Anyway, I hope that helps you out. Have a good day.
    Ron

Maybe you are looking for

  • Print options not working in CP7

    I am unable to make handouts, save to pdfs, all print options. I get the same error message as addressed in http://helpx.adobe.com/captivate/kb/cant-publish-ms-word-captivate.html Please help.

  • Lisence Question regarding our Flash Builder Lisence

    Our company uses Flash Builder with the following key: 1424-4000-.... We do not know how many lisences we have and how we could get flash builder version 4.7? Do we have to pay extra for that also when we bought a lisence in 2010`? KR Markus Stechele

  • Purpose of Partner Profit center

    Dear experts, Can anyone tell me the purpose of Partner profit center. Thanks,

  • Still getting error (-10011) after trying everything else

    I just bought a new G-Driver External Hard Drive and i have 16GB from on my Macbook Pro from crucial.com but i am still getting an "System Overload. The audio engine was not able to process all required data in time. (-10011)" I have checked the othe

  • Java says plug in missing

    When trying to open sonic wall virtual office it says java plug in missing