Analog period measurament with ext. clock.

Can I measure a period of an analog signal (6052E w/ SC2345 accesory) with an external timebase (6602 w/ BNC2121).  The devices are RITSI'ed together.  I am trying to do this in DAQ mx.

The terminology between Traditional DAQ and DAQmx is quite a bit different as far as counters go.  In DAQmx, the gate and source pins on the counter are no longer featured in the API.  Instead, you either specify the source of the input signal, trigger, timebase, or clock that you want to use for your application, and the driver will automatically route the source to either the internal source or gate pin on the counter as appropriate.  To see how the source and gate pins are used for different applications, look at the NI-DAQmx Help->Key NI-DAQmx Concepts->Counters->Counter Parts chapter.  For example, if you want to use an external timebase for your counter, you will need to set the Counter Timebase Source attribute (Counter Input:General Properties:Counter Timebaseource) under the DAQmx Channel Property Node.

Similar Messages

  • Analog period Measurement

    Hello,
    I need to measure the frequency of the sinuoidal signal that is acquired using LabVIEW FPGA. I tried to use the block Analog Period Measurement.
    The value that i have used are: threshold level 0, hysteresis 0.5.
    However, no matter what the frequency, the period is always zero.
    I also tried different threshold and hysteresis values, but it was in vain.
    I would be grateful if you could be of any help.
    Regards, Keshav
    Solved!
    Go to Solution.

    Hi keshasvew,
    This function has a valid output signal that only becomes true once per period, so it's likely that you're actually getting a good result, but never seeing it. You will need to add a bit of code on the output that uses the output valid signal to latch the latest valid measurement result. You should also monitor the timeout output, as that will generally stay true if you're not getting any results at all.

  • NI 6602 buffered pulse width and buffered period measurement with 2 counters synchronized

    I modify the example buffered event counting with 8 counters for use with 2.I obtain error 10600 or 10455 and never the waited values.Can you give me a VI example . Thank you for your help

    What changes did you make to the VI? If you attached the altered example I could take a look at it. The example program for using 8 counters performs some configuration that you won't need for just two counters. For instance, if you just want to use counters 0 and 1, you won't need to perform pad synchronization.
    I've altered the program to use with two counters and attached it to this response. Hopefully this will work for you.
    Regards,
    Todd D.
    NI Applications Engineer
    Attachments:
    Buffered_Event_Counting_(2).vi ‏126 KB

  • NI 6602 buffered pulse width and buffered period measurement with 2 counters synchronized during a defined time "

    it is OK for 2 counters if I count a defined number but I would like the values during a time for example 10 s .It seems that the acquisition is not complete.Is a problem of circular buffer, time out error .....?

    Hi:
    I am assuming that you are using 2 counters to generate a finite pulse train for 10 seconds and are using this pulse train to gate the other counter. If this is your setup, you should not have a problem in retrieving the correct number of readings.
    You can monitor to the backlog and number read by wiring indicators to Read Buffer VI. Please also look at the Count Buffered Edges (DAQ-TIO).vi examples to learn how you can correctly set up a buffered counter acquisition.
    To open up the example, click on Help -> Find Examples -> Hardware Input & Output -> Traditional DAQ -> Counter -> NI-TIO.
    Regards,
    Bharat Sandhu
    Applications Engineer
    National Instruments
    Penny

  • How to use external timebase for Two Edge Separation measurement with PCIe 6351

    Hi
    I am working with PCIe 6351 x series DAQ card.
    counter measurements.
    Here i need to measure the time/no edges between two edges. Falling to Raising of two signals.
    I got the measurement with internal time base.
    here i need to synchronize the measurements with external clock from the external setup.
    so i need to use that external clock,timebase for the counters.
    Any solution please..
    Regards,
    Hari

    First, the VI you mention is NOT for STC timer/counters. Therefore, it won't work.
    If you want to get the time interval between two edges, you want to use the Functions -> Data Acquisition -> Counter -> Count Events or Time VI. This will do the function you are looking for.
    Mark

  • 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

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

  • Create values for analogous periods in the same table with DS

    Hi,
    in the course of a pilot we want to create additional columns with data for analogous periods.
    We have values for a month and need to create new columns for values for last month and last year in order to compare.
    Attached youu2019ll find a few sample rows resembling the basic concept of what we have
    Region     Country     Year     Month     Value
    Europe     Spain     2009     1     285
    Europe     Spain     2009     2     129
    Europe     Spain     2009     3     153
    Europe     Spain     2008     1     288
    Europe     Spain     2008     2     284
    Europe     Spain     2008     3     125
    Europe     France     2009     1     135
    Europe     France     2009     2     125
    Europe     France     2009     3     284
    Europe     France     2008     1     208
    Europe     France     2008     2     221
    Europe     France     2008     3     220
    In this case, new columns would be
    LastMonth (125 for Spain month 1 year 2009, since this is the value for month 3 year 2008)
    LastYear (288 for Spain month 1 year 2009, since this is the value for month 1 year 2008).
    Can you help on what function to use in the DS query transformation?
    thanks everybody, and enjoy!

    Hi David,
    Probably the easiest way of resolving this would be to add extra columns which show the projected date each row should be shown on e.g.
    Region     Country     Year     Month     Value     LM_Year     LM_Month     LY_Year     LY_Month
    Europe     France     2008     1     208     2008     2     2009     1
    Europe     France     2008     2     221     2008     3     2009     2
    Europe     France     2008     3     220     2008     4     2009     3
    Europe     France     2009     1     135     2009     2     2010     1
    Europe     France     2009     2     125     2009     3     2010     2
    Europe     France     2009     3     284     2009     4     2010     3
    This would be written to a staging table then used as a source with the original source file to produce the target table. I've illustrated an example of how this could be achieved below:
    Create two dataflows; DF 1 and 2.
    In DF 1 read source, add additional columns to show the date (year, month, etc) this should be projected as. This would need to be done for both the last month and last year. Load staging table.
    In DF 2 Read the source and outer join to the new staging table twice. Use the region, Country, Year, Month, to join and use the new additional projected date columns. Ensure the last month date fields are used on one staging table and last year date fields are used on the next staging table. The value from the two staging tables is then used in the last month and last year value.
    Load into target table.
    To calculate the projected date columns you would probably want to format the source fields into a date then add the required number of months. e.g. to_date('01' || month || year, 'DDMMYYYY') + 12
    Obviously this would need the stage table to be truncated before each load and you would need to assess your load strategy. When doing these calculated fields if you have any retrospective updates on the source then these would then need recalculating, therefore this assumes it's a complete reload each time.
    Edited by: Richard Saltern on Jul 16, 2010 2:01 PM
    Edited by: Richard Saltern on Jul 19, 2010 10:10 AM

  • Single Pulse Width with External Clock

    I am trying to setup a 6602 counter for a single (non-buffered) pulse width measurement with an external clock. Under normal testing, the unit under test will provide the pulses, I need to measure the number of pulses during different time periods (1, 60, and 300 seconds). I want to do a pulse width measurement and I'll supply the gate signal pulse to the counter for the specific time needed.
    Under normal operation, the unit under test is wired into the counter's source and the pulse is wired into the gate.  For testing purposes I am using a BNC-2121. I have the counter's source wired to the Adjustable Square Wave Output and the gate wired to the Trigger output.
    Here is my C++ code. I am getting a timeout error on the read and I don't know why. Any help would be appreciated.
       //Create Task
       DAQmxCreateTask( "task1", taskHandle );
       //Create Pulse Width Channel
       DAQmxCreateCIPulseWidthChan( taskHandle,              // TaskHandle
                                                      ​  szCtrName.c_str(),     // Counter Name
                                                      ​  "",                             // Channel Name
                                                      dMin,                          // Min Value
                                                      dMax,                         // Max Value
                                                      DAQmx_Val_Ticks,     // Units
                                                      DAQmx_Val_Rising,    // Gate Edge
                                                      "" );                            // Scale Name
       //Set the Pulse Width Terminal to the gate signal
       DAQmxSetCIPulseWidthTerm( taskHandle,          // TaskHandle
                                                     "",                       // Channel
                                                     "/CTR2/PFI38" );  // Terminal
       //Set the Timebase Src to the counter's source
       DAQmxSetCICtrTimebaseSrc( taskHandle,         // TaskHandle
                                                    "",                       // Channel
                                                    "/CTR2/PFI39" );   // Terminal
       //Start Task
       DAQmxStartTask( taskHandle );
      //***Send pulse to gate counter***
       //Read Counter
       DAQmxReadCounterU32( taskHandle,                      // Task Handle
                                              DAQmx_Val_Auto,           // Num Samps to Read
                                              10,                                  // Timeout
                                              ulBuffer,                           // Read Buffer
                                              1000,                               // Buffer Size
                                              &lSampsRead,                 // Num Samps Read
                                              NULL );                            // Reserved

    I've setup a pulse width task in NI-MAX using the onboard clock and everything worked fine, so I know the hardware is working.
    My unit under test is providing the pulses (from gyros) I need to measure. The pulses indicate the position of the unit so there are X, Y and Z axis gyros. I need to measure these pulses for specific periods of time (1, 60, and 300 seconds). For example during the 1 second measurement, the X and Y gyros should measure zero pulses and the Z axis should measure 515 gyros. During a 300 second measurement the X and Y gyros should measure < 60 and the Z axis should measure 30800.
    So the gyro pulses are wired to the counter input and I am using a DIO channel from NI-6508 to provide the gate pulse. The gate signal will be high for either 1, 60, or 300 seconds depending on the test. The gyro pulses are essentially the external clock to the counter. I want to count the gyro pulses during the pulse of the gate (DIO).
    To simplify the setup, I connected to BNC-2121 directly to the card. I have the adjustable clock output going to the counter input of ctr0 and the trigger signal going to the gate of ctr0. Once the task has been started and before the read ( I had a breakpoint set in the code), I would press the trigger button on the BNC-2121 and hold for approx. 1 second. I then execute the Read statement, and I always get a timeout. From my experience working with NI, I'm guessing I don't have a channel property set correctly, but its not obvious to me and I can't find an example to do exactly what I'm trying to do.
    The CTR2 designation in the code was the object name of the card. I have two 6602 cards in my chassis. I was using ctr0 of the second counter card, so PFI38/39 was correct.
    Again, any help would be appreciated.

  • Doing Data acq. and buffered period measurement using counters simultaneously, gives an buffer overflow error

    Iam doing Data acquisition using NI-PXI 4472 and buffered period Measurement using NI-PXI 6602 simultaneously,my program gives an buffer overflow error

    murali_vml,
    There are two common buffer overflow and overwrite errors.
    Overflow error -10845 occurs when the NI-DAQ driver cannot read data from the DAQ device's FIFO buffer fast enough to keep up with the acquired data as it flows to the buffer (i.e., the FIFO buffer overflows before all the original data can be read from it). This is usually due to limitations of your computer system, most commonly the result of slow processor speeds (< 200 MHz) in conjunction with PCMCIA DAQ boards, which have small FIFO buffers (e.g., the DAQCard-500). Sometimes using a DAQCard with a larger FIFO can solve the problem, but a better solution is to lower the acquisition rate or move to a faster system. Another cause of the -10845 error could be due to an interrupt-driven
    acquisition. For example, PCMCIA bus does not support Direct Memory Access (DMA). If the system is tied up processing another interrupt (like performing a screen refresh or responding to a mouse movement) when it is time to move data from the board, then that data may get overwritten.
    Overwrite error -10846 occurs when the data in the software buffer that you created for an analog input operation gets overwritten by new data before you can retrieve the existing data from the buffer. This problem can be solved by adjusting the parameters of your data acquisition, such as the lowering the scan rate, increasing the buffer size, and/or increasing the number of scans to read from the buffer on each buffer read. Additionally, performing less processing in the loop can help avoid the -10846 error.
    See the NI-DAQ Function Reference Manual for a listing of all NI-DAQ error codes.
    Have a great day.

  • How to use a multiple boards (6321/6323) analogical acquisition task with simultaneous analogical generation task using the same boards (Labwindows CVI10)

    Subject : it seems impossible to run a multiple boards analogical acquisition task with one or several analogical generation task using the same boards.
    NI Configuration : Dev1 = Dev2 = 6321 boards
    Development environnement : LabWindows CVI 10
    Source code for analogical acquisitino task :
           DAQmxCreateTask("",&AIRecordingtaskHandle);
           DAQmxCreateAIVoltageChan(AIRecordingtaskHandle,chan,"",DAQmx_Val_NRSE,min,max,DAQmx_Val_Volts,NULL);
           DAQmxCfgSampClkTiming (AIRecordingtaskHandle, "", rate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, sampsPerChan);
           DAQmxGetTaskAttribute(AIRecordingtaskHandle,DAQmx_Task_NumChans,&gNumChannels);
    Chan = "Dev1/ai0, Dev1/ai1, Dev1/ai2, Dev2/ai1"
    Source code for analogical generation taskS :
           DAQmxErrChk (DAQmxCreateTask("",&AOtaskHandle_C1_DAC0));
           DAQmxErrChk (DAQmxCreateAOVoltageChan (AOtaskHandle_C1_DAC0, chan, "", min, max,DAQmx_Val_Volts, ""));  // chan vaut Dev1/ao0
           DAQmxErrChk (DAQmxCreateTask("",&AOtaskHandle_C1_DAC1));
           DAQmxErrChk (DAQmxCreateAOVoltageChan (AOtaskHandle_C1_DAC1, chan, "", min, max,DAQmx_Val_Volts, "")); // chan vaut Dev1/ao1
           DAQmxErrChk (DAQmxCreateTask("",&AOtaskHandle_C2_DAC0));
           DAQmxErrChk (DAQmxCreateAOVoltageChan (AOtaskHandle_C2_DAC0, chan, "", min, max,DAQmx_Val_Volts, "")); // chan vaut Dev2/ao0
    At the first DAQmxReadBinary call attempt, the system shows an error (see attached document) 
    What we understand about that error : it is impossible to run the two set of tasks (ai and ao) using ressources from both Dev1 and Dev2 in the set of tasks because it is not allowed to use the same Reference Clock for that.
    The question is : is there a way to to that without having that kind of message?
    We tried different combinations :
    - Using only one ao task (on Dev1/Dac0) : same error
    - Not using any ao task (only the ai task) : no error
    - configuring the ai task with only channel from Dev1 : no error 
    - Using "/Dev1/ai/SampleClock" as internal clock for the ai task and "/Devk/ao/SampleClock" for each ao task (k standing for "1" or "2" depending of the ao task we consider) : error
    Thanks a lot.
    Pièces jointes :
    MsgErreur NIDAQmx.JPG ‏38 KB

    doublon
    Valentin
    Certified TestStand Architect
    Certified LabVIEW Developer
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Travaux Pratiques d'initiation à LabVIEW et à la mesure
    Du 2 au 23 octobre, partout en France

  • 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

  • Analog Source Triggering with more than one channel in channel list

    Hello,
    I am trying to use an analog reference trigger with a channel list that contains more than one entry using a
    M Series 6289. I am aware that this is generally not possible to have more than one channel in the list due to hardware limitations. I was hoping if some sort of workaround exists.
    I am using the NIDAQmx C API to control the card.
    Using a second card that is syncronized via RTSI should
    allow me to use an analog reference trigger to control multiple analog IO channels ... Right ???
    Thanks for any advice!
    Best regards
    Peter

    Hello Peter,
    If you look at the NI-DAQmx Help, Analog Triggering Considerations for E Series, M Series, and S Series Devices section, it says that to pause multiple channels with an Analog trigger, you must wire that signal to APFI0 or APFI1. Therefore, it is possible to perform this operation.
    If you are sharing the AI Sample Clock across RTSI, then you would be able to stop multiple AI channels across multiple devices with the one Analog Reference Trigger.
    I hope this helps,
    Sean C.

  • Error when starting an analog read task with DAQmx 8.5 while 8.0 works

    I am programing a measurement application with Borland C++ Builder 6.
    Problem: Every time when I try to start an analog input task with the DAQmxStartTask() command of DAQmx 8.5 the program execution is interrupted and the error message "Invalid floating point operation" is given out. This problem does not occur with DAQmx 8.0 !

    Hello Johannes,
    the error occurs every time, when I try to start an analog voltage input task either with a simulated or a real device (PXI-4472). Changing any of the measurement parameters did not have any effect. I also tried one of the C-source code examples, which came with the original NI-documentation of the DAQmx 8.5 driver, resulting also in the same error.
    However, starting a counter task with a simulated PXI-6601 device worked without any problems !
    Do you have any ideas ?
    Regards,
    Thomas

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

Maybe you are looking for

  • Why does my bass not work in Vista 64 with my xtreme music ca

    I know the drivers are basic, but the **bleep** bass will not work when playing music or games. Hell, 5. sound doesnt work with music (itunes). Where is the option to redirect bass like in XP? XtremeMusic - X-FI.

  • How do  connect tv to my router

    how do i connet my tv to my router

  • Web service testClient Problem

    Hello, I have test this tutorial http://www.ncsa.uiuc.edu/people/ramonw/ws_demo/axisdemo.html but at the point where I should test the web service with the Test-class I got the following error: C:\Programme\jboss-4.0.3\server\default\deploy\webapps\a

  • BADI to manage approver with SC workflow WS 14000109

    Hello, Is it possible to manage the approvers determined by the SC workflow WS 14000109 Approval n-step over Value Limit ? By default, this workflow get the approver defined in the attribute SLAPPROVER. But is there any possibility to determined anot

  • OSB good or bad?

    Hi Experts, Someone has recommend me not to use OSB given below reason, is that true ? 1) No unit testing tool. 2) quality is still a question as we cant do unit testing ? 3) The tools is very poort. They are difficult to work with, they crash often,