How to count the edges within the great period of door?

Hello

I use a PXI-6624 counter/timer in Visual Studio C++ with Meassurment Studio.

I want to count the edges on a signal within a high period of an input signal.
I found the documentation entries "CTR n CBC", "CTR n GATE" and "CTR n to THE.

My idea is simply configure the counter 0 to count the edges on CBC by blocking via DOOR.
can be an example to my problem in the installation of nor, but above all I do not understand the description of landscaping.
to find a good example, you must know the name of the function you want to use.
can someone tell me the good examplename for my problem?
What call configuration should I use?

a little less important than my first problem is a similar.
I want to count the edges on a signal between a start trigger and a relaxing stop.
SRC-> signal
DOOR-> start signal
To THE-> the stop signal

I found a way to count the edges of the internal clock between start and stop (2 Seperation of edge), but not for an external signal.

can someone help me with this? especially with the first.

B

Hi John,.

Thank you for your help. It works very well.

I had a few problems with how the timebaseSource should be implemented.

Finally, I found the solution.

for those who do not want to search long for the code, it is here:

Create the task
CNiDAQmxTask ("CITask") m_task;

Create the meter inlet channel
m_task. CIChannels.CreatePulseWidthChannel ("PXI1Slot16/ctr0", "",)
atof (minimum), atof (maximum), startingEdge,
DAQmxCIPulseWidthUnitsTicks);

Retrieve the channel to change

CNiDAQmxCIChannel chan is m_task. CIChannels.GetAll ();

Fix the DOOR Signal
Chan. SetPulseWidthTerminal("/PXI1Slot16/PFI38");

The value of the Signal SOURCE counton
Chan. CounterTimebaseSource = ' / PXI1Slot16/PFI39 ";

CNiDAQmxCounterReader myCounterReader (m_task. Stream);
Double measuredWidth = myCounterReader.ReadSingleSampleDouble ();

Thank you and goodbye

B

Tags: NI Hardware

Similar Questions

  • How to count the page that is provided on page element

    How to count the page that is provided on page element

    Hi durgeshj41842015,

    the kDocBoss has an IPageList interface with GetPageCount() function.

    Markus

  • How to count the number of pages on the spread

    How to count the number of pages on the spread

    #include "ILayoutControlData.h".

    #include "ILayoutUIUtils.h".

    #include "ISpread.h".

    InterfacePtr layoutData (Utils()-> QueryFrontLayoutData());

    If (layoutData)

    {

    UIDRef spreadRef is layoutData-> GetSpreadRef();.

    InterfacePtr activeSpread (spreadRef, UseDefaultIID ());

    Int32 count is activeSpread-> GetNumPages();.   Number of pages of active propagation.

    }

  • How to count the number or lines in the file

    Hi Experts,

    I'm file as source and Oracle as target. My folder that contains some data that will load the target.
    My requirement is that I want to count the number of lines that contains my folder. Please help me how to count the total number of lines in the file.


    THX,
    Sara.

    Hi Sahaveda,

    Now, I tried and it works.

    Sorry my mistake again.

    I created HR. ETL_FILE_LOG as below:

    CREATE THE TABLE HR. ETL_FILE_LOG (numero_fichier varchar2 (10))

    Below the code will run without error:

    import java.lang as lang

    import java.sql SQL

    import of java.lang.String

    Import os

    disadvantages is sql. DriverManager.getConnection ("<%=snpRef.getInfo("DEST_JAVA_URL")%>", "<%=snpRef.getInfo("DEST_USER_NAME")%>", "<%=snpRef.getInfo("DEST_PASS")%>")

    dblinks = cons.createStatement)

    File1 = Open ('c:\EMP.txt','r')

    Count = 0

    Line = file1. ReadLine()

    all online! ='' :

    Count += 1

    Line = file1. ReadLine()

    File1. Close()

    sqlQuery = "insert into HR. "The values of ETL_FILE_LOG (numero_fichier) (" + str (count) + ' ") '.

    rqQuery = dblinks.execute (sqlQuery)

    jerks. Close()

    Concerning

  • How to count the number of hit on the page, click

    Hello..
    can someone tell me...
    How to count the number of hit on the page, click

    Thanks in anticipation...

    Somethig like that?
    http://www.baigzeeshan.com/2011/12/Oracle-ADF-storing-temporary-values-in.html

  • How to count the number of nodes under each parent in any given xml

    How to count the number of nodes under each parent in any given xml. for example the xml below was
    books has 3 childern, library [1] has 4, [2] library has 6 and bookshop [3] has 2. is it possible to get the number of tags in a childnode duplicate IE library [1]
    Book1 Tagus repeated twice... vice versa. do we need to make plsql lie we can achieve through sql

    < book >
    < library >
    ABC < book1 > < / book1 >
    BCA < book2 > < / book2 >
    ACR < book1 > < / book1 >
    Lac < Book4 > < / Book4 >
    < / book >
    < library >
    ABC < book1 > < / book1 >
    BCA < book2 > < / book2 >
    ACR < book3 > < / book3 >
    ACR < book3 > < / book3 >
    tray of < bookn_1 > < / bookn_1 >
    adjusted cost base < bookn > < / bookn >
    < / book >
    < library >
    ABC < book1 > < / book1 >
    BCA < book2 > < / book2 >
    < / book >
    < / books >


    I tried this... query.

    Select
    XMLQUERY ('count($doc/Books/Bookstore[1]/descendant::*)' in the way of xmltype ("< books >
    < library >
    ABC < book1 > < / book1 >
    ACR < book1 > < / book1 >
    Lac < Book4 > < / Book4 >
    < / book >
    < library >
    ABC < book1 > < / book1 >
    BCA < book2 > < / book2 >
    < / book >
    (< / books > ')
    as 'doc' of happy return) .getNumberVal () as node_count
    of the double

    Select
    XMLQUERY ('count($doc/Books/descendant::*)' in the way of xmltype ("< books >
    < library >
    ABC < book1 > < / book1 >
    ACR < book1 > < / book1 >
    Lac < Book4 > < / Book4 >
    < / book >
    < library >
    ABC < book1 > < / book1 >
    BCA < book2 > < / book2 >
    < / book >
    (< / books > ')
    as 'doc' of happy return) .getNumberVal () as node_count
    of the double

    How can I get the counts for each parent in a single query

    Published by: user7955917 on August 24, 2012 07:26

    Generic function how you want the query to be.

    If the structure is known in advance, as in your example a 'books' and then a 'library' root element, it's as simple as:

    SQL> select x1.parent_id, x2.child_name, count(*)
      2  from tmp_xml t
      3     , xmltable(
      4         '/books/bookstore'
      5         passing t.object_value
      6         columns parent_id   for ordinality
      7               , child_list  xmltype path '*'
      8       ) x1
      9     , xmltable(
     10         '/*'
     11         passing x1.child_list
     12         columns child_name varchar2(30) path 'name()'
     13       ) x2
     14  group by x1.parent_id, x2.child_name
     15  order by x1.parent_id, x2.child_name
     16  ;
    
     PARENT_ID CHILD_NAME                       COUNT(*)
    ---------- ------------------------------ ----------
             1 book1                                   2
             1 book2                                   1
             1 book4                                   1
             2 bookn                                   1
             2 bookn_1                                 1
             2 book1                                   1
             2 book2                                   1
             2 book3                                   2
             3 book1                                   1
             3 book2                                   1
    
    10 rows selected
     
    

    If you want a generic solution that works without knowledge of the structure, you will need a recursive approach, and most importantly, you should know which nodes in distinct, I suppose that the leafs?

    Also, please help if you can provide the link of reference on the function name() years what are the other expression, that I can use after the path

    You can start reading the documentation: http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb_xquery.htm#CBAGCBGJ

    The clause PATH expects a XQuery expression however before 11.2, we can put only simple XPath expressions.

  • How to count the number of elements in a data block

    Hi all
    How to count the number of elements in a particular data block oracle Forms 10g.
    If it's a text_item or the display_item or the list_item etc is there any method to do this.

    Please answer...

    get the first element with GET_BLCOK_PROPERTY(..., FIRST_ITEM);
    loop until GET_ITEM_PROPERTY(..., NEXTITEM) is null
    count on in the loop.

  • How to count the number of columns in an oracle table using sql

    How to count the number of columns in an oracle table using sql

    You must put the name of the table in capital letters

    As

    SELECT COUNT(1)
      FROM user_tab_columns
    WHERE table_name = 'EMP';
    
    or
    
    SELECT COUNT(1)
      FROM user_tab_columns
    WHERE table_name = UPPER('Emp');
    

    Concerning
    Arun

  • How to count the number of data records?

    Hey guys, how to count the number of records, I had on a data object variable?

    Im having a result of sql query in a variable like this:

    oDB.resolveNode("#command").query.select.value = "SELECT * FROM Customers WHERE CliNombre LIKE ' % ' + input1 +" %' ";

    oDB.open ();

    oDB.first ();

    So I need to count the number of records retrieved by this SQL query at the moment. Help please

    Then move the cursor back to the first record after you have your account.

    There is a keyword count in SQL that will allow you to get the account of your request. You can run that first - get your account, and then run the actual query to get the Recordset. This would require a separate data connection. Some examples of code.

    var xfa.event.newText = inName;
    If (inName == "") {}
    App.Alert ("you must enter a name--try again!")
    }
    var nIndex = 0;
    While (xfa.sourceSet.nodes.item (nIndex) .name! = "DataConnection2")
    {
    nIndex ++;
    }

    oDB = xfa.sourceSet.nodes.item (nIndex) .racing var (1); pertaining to the specified data connection node
    App.Alert (ODB.saveXML ("Pretty"));

    var nIndex = 0;
    While (xfa.sourceSet.nodes.item (nIndex) .name! = "DataConnection3")
    {
    nIndex ++;
    }
    var oDBCount = xfa.sourceSet.nodes.item (nIndex) .racing (1); pertaining to the specified data connection node
    Configure sql call DB to get the number of records that match the criteria

    oDBCount.nodes.item (1).query.setAttribute ("text", "commandType");
    oDBCount.nodes.item (1).query.select.nodes.item (0) .value = "Select count (*) from table1 where AcctNumber = '" + inName + "'";
    oDBCount.open)
    oDBCount.close)

    Configure sql call DB to get the specified employee number

    oDB.nodes.item (1).query.setAttribute ("text", "commandType");
    oDB.nodes.item (1).query.select.nodes.item (0) .value = "Select * from table1 where AcctNumber = '" + inName + "'";
    App.Alert (ODB. Nodes.Item (1) .saveXML ("Pretty"));

    now connect to the DB and get a recording
    oDB.open)
    oDB.close ();

    Note the SQL command use the keyword count (take a look at the oDBCount section). This will return a number of return to the cllaer. When I set up the data connection, a node count (*) that appeared there. I dragged to the form and it has created a field called count that the onus at this node. When the query is executed, the number of resulting records returns to this field. You can have hidden it so that your users can not see it and also to change the binding votes to zero, so it is not included in the data file that is submitted when the form is complete.

    Paul

  • How long is the grace period if I ran out of storage iCloud before my pictures/videos are deleted?

    How long is the grace period if I ran out of storage iCloud before my pictures/videos are deleted?

    Is there an article in support?

    iCloud does not delete your files even if you lack storage. She stops just to download new files to update your existing backups. You can delete files by yourself if necessary. Also here is the article where you can find more information how to manage your iCloud-storage space: manage your iCloud - Apple Support storage space

  • How to count the number of edges using counters SMU-6363

    Hello

    I'm counting the number of edges in a test signal in a duration of 50 Ms I use the SMU-6363 map and connect to the TRC test signals 0 SRC (PFI 8). Is that a correct connection? What else do I need hardware wise be a correct set for this application?

    Thank you

    Jeet

    Hi Jeet,

    This configuration is correct. Hardware wise, that's all you need to do.

    Kind regards

    Jorge Fernandez
    Technical sales engineer
    National Instruments
    ____________________________________________
    Certified LabVIEW Associate Developer (CLAD)

  • How to count the number of conditionally highlight cells in a column or row

    I'm working on a table to identify problems with my credit rating. So, I have a column that indicates the due date on the invoice and G that contains the date to which I made the payment.

    I'm trying to follow how many times I'm late with payments. I want to improve.

    So if the G column is later than column D, both with the Date formatting. So, now I've highlighted cells and I want to summarize for the year, how many times I was late payments.

    I thought a column G to count the number of days before or after that back I was with payments. But if the sum, it only gives me no useful information. I guess I could count the number of cells with values less than 0.

    I prefer to be able to put in the summary column for G something that said 0-12 years ago has highlighted cells in the column.

    Thank you

    You can not count based on sharing or formatting.  You can, however, be based on the same conditions.

    There are functions:

    COUNTIF() counties based on a condition is true

    and

    COUNTIFS() based on several conditions being true

    = NB. If

    Here is a way.  IT will take an additional column that calculates the "delay" in the days of a payment

    the first two lines are the lines of header

    H3 = IF (COUNTA (D3, G3) > 1, MAX ((G3−D3) DUR2DAYS, 0), "")

    It's shorthand dethrone select cell H3, and type (or copy and paste it here) the formula:

    = IF (COUNTA (D3, G3) > 1, MAX ((G3−D3) DUR2DAYS, 0), "")

    Now select cell H3, copy

    Select the H3 cells at the end of column H, dough

    H1 = "payments late =" & COUNTIF(H,">0")

  • How to count the time exactly?

    I tried to count the time using a VI like the one attached.

    It's that's not couting correctly. There is a possible reason, I have observed.

    The computer isn't able to handle the VI as soon as necessary.

    I thought about this because, when in edit mode the time count was very bad, and, when I created an application and installed, it ran okay, how 'light '. But today, when I tried to use this application with an old computer it did not work. The clock is slow.

    Is it possible to count the time correctly?

    I use a DAQ6009 to make my works, my VI is big enough and I need one iteration to each 1 ms (milliseconds) as I am with digital inputs from 5 events of coders (I know that's not the right way to count the encoders, but it's the only way I can do it, and it works).

    Thank you in advace! I hope you can help me!

    Hugs!

    Ok.  I will try to help you understand certain things.

    The number of cycles and wait (and wait until the next ms Multiple) functions all use a 1 kHz derived from the clock of the processor clock. The accuracy of these clocks is not large, although they are probably similar to the precision of the stopwatch.  Any time generated by these functions will show some differences in the time of the clock as it is derived from a different oscillator.

    Updates from the front panel are time by LabVIEW and the operating system. Most of the screens are updated with 60 to 80 times per second, maximum. What made the operating system, an update of the screen might be delayed by 10s of milliseconds or more.  It is certain that not all of the values at the end of the Add function will be displayed.

    Wait for him until the next ms many will wait more than 1 ms if the other code in the loop takes longer than 1 ms.  I don't know, but I think that the indicator is buffered so that any delay by the operating system to update the display should not slow down the loop. I tried to remove the flag, and it doesn't seem to make a big difference.

    I modified your VI to provide several indications of the performance. First of all, I added to the sequence of three-frame structure to allow synchronization of the loop. Second, I changed to a loop which runs a specified number of iterations. Thirdly, I hooked up the output of the timer until the next ms Multiple to a tunnel of autoindexing allowing a record of the time of each iteration appears in the table of ticks. I calculated the differences between successive instants and poster on a chart, so that you can see the performance.

    I didn't want to sound criticism of your use of English.  You write in English, much better than I could in your language!  What I was trying to make is that such general descriptions that ' Besides correctly ' without quantitative results or evidence in support of the application do not have enough information to help us help you.

    Lynn

  • How to count the peaks?

    Hi all

    I am a new user of LabVIEW and I'm going to ask you about a problem that certainly many of you will find quite annoying.

    I develop software for a test machine management that uses an another bend, a tachometer that generates a signal of rectangular analog output in volts, 0V to 8V. Like many I thi signal in a waveform graph.

    My goal is to be able to count the number of cycles of the machine and power count the tension peaks and subsequently be able to work on the machine with respect to the number of rounds to make. the ultimate goal is to be able to tell the machine how many rounds/cycles to do and the voltage applied to the load cell.

    Would you be able to give me some advice on this subject? Especially about count and store the number of revolutions.

    If necessary, I could send a screenshot of the program.

    I tried to use a crest of the threshold detector but I'm still inexperienced, it's why I ask for your help.

    can someone help me?

    Thanks in advance.

    Greetings

    LV

    Look at the detection of peaks VI and examples (help-> find examples).

    It should be fairly easy to understand and implement

  • How to count the pulses with digital input on 6351

    Hi all experts in Labview,.

    I just got my USB x series 6351 and it works fine, but I certainly lack of labview skills to use it to its full potential.

    I would like to read digital pulses with several digital inputs and count the number of pulses each T interval in time. All impulses that I entered on any edge of the clock are not synchronized and can occur at random times during the tests. Basically I have an oscillator of square waves can I modulate the frequency. I don't want to use the meter as inputs as I'm limited to only 2 entries (if I use the option 2 input meter for metering of pulses or frequency). The input frequency can range from 0-1 kHz and goes 0 - 3V. So not too fast, and I shouldn't make too many mistakes trying to get the count of pulses and then back out the frequency in accordance with article ni.com on counters.

    I would like to read the 8 digital input channels and get the number of impulses for each channel. I searched high and low for help online but can't find examples that have been useful. Anyone have any ideas on how to go or direct me to a resource? Thank you very much in advance!

    Are you worried about getting the number as a physical operation timed?  It would be nice to acquire a digital waveform and then postprocess on it to detect how many events took place?  I've attached an example that shows how you can accomplish this. It reads a digital waveform and then uses a detection of crete VI to determine how many pulses occurred. Should be a few adjustments to your particular signal.  The VI I use seems to count events twice (probably count each edge), so counting it gives should be reduced by half in order to work.

Maybe you are looking for

  • text of space reserved and box-sizing: border-box

    Hey guys,. I'm on a mac (10.9.3) under FireFox 30. I have the old * {box-sizing: border-box ;} thing put in place on my page.} In doing so, my input placeholder text appears, but not in Chrome and Safari. When I replace the box numbers on the input t

  • Sudden keyboard crash (NB550D)

    Hi guys I am confused and I hope someone can help. Our portable keyboard mini NB550D suddenly stopped working.We have not changed any settings or undertaken to update driver, no viruses not detected, no drops or spills. No function keys - including t

  • Where can I download or purchase the recovery disk?

    Hello My computer is running crazy. I lost my restore disk I got with my laptop. Anyone know where I can download one or buy one? Laptop model is Toshiba Equium A100 PAAS 100 series. Thank you

  • conversion of code c in labview

    I'm not familiar with the c codes. I just found out that an example-c means a c code example. Can someone help me to convert the C code in labview code?

  • HP Officejet 7500 a - Windows 7 64 bit

    Hello I had a problem with this for more than a week now, my hardware is (Intel Core i7 - 8 GB 133 MHz - 750 GB HARD drive - RAM card mother Gigabyte z77 - ud3 - VGA PCIe Nvidia GT 640 - XFX 750 Watts power), when you work with the daily use of the P