Function DAQmxRegisterEveryNSamplesEvent can be used for the counter input channels

Hi all

I have a request to count the number of digital pulses. I want to know the time of impulses coming which start from 1 and an increase in later, 4 as 1, 5, 9, 13... The time interval between each pulse is not a fixed value. So I tried to use DAQmxRegisterEveryNSamplesEvent and DAQmxCreateCICountEdgesChan functions. But afterI calls the DAQmxStartTask function, it has always failed.  The advice that I used is the NOR-PCIe-6320. Here's the part of my code.

DAQmxErrChk (DAQmxCreateTask("",&m_taskhandle));
DAQmxErrChk (DAQmxCreateCICountEdgesChan (m_taskhandle, "Dev1/ctr0", "", DAQmx_Val_Rising, 0, DAQmx_Val_CountUp "));
DAQmxErrChk (DAQmxRegisterEveryNSamplesEvent (m_taskhandle, DAQmx_Val_Acquired_Into_Buffer, 4, 0, EveryNSamplesCallback, this));
DAQmxErrChk (DAQmxStartTask (m_taskhandle));

I don't know the reason. Can someone give me help. Thank you.

Yang

DAQmxRegisterEveryNSamplesEvent only works with the buffered in memory tasks.  That's what you should do anyway (if you want to use the callback or not):

1. make your external signal the sample clock (DAQmxCfgSampClkTiming).

2. use one of the basics of internal time as the source (DAQmxSetCICountEdgesTerm).

Each sample you read will give the count in ticks of the time base.  Multiply the number by the base of your time period and you now have a timestamp.  Keep in mind the counter roll to 2 ^ 32 therefore account for this in your program.

The recall is not necessary, but it is useful that you can make sure that you block your main thread until the samples are available.

Best regards

Tags: NI Hardware

Similar Questions

  • I bought the plan for photography and still pay each month. but I can't use photoshop only after update. and they need to join a plan. How can I do? I can only use for the trial version even I never tell months.

    I bought the plan for photography 6 months ago and still pay every month.

    but I can't use photoshop only after update. and they need to join a plan.

    How can I do?

    I can only use for the same test version that I pay every month.

    Hi yejik42305752,

    Please see the following article: https://helpx.adobe.com/creative-suite/kb/trial--1-launch.html

    Kind regards

    Tanuj

  • no user key can be used for the instance of the component integration "Contact."

    I try to use the InsertOrUpdate method on the contacts. All I'm trying to add is a first contact name, first name, telephone number and the owner. Using InsertOrUpdate I get, no user key can be used for the instance of the component integration "Contact."

    I can use the Insert method with no problems. What Miss me? Why the InsertOrUpdate method will not insert it?

    Thank you.

    Hey... I also had the same problem into account.

    so I tried to give the ExternalSystemId. and it worked... It should work once you set the external id.

    Concerning
    Balaji Tr.

  • The same POPup can be used for the two buttons

    Hi all

    I'm looking for an application where I need to use the same popup for two different buttons. This popup has a form of the ADF. I want to use for the Insert on a table of the ADF operation. The requirement is something like below

    A JSF page should have an ADF read only table with 3 buttons Insert, read, delete respectively. Buttons Insert and should be using popup which the user can enter data and display the data respectively. I am

    way to a form of the ADF for the insert PopUp. Now the problem is when the user selects a row in the table and click on the View button it should open a popup with read only form displaying the data from the selected row. For this I use the

    same popup which I use for insertion of information by changing properties readonly or I have to create a separate popup for the purpose of seeing it please help me out in that.

    Thanks in advance.

    Published by: 959766 on November 6, 2012 10:11

    You can use the same popup...

    Timo

  • Machine of CS5 body can be used for the environment/school budget?

    Gentlemen.

    My first post, so bear with me if he's a bastard. My situation is common to students/teachers, occasional users and compared to tight budgets. I am looking for an installation "cheap" run CS5 body.

    I teach high school math at an alternative school. With the exception of the society , more folk mathematics to recall their favorite less than courses. Add to that my children's behavior problems and I don't have much work to do to keep their interest up. My approach has been to record videos of them doing their thing, which was a success I bought CS5 Production Premium. I would like to start frees up some vids of math really chic.

    I put four computers in my room this year to shoot and make screenshots. With regard to the typical educational needs, are the rockets:

    AMD Phenom II 955BE quad core CPU

    1 TB WD WD10EADS Caviar Green 7200 RPM drive

    4 GB OF RAM DDR2 PC1066

    GTS 250 graphics card

    Asus M4A785-M motherboard

    Win 7 64 bit Home Premium

    My camera photo and video, has received and not yet used, is the Canon T2i. I think this device shoots AVCHD, and if I'm wrong on this, the high compression rate will be a bit of a problem with the AMD processor, but perhaps not hard drives.

    HERE IS MY QUESTION - if I'm cannibalizing the two of them, I could make a camera with 8 GB of RAM and set up 2 or 3 disks RAID array, run the motherboard controller. This machine would be worth?

    I catch up with current tech info and know where all these coins rank. I've done my homework on these forums for over a week and have some information on the software, CUDA and MPE and the needs of high bitstream decoding and reading. I am aware that a 8 GB max RAM on motherboard will be a bottleneck and that these are not the fastest drives, nor the AMD processor in collusion with the i7-930.

    But, given that the GTS 250 turns CUDA accelerate the EMT, I 'm sitting on the parties which will take place on the technical level of the software. I already blew most of my paychecks for the year on this stuff would just as quickly see what can I do with what I have. The platform AMD/DDR2 is considerably cheaper than the road Intel 860/930.

    -Someone has an idea of what would make a configuration AMD 955 / 8 GB/GTS 250 with a modest RAID configuration? I mean, has anyone actually seen a machine of similar design are trying to manage both some AVCHD files? Starter upward or manage it within reasonable limits?

    I do not wish to be demanding in asking practical knowledge, but the lower cost of the AMD platform will mean a lot to students and teachers. If it works, not luxurious but from a functional point of view, maybe it's important information. Yes, we get a discount on the software, but even with that, we are looking at $ 1 200 to $ 1,500 for holding on AMD parts. If CS5 really requires an Intel platform, which will push the cost up to $ 300 to $ 400.

    We all face at the cost of the thing. I just think of what the configuration of the bottom line could be, and imagine that the first consideration is whether the AMD Phenom II/DDR2 can cut.

    Finally - I've never set up a RAID array and know little about it, other than the basic benefits of RAID. This would imply the formatting of the disk and reinstalling the OS? If so, I have to wait until the year is over.

    Thank you all for the comments.

    Adobe forums: Rules for a mounting platform storage. Some...

    The Green discs take their name from the shuttle down on the speed of rotation, which defines an absolute disaster for the edition.

    Have you considered your teach 'Synthetic programming' on HP-41 calculators. It's fun and they can be had cheaply on eBay. It will give them a distinct advantage in logical thinking, which is the basis for mathematics.

  • Both can be used for the trigger guard radios

    Hello

    I have 2 1242 Accesspoints.

    1 is the root bridge and the other the Nonrootbridge.

    My question is that I can use the two radios for the link?

    At the moment it works with a radio.

    It works with the two g od. a Standart but not both together.

    If I turn on the second radio I have no connection.

    better consider Dieter

    Example Configuration link bridges wireless point to point

    http://www.Cisco.com/en/us/customer/tech/tk722/tk809/technologies_configuration_example09186a008058f53e.shtml

  • How to COPY a BACKUP as the... CONTROLFILE can be used for the OPEN database

    I create a document such as a "How To" to move a position for a Junior DBA controlfile.

    But it seems that I'm the Junior because I am facing the following...

    Action plan:

    Move/rename a Controlfile

    Version of the database: 11.2.0.3

    Controlfiles moving of:

    / goldengate/ORCL/ORADATA /.

    TO:

    / GoldenGate/ORCL/controlfile

    Step 1: Set up environment variables

    $> export ORACLE_SID = ORCL1

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    $> echo $ORACLE_SID

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    ORCL1

    $> export ORACLE_BASE = / u01/app/oracle

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    $> echo $ORACLE_BASE

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    / u01/app/Oracle

    $> export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.3/dbhome_1

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    $ echo $ORACLE_HOME

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    /U01/app/Oracle/product/11.2.0.3/dbhome_1

    Step 2: Check control_files parameter

    $> echo "see THE PARAMETER control_files | sqlplus-s "virtue sysdba".

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    control_files string/goldengate/ORCL/ORADATA/control

    ol01. CTL, / goldengate/ORCL/ORA

    DATA/control02.ctl

    Step 3: Closing the open database

    $> echo 'SHUTDOWN IMMEDIATE'; | sqlplus-s "virtue sysdba".

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    The database is closed.

    The database is dismounted.

    ORACLE instance stops.

    Step 4: Editing of the database

    $> echo "STARTUP MOUNT"; | sqlplus-s "virtue sysdba".

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    ORACLE instance started.

    Total System Global Area 4275781632 bytes

    Bytes of size 2235208 fixed

    822084792 variable size bytes

    3439329280 of database buffers bytes

    Redo buffers 12132352 bytes

    Mounted database.

    Step 5: Creating a copy of the current controlfile

    $> echo "AS BACKUP COPY CURRENT CONTROLFILE FORMAT ' / goldengate/ORCL/CONTROLFILE/control01.copy.ctl'; ' | RMAN target / nocatalog

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Recovery Manager: release 11.2.0.3.0 - Production Fri Oct 22 17:03:27 2015

    Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

    connected to target database: ORCL (DBID = 1420762587, is not open)

    using the control file of the target instead of recovery catalog database

    RMAN >

    From 22 October 15 backup

    allocated channel: ORA_DISK_1

    channel ORA_DISK_1: SID = 58 type of device = DISK

    channel ORA_DISK_1: from data file copy

    copy the current control file

    tag name=/goldengate/ORCL/CONTROLFILE/control01.copy.ctl output file = RECID = 1 STAMP = 893783011 TAG20151022T170329

    channel ORA_DISK_1: datafile copy complete, duration: 00:00:03

    Backup finished at 22 October 15

    RMAN >

    Complete recovery manager.

    Step 6: Change of parameter control_files

    $> echo "ALTER SYSTEM SET control_files='/goldengate/ORCL/CONTROLFILE/control01.copy.ctl' SCOPE = SPFILE;" | sqlplus-s "virtue sysdba".

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Modified system.

    Step 7: Closing of the mounted database

    $> echo 'SHUTDOWN IMMEDIATE'; | sqlplus-s "virtue sysdba".

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    ORA-01109: database is not open

    The database is dismounted.

    ORACLE instance stops.

    Step 8: Installation of the database

    $> echo "STARTUP MOUNT"; | sqlplus-s "virtue sysdba".

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    ORACLE instance started.

    Total System Global Area 4275781632 bytes

    Bytes of size 2235208 fixed

    822084792 variable size bytes

    3439329280 of database buffers bytes

    Redo buffers 12132352 bytes

    Mounted database.

    Step 9: Check control_files parameter

    $> echo "see THE PARAMETER control_files | sqlplus-s "virtue sysdba".

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    control_files string/goldengate/ORCL/CONTROLFILE/c

    ontrol01. Copy.CTL

    Step 10: Open the mounted database

    $> echo "ALTER DATABASE OPEN"; | sqlplus-s "virtue sysdba".

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    ALTER DATABASE OPEN

    *

    ERROR on line 1:

    ORA-01589: must use RESETLOGS or NORESETLOGS option of database open

    $> echo "ALTER DATABASE OPEN NORESETLOGS"; | sqlplus-s "virtue sysdba".

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    ALTER DATABASE OPEN NORESETLOGS

    *

    ERROR on line 1:

    ORA-01610: recovery using BACKUP CONTROLFILE option must be

    Then...

    $> sqlplus/nolog

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    SQL * more: Production release 11.2.0.3.0 the game Oct 22 17:14:43 2015

    Copyright (c) 1982, 2011, Oracle.  All rights reserved.

    SQL > CONNECT sysdba virtue

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Connected.

    SQL > RECOVER DATABASE with the HELP of BACKUP CONTROLFILE until CANCEL;

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    ORA-00279: change 621941 September at 22/10/2015 16:57:33 needed to screw 1

    ORA-00289: suggestion:

    /U01/app/Oracle/product/11.2.0.3/dbhome_1/DBS/arch1_11_892981851.dbf

    ORA-00280: change 621941 thread 1 is in sequence #11

    Specify the log: {< RET > = suggested |} Filename | AUTO | CANCEL}

    Cancel

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Cancelled media recovery.

    SQL > ALTER DATABASE OPEN;

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    ALTER DATABASE OPEN

    *

    ERROR on line 1:

    ORA-01589: must use RESETLOGS or NORESETLOGS option of database open

    Issues related to the:

    What am I misunderstanding? BACKUP COPY THAT isn't really a COPY.

    Why I can't use the 'copy' of the controlfile created by RMAN?

    Note:

    If I just copy the controlfile to the new location when the database shuts down everything works fine.

    Thanks in advance.

    Juan M


    Recovery Manager (RMAN)

    It is also mentioned in https://docs.oracle.com/cd/E11882_01/server.112/e25494/control.htm#ADMIN11288

    Create additional Copies, rename and move the control files

  • The multi-sco mode can be used for the packaging of Muse for LMS projects?

    We are currently experimenting with Muse, and we look at the posibility to use Muse to develop e-learning courses. Is it possible that Muse projects can be packaged in a zip file that can be loaded into an LMS? Perhaphs using multi-sco Captivate mode?

    Packer of Multi-SCORM of Captivate is purely for the Captivate content and it usually must be created by a specific version of Captivate to be compatible with a specific version of the package manager application.  So, the answer is very probably not.

  • variable binding can be used for the table in an explicit cursor

    I have an application that accesses a table on several different servers. I created a ref for the slider cursor variable and a varchar2 variable to define my query. variable I_server is a parameter to my procedure. Is it possible to rewrite the v_query using bind variable for the table/Server? I have included below v_query.

    v_query: = "SELECT rp.usr_id, rp.sun_sft_cat, rp.sun_start, rp.sun_hrs," |
    "rp.mon_sft_cat, rp.mon_start, rp.mon_hrs, |
    "rp.tue_sft_cat, rp.tue_start, rp.tue_hrs, |
    "rp.wed_sft_cat, rp.wed_start, rp.wed_hrs, |
    "rp.thu_sft_cat, rp.thu_start, rp.thu_hrs, |
    "rp.fri_sft_cat, rp.fri_start, rp.fri_hrs, |
    "rp.sat_sft_cat, rp.sat_start, rp.sat_hrs, |
    "rp.sun_sft, rp.mon_sft, rp.tue_sft, rp.wed_sft, |
    "rp.thu_sft, rp.fri_sft, rp.sat_sft, nvl (ei.wip_permanent_sched_seq, 0) ' |
    'FROM ' | I_server | "rp, wip_emp_information ei, |
    'wes, wip_emp_status_type West wip_emp_status' |
    "WHERE rp.usr_id = ei.employee_id' |"
    "AND wes.employee_id = ei.employee_id' |"
    "AND wes.status_type = west.status_type' |"
    "AND west.description =" STOREKEEPER "' |"
    "AND wes.effective_date = (SELECT MAX (wes2.effective_date)' |)"
    "OF wip_emp_status EMTE.2 |
    "WHERE wes2.status_type = wes.status_type' |"
    "AND wes2.employee_id = wes.employee_id' |"
    (' AND wes2.effective_date < = trunc (SYSDATE))' |
    "AND wes.status = rp.wk AND"Y"= 1'; -wk = 1 is the schedule for next week

    Rp_sched_cursor OPEN FOR v_query;

    If your intention is to do this:

    v_query := 'SELECT rp.usr_id, rp.sun_sft_cat, rp.sun_start, rp.sun_hrs,' ||
    ' rp.mon_sft_cat, rp.mon_start, rp.mon_hrs,' ||
    ' rp.tue_sft_cat, rp.tue_start, rp.tue_hrs,' ||
    ' rp.wed_sft_cat, rp.wed_start, rp.wed_hrs,' ||
    ' rp.thu_sft_cat, rp.thu_start, rp.thu_hrs,' ||
    ' rp.fri_sft_cat, rp.fri_start, rp.fri_hrs,' ||
    ' rp.sat_sft_cat, rp.sat_start, rp.sat_hrs,' ||
    ' rp.sun_sft, rp.mon_sft, rp.tue_sft, rp.wed_sft,' ||
    ' rp.thu_sft, rp.fri_sft, rp.sat_sft, nvl(ei.wip_permanent_sched_seq, 0)' ||
    ' FROM ' || :b0 || ' rp, wip_emp_information ei,' ||      --- Note the bindvariable...
    ' wip_emp_status wes, wip_emp_status_type west ' ||
    ' WHERE rp.usr_id = ei.employee_id' ||
    ' AND wes.employee_id = ei.employee_id' ||
    ' AND wes.status_type = west.status_type' ||
    ' AND west.description = ''WAREHOUSE EMPLOYEE''' ||
    ' AND wes.effective_date = (SELECT MAX(wes2.effective_date)' ||
    ' FROM wip_emp_status wes2' ||
    ' WHERE wes2.status_type = wes.status_type' ||
    ' AND wes2.employee_id = wes.employee_id' ||
    ' AND wes2.effective_date <= trunc(SYSDATE))' ||
    ' AND wes.status = ''Y'' AND rp.wk = 1'; -- wk = 1 is next week's schedule
    
    OPEN rp_sched_cursor FOR v_query USING i_server;
    

    So the answer is: no, you can do that.

    But then, my question would be: why would you do that?
    I guess that you have many "different servers. A cursor on the server will not hurt you.

  • What type of files (jpeg, tiff, CR2 etc.) can be used for the slideshow in lightroom?

    I want to create a slide show and copy them to a CD to play on a TV by BluRay.

    Can what type of files I use?

    Hi graceh,

    Any type of image that is in your library Module can be used in Slideshow (raw, Tiff, Jpeg...)

    For more information, see How to play and export of slideshow in Lightroom .

    Let us know if this helps

    Kind regards

    Assani

  • AE can be used for the redaction of the face in a video without going frame by frame?

    New HB in Texas requires schools to place cameras in the rooms that are designated as special programs. We are looking to see if the AE can be used to blur faces in a video after we have 'blocked' on the faces (i.e. all children except the kid in question).

    Yes. You can use motion tracking, including a tracker specialized face, to track the movement of the faces. Then, you can apply effects to a bit in the macaws of the faces.

    Start here learn After Effects:

    http://Adobe.LY/AE_basics

  • What function can I use for the mode of addition of the worlds effect composite two?

    How can I do this without browsing the costume?

    ADD mode means R = Ra + Rb, G = Ga + f, B = b + Bb, A = Aa + Ab

    Is there a simple way of composite worlds integrates what AE?

    Hi Tenshi,

    You can do like this:

    PF_CompositeMode compositeMode;

    compositeMode.xfer = PF_Xfer_ADD;

    compositeMode.rand_seed = 0;

    compositeMode.opacity = PF_MAX_CHAN8;

    compositeMode.rgb_only = FALSE;

    compositeMode.opacitySu = PF_MAX_CHAN16;

    ERR (suites. WorldTransformSuite1()-> transfer_rect (in_data-> effect_ref,

    -> quality in_data,

    PF_MF_Alpha_PREMUL,

    PF_Field_FRAME,

    & world2-> extent_hint,

    & world1,

    & compositeMode,

    NULL,

    0,

    0,

    world2));

    You can replace PF_Xfer_ADD with any mode of transfer you like (you can find them in AE_EffectCB.h).

    See you soon,.

    François

  • What function key should I use for the option about bootcamp

    Function key WWhat should I use to open option of bootcamp

    If you try to open the Bootcamp application, simply search for it featured in the top right corner.

    If you have already installed Windows and try to start Windows, turn off the computer and then turn it back on by holding the Option key. It should show unity of Bootcamp and the Macintosh HD.

  • Satellite L20-100 - what modules of RAM can I use for the upgrade?

    Hi all

    I have TOSHIBA Satellite L20-100 and I need to upgrade the ram memory up to 2 GB.
    I found these models on the internet but I don't know that it is compatible with my computer laptop or not.

    the following module on the eBay store:

    * 1 GB Kingston DDR2 667 Mhz 1 GB DDR laptop 2 NB RAM *.
    * Hynix 1 GB RAM DDR2 5300 s - computer notebook memory 667 MHz *.
    * ASint 1 GB DDR2-667 PC2-5300 PORTABLE 200 pin MEMORY *.

    Already now I have 512 DDR2 667 Mhz

    Or any knows from where can I update the correct RAM?

    Hello

    Theoretically, you can use all modules store because all the modules to meet specifications, DDR2-RAM, 1 GB, etc. for example.

    In your case, I'd take the Kingston RAM. I've never heard ASint RAM, but I have good experiences with RAM Kingston. I always use Kingston RAM to upgrade my notebooks and never had any problems.

    Last but not least, you can also buy RAM of an authorized service provider.

    Good bye

  • How many processors the TimesTen on Exalytics can be used for the operation of 1 request?

    Dear

    I am analyzing the deployment scenario (2 t, 40 processors) Exalytics cluster - two machines.

    After reading the discussions on this forum and a part of the documentation available for my Oracle Partner login information.

    A doubt is:

    When you run SQL against TimesTen.

    To search for and return the data - OBIEE server, the TimesTen will use as many processors in this operation?

    Thank you

    MMB

    TimesTen (11.2.2) currently does not support a parallel query, so a single query will use one processor, but it will still be very fast because of the nature in memory of TimesTen. And you can run 40 these applications simultaneously without overloading the machine.

    Support for a parallel query is in our roadmap for a future version.

    Chris

Maybe you are looking for