DAQmx - how does it multithread?

Howdy,
i am using DAQmx in VC++. my question is how does DAQmx run threads? In traditional DAQ, when you perform an acquisition, it runs as a separate parallel process(if i remember right). Is it the same with DAQmx? or does it run tasks as threads within the calling application's process itself?
thanks in advance,
vikram

Here is some information in the following white paper that I thought would be useful to you.
http://zone.ni.com/devzone/conceptd.nsf/webmain/5df09082448cbcf886256e7c0078ee9c
NI-DAQmx driver software is designed to help you significantly improve performance by exploiting the computer processor power and the memory structure of operating systems. NI-DAQmx driver software uses a multithread application structure to maximize computer processor power and implements memory-mapped registers to produce unprecedented concurrent and single-point I/O performance. As a result, you can experience up to 40 times better performance when you perform a concurrent I/O operation and 20 times faster execution speed when you perform a single-point I/O operation.
NI-DAQmx is an innovative driver software architecture that incorporates multithread technology. With multithreaded DAQ operations, you can perform an I/O operation independently in a separate thread. This guarantees faster execution speeds when you perform concurrent operations. Performing a concurrent operation, such as generating a continuous analog output waveform while acquiring a continuous analog input signal, in a single-threaded environment can be extremely challenging and can yield slow performance unless you employ complicated programming and timing techniques. Because NI-DAQmx driver software is multithreaded, it guarantees the simultaneous operation of analog input acquisition and analog output generation by assigning a separate thread to each operation. This eliminates the need to develop a complicated program to create an optimized concurrent operation. You can implement a multithreaded DAQ operation simply by using the NI-DAQmx Library.
Take an example of a synchronized AI/AO operation example program. You do not have to manually allocate separate threads for each analog input and analog output operation. The NI-DAQmx functions allocate the threads automatically. Therefore, with the NI-DAQmx Library, you can develop a multithreaded DAQ application without spending time implementing the details.
Thank you
Nandini Subramaniam
Applications Engineer
National Instruments

Similar Messages

  • How does Servlet Multithreads work?

    Currently I am trying to make a little server that works as a DatagramSocket server. Whenever it receives the packet, it spawns a thread and this thread will take care of this packet. However, this thread class implements Runnable, and it has class variable of Packet. So to run the thread, I do like:
    PacketRouter rp = new PacketRouter(packet);
    Thread t = new Thread(rp);
    r.start();
    However, in PacketRouter, Packet is a class variable, which could be inconsistent when reading or updating this class variable in another thread. The situation reminds my memory of a Servlet. A container creates a new thread of my servlet to serve particular Request.
    My question is, how does the container pass this Request object down to the servlet's "service" method when run() has no parameter? Thanks.

    Sorry but it seems you did not understand Threading that well - why do you start an own Thread for each packet? A servlet-server already creates a Thread for each request - so you can have even hundreds of requests running (practically) at the same time.
    Furthermore you are in a new Thread so you can't "pass" anything down, the only thing is to wait until this thread would be finished which is ... well plain damn stupid because then you would not need a Thread.
    Good luck, lg Clemens

  • How does the DAQmx read.vi work in producer/consumer mode

    Dear all,
    I have one question: how does the DAQmx read.vi work in producer/consumer mode ? 
    I mean if i set the acquisition samples quantity is 5000,(see the enclosed picture), how does the DAQmx read.vi acquire the samples ?
    5000 samples one time ?
    And how does the write. vi work ? Also 5000 samples one time ?
    Look forward to your reply.
    Thank you.
    Attachments:
    producer consumer mode.png ‏28 KB

    It will read 5000 samples per channel.
    The Write Measurement File just writes whatever you give it.  It you send it 5000 data points, it will write the 5000 data points.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Immutable Objects in multi threaded application - how does it works?

    Hi
    I have this code will work in multithreaded application.
    I know that immutable object is thread safe because its state cannot be changed. And if we have volatile reference, if is changed with e.g.
    MyImmutableObject state = MyImmutableObject.newInstance(oldState, newArgs); i.e. if a thread wants to update the state it must create new immutable object initializing it with the old state and some new state arguments) and this will be visible to all other threads.
    But the question is, if a thread2 starts long operation with the state, in the middle of which thread1 updates the state with new instance, what will happen? Thread2 will use reference to the old object state i.e. it will use inconsistent state? Or thread2 will see the change made by thread1 because the reference to state is volatile, and in this case thread1 can use in the first part of its long operation the old state and in the second part the new state, which is incorrect?
    Therad1:                                                  Thead2:
    State state = cache.get();     //t1                  
    Result result1 = DoSomethingWithState(state);     //t1    
                               State state = cache.get(); //t2
       ->longOperation1(state); //t1
                               Result result2 = DoSomethingWithState(state); //t2
                                   ->longOperation1(state); //t2
       ->longOperation2(state);//t1
    cache.update(result1);    //t1             
                                   ->longOperation2(state);//t2
                               cache.update(result2);//t2
    Result DoSomethingWithState(State state) {
       longOperation1(state);
       //Imaging Thread1 finish here and update state, when Thread2 is going to execute next method
       longOperation2(state);
    return result;
    class cache {
    private volatile State state = State.newInstance(null, null);
    cache.update(result) {
       this.state = State.newInstance(result.getState, result.getNewFactors);
    get(){
    return state;
    }

    Please don't cross post
    http://stackoverflow.com/questions/6803487/immutable-objects-in-multi-threaded-application-how-does-it-work

  • How does create a server with multiple Clients ?

    Any people can lead me .
    How does create a server with multiple Clients ?
    Thanks

    For a multithreaded server you will need a thread to listen and at least one thread per client. If the conversation is half duplex, one thread per client works very well, if it's full duplex you will find one thread to send and one to receive much easier to program.
    I posted a Simple Socket Server that uses 1+2*clients threads.

  • How does threading increase efficiency?

    Hello,
    how does multithreading increase a program efficiency? if there is a single processor, and all the threads have their task serially in the program counter,
    then does multithreading at all increases program efficiency , if there isn't any I/O operation block on any of the threads ?
    thanks.

    I suppose somebody has determined some optimal number of threads for different situations, but it really depends on, among other things, number of processors, amount of RAM, number of other processes on the machine, amount and nature of work done by each thread, profile of data fed to "input" threads (bursty or steady stream), limits imposed by the OS.
    AFAIK, there are no hard and fast rules telling you the number of threads to devote to a specific task. That's probably why app servers and such often have number of threads as a runtime config parameter, so you can tweak it to your system, load profile, etc.
    My advice (and this is just a gut call) would be that it's more important to get a proper breakdown of which tasks get their own threads (user input, listening for other input on a socket, "A" type of calculations, "B" calculations, etc.), and then allow the number of threads devoted to each task to be configured at runtime.
    That's the general case. As for your original question, and my first response. I was just putting that up as an example. I guess if you had all your input data available at program start time (as opposed to being fed in while the processing is going on) and all the work you had to do was just to crunch numbers or whatever on that data and you knew that you'd never be on a multi-processor machine, then, no, you probably wouldn't get any benefit from multithreading.
    However, those are big ifs, especially the last one. You can get multi-P machines for under $2000, probably even under $1000. Even if all the other conditions hold, if your process has any possibility of parallelization--e.g. for each of 10 different inputs you do the same processing, independent of the other 9 inputs--then you will get a performance boost from multithreaded code.

  • How  does systemn determin pricing procedure of billing type

    How does system determinate pricing procedure of F2???????????????????
    By doc.pric.proc? but in IMG, it is empty!!!
    and I don't think it is reference sales order's pricing procedure
    because if you use OR + TAN, the reference document of billing is delivery order!!!!!!

    Hi zhang
    In pricing procedure determination OVKK , whatever DuPP you maintain that is linked to Billing document
    In VOV8 we can see the CuPP  of the document . so if the DuPP is linked to CuPP in OVKK then the same pricing procedure will be flowing to billing document also  . Apart from that in VOV8 also make sure that , in billing data you are maintaining the billing  type
    Regards
    Srinath

  • In Pages 5 when I try to attach a pages document to an email it gives me 2 folders and 4 files ???  How does one email a pages document.

    How does one email a pages document? In pages 5 when I try to attach a pages document to a gmail email it gives me 2 folders and 4 other files to choose from. 

    Sounds like you are using Gmail.
    Pages 5 uses a zipped package of files as its format. 3rd party servers don't understand the format and show it as the component parts.
    Use Mail toenail the file or zip the .pages document before sending.
    Peter

  • How does Creative Cloud for teams work with staff who work in two locations ie in the office/home

    How does Creative Cloud from teams work with staff who work in two locations i.e. in the office and home?

    There is no difference please be aware that each login is provided with two activations however.  If you wish to have a computer at both work and home activated though that is perfectly fine as long as your employer is ok with using company software at home.

  • How does one change the font size for folders and/or file lists in the Bookmarks Library?

    How does one change the font size for folders and/or file lists in the '''Bookmarks''' Library?
    Since the upgrade to version 9.0.1 of Firefox, the Bookmarks feature changes are confusing me. They seem to be confusing themselves as well. The list of bookmarks has changed. The font size is so small that my aging eyes cannot read it without fogging the screen with my breath. Some folders are out of alphabetical order (where I know they were previously good), and some are missing altogether (folders to which I frequently add references).
    As for missing or deranged files or folders, was there something that I should have done or now need to do to recover those after the upgrade (or before)?
    With regard to font size,
    1. there is no “Edit Bookmarks” or like option to edit the list in this version
    2. the “zoom” option in the “view” list of functions is greyed out when in “Show All Bookmarks” window
    3. expanding the browser window has no effect on font size
    4. “Preferences” settings for font size has no effect in that window either, including advanced settings
    5. “Help” offers none that I can find.
    Can any of you Help?!?

    Maybe this extension helps:
    *Theme Font & Size Changer: https://addons.mozilla.org/firefox/addon/theme-font-size-changer/

  • Under search in maps, names come up that aren't in my contacts. How does this happen?

    Under search history in the Maps app,...along with all the other places I
    did search for, some addresses comes up that I'm not familiar with, and they stay
    there. In some cases I didn't search for them at all. Some I may have. A name also
    appears, under the address, like "from John Doe". It’s a name that
    I'm familiar with my email, but is not in my contacts. Why and how does
    this happen?
    For example, a person I receive emails from for work, came up as the
    "from", and the address, after I searched for it (not on my phone).....I found out
    it was the address of his company, I place I've never searched for, nor is
    there a hyper-link to it any emails/websites that I could have clicked on
    accidentally.
    In another example, the beginning of an address “5165” which I may have searched
    for and starting typing in came up in the history with several locations that
    start with those numbers. Most of them say “from current location”, but one says from
    a name, whom again I’m familiar with by email, but is not in my contacts and
    have no idea of why the name would be somehow connected to the address.

    Thank you for the reply. I really appreciate it. Do you know why the names are attached, as "from"?
    I attached a screen shot image. "Harry" and "Angela" are not contacts in my phone. Who would their names get there?

  • I need to change my e-mail address in the app store to enable me to get updates and buy more. How does this happen??

    I need to change my e-mail address in the app store, how does that work??

    On apple website, seraching on support, the article HT1918 explains.
    Log into your apple ID and edit your personal information, where email can be changed as well. All applications as itunes stores, apple store and icloud use this same apple ID, so be aware of this.
    I hope I was helpful !

  • Can i upgrade my laptop's graphic card? and how does this upgrading affect the other functions?

    is it possible to upgrade my HP Split 13-m111TU x2 PC's graphic card? how does one go about this upgrading process? does it affect the other functions and features of the laptop? 

    Hi:
    The graphics adapter in your model cannot be upgraded.

  • How does this work?

    This is not a complaint, but a confused sigh of admiration. I've got an email account at the university where I teach. When I got my iBook, it took me a while, and a few conversations with IT at the school, to get this account working in the Mail application. (Since I have a Verizon DSL at home, I had to include that SMTP as the outgoing server.) Anyway, I synched this mail account (along with my AOL and .Mac accounts) onto the iPhone, and it works perfectly, both incoming and outgoing. I didn't have to change any of the settings. I thought I was computer savvy, but I can't wrap my mind around this. It seems like magic. How does it work?

    The sync process with iTunes transfers the email account settings (for your chosen accounts via your iPhone sync preferences) from the Mail application on your Mac to the iPhone's email application.
    The iPhone is running OS X and the iPhone's email client can be considered a mobile version of the Mail application.

  • How does APEX check for null values in Text Fields on the forms?

    Hello all,
    How does APEX check for null values in Text Fields on the forms? This might sound trivial but I have a problem with a PL/SQL Validation that I have written.
    I have one select list (P108_CLUSTER_ID) and one Text field (P108_PRIVATE_IP). I made P108_CLUSTER_ID to return null value when nothing is selected and assumed P108_PRIVATE_IP to return null value too when nothign is entered in the text field.
    All that I need is to validate if P108_PRIVATE_IP is entered when a P108_CLUSTER_ID is selected. i.e it is mandatory to enter Private IP when a cluster is seelcted and following is my Pl/SQL code
    Declare
    v_valid boolean;
    Begin
    IF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := FALSE;
    ELSIF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := FALSE;
    END IF;
    return v_valid;
    END;
    My problem is it is returning FALSE for all the cases.It works fine in SQL Command though..When I tried to Debug and use Firebug, I found that Text fields are not stored a null by default but as empty strings "" . Now I tried modifying my PL/SQL to check Private_IP against an empty string. But doesn't help. Can someone please tell me how I need to proceed.
    Thanks

    See SQL report for LIKE SEARCH I have just explained how Select list return value works..
    Cheers,
    Hari

Maybe you are looking for

  • MathType Square root problem

    Hello, I work with MathType on mac (indesign CS6), this is fine except that the square root sign is not quite the same on Mac as on PC. Are there any settings that can change this so that it becomes equally. top line of the character becomes higher o

  • Using Applescript for uploading pictures on the Internet

    Hello! I was wondering if there was a way to use Applescript with Firefox (or another browser)...? We have many many villas on our website, each one with lots of pictures. We are constantly adding new villas to our site and amending old ones. To add

  • MYSQL Query with Session Variable

    I would like to log in and after login success php will automatically query records using my username as the parameter. How can it be done in dreamweaver? How can I insert multiple values dependent on what I selected on a list/menu? Thank you!

  • Why does Illustrator CC has a B5 preset page setup of 182 x 257 and not 176 x 250 like the EU DIN-standard?

    I just started a document for a series of illustrations for a client; The booklet had to be B5. So i just opened the presets in Illustrator for B5. Now that I am starting the final designs, I was going through the specs off the printer and I found ou

  • How to define an array in ABAP

    Hi experts,    Can we define an array in ABAP. if yes then How. plz help. Regards. Vaibhav Tiwari.