Code example for single asynchronous reading of multiple waveforms

Hello

I looked around but have not been able to find the code example for single asynchronous reading of multiple waveforms.  Could someone point me in the right direction?

Thank you

Dale

Hi Dale,

Have you looked at the code using .NET Framework DAQmx example? It shows this code:

class DAQmxAsyncRead
{
private AnalogSingleChannelReader reader = null;

public DAQmxAsyncRead (task t)
{
Create the drive
Reader = new AnalogSingleChannelReader (t.Stream);
Acquire 100 samples
Handful of IAsyncResult = reader. BeginReadMultiSample (100, New AsyncCallback (OnDataReady), null);
}

Public Sub OnDataReady (IAsyncResult i)
{
Recover data that has been read.
At this point, all that occurred during the asynchronous read exceptions are thrown
Double data = reader. EndReadMultiSample (i);

You can call the method BeginReadMultiSample here once again
}
}

In addition, this article: http://digital.ni.com/public.nsf/allkb/485201B647950BF886257537006CEB89?OpenDocument talk about different causes of the reserved resource error.

Kind regards

Alexandra Valiton

Tags: NI Software

Similar Questions

  • Clean the Code example for the abstract factory

    Hello
    I read clean Code and I do not understand something.
    On page 38, it is suggested to instead use the switch instructions, we can use the abstract factory.
    The example is the following:
    Instead:
    public Money calculatePay(Employee e)
    throws InvalidEmployeeType {
      switch (e.type) {
      case COMMISSIONED:
        return calculateCommissionedPay(e);
      case HOURLY:
        return calculateHourlyPay(e);
      case SALARIED:
        return calculateSalariedPay(e);
      default:
        throw new InvalidEmployeeType(e.type);
      }
    }
    We can do this:
    public abstract class Employee {
      public abstract boolean isPayday();
      public abstract Money calculatePay();
      public abstract void deliverPay(Money pay);
    }
    -----------------
    public interface EmployeeFactory {
      public Employee makeEmployee(EmployeeRecord r) throws InvalidEmployeeType;
    }
    -----------------
    public class EmployeeFactoryImpl implements EmployeeFactory {
      public Employee makeEmployee(EmployeeRecord r) throws InvalidEmployeeType {
        switch (r.type) {
         case COMMISSIONED:
            return new CommissionedEmployee(r) ;
         case HOURLY:
            return new HourlyEmployee(r);
         case SALARIED:
            return new SalariedEmploye(r);
         default:
            throw new InvalidEmployeeType(r.type);
         }
      }
    }
    I don't see why the plant is necessary here. (I know not much make abstract and I am a beginner)
    The abstract class used with his methods wouldn't be enough? Subclasses (CommissionedEmployee, HourlyEmployee,...) are implemented methods that can be called when necessary. Instead of calculatePay (myEmployee), we call myEmployee.calculatePay (). Doesn't it all? So I don't know why the plant is located in this example.

    Thanks in advance for any help on this!

    lemonboston

    lemonboston wrote:
    Subclasses (CommissionedEmployee, HourlyEmployee,...) are implemented methods that can be called when necessary. Instead of calculatePay (myEmployee), we call myEmployee.calculatePay (). Doesn't it all?

    Well, Yes, that's all. Almost everything is. You're right, you call

    myEmployee.calculatePay()
    

    where "myEmployee" is an object of the appropriate subclass. But whence this object? At some point, you must have had a line that says

    Employee myEmployee = new SalariedEmployee()
    

    or something along that line. But how did you know to create a SalariedEmployee object and not a HourlyEmployee object? It must have been a few if statements going on there. And here comes the factory: you pass a token representing the employee at the factory (a type code of employee of a character, an employee number that it will search in a database, or something else) and the factory returns a derived object of this token.

  • Error code 38 for SD card reader

    I use Win 7 64 bit on a Dell Studio 17.  Everything has been fine for over a year.  Couple of last weeks, I can not read my SD card when I go out and reinsert.  Device Manager indicates this 38, software already load in memory.  I tried to uninstall without help.  Only solution is to restart the computer.  I use Norton and Malwarebytes, but they were up a race for quite some time with the SD reading very well.

    Thanks for the help.

    Hi EZFL,

    I proposed to open Device Manager, click on the view tab and select Show devices.

    You can remove all instances of the SD card and reboot the PC with the card in the drive to see if it loads correctly.

    You can remove all other devices from the PC while troubleshooting.

    Chris
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Code example for the information of the applicant

    Hello

    I need to get information from the applicant in Composite SOA. Can someone show me sample code to get information from the applicant in IOM 11 GR 2.

    Thank you

    Retrieve the Login of the applicant
    Object requesterXMLElem = getVariableData ("variableentree", "payload", "/ ns3:process / ns4:RequesterDetails / ns4:Login");
    String requesterLogin = ((oracle.xml.parser.v2.XMLElement) requesterXMLElem) .getText ();

    -Kevin

  • Need code examples for the use of the PL/SQL and popup areas

    Hi all

    I looked at the documentation, but it does not explain how to use it.
    I need to create a region using PL/SQL to retrieve data from the tables and print it on a plain HTML page/region I use APEX 4.0.2 and DB Oracle 11i

    Thank you!

    Hello

    You can do like this:

    DECLARE
    NUMBER OF V_SAL;
    BEGIN

    SELECT NVL (SUM (salary), 0)
    To emp_sal WHERE the emp_id =: P170_emp_id
    IN V_SAL;

    HTP.p (')





    Salary
    '|| LTRIM (TO_CHAR (NVL(V_SAL,0), 'FML999G999G999G999G990D00')) | »
    ');
    END;

  • myRIO C code examples

    Hi all

    I'm just starting to watch myRIO for use for programming in C labs

    with the students.

    Depending on the resources, there is a link to the C code examples, for example. on

    http://www.NI.com/Tutorial/14619/en/

    but this link is broken. Examples are still available?

    Thank you

    Select this option.

    Hi Mark,

    This is the link you're talking to the step 3 download NOR myRIO C examples and Documentation? I tried it myself and it worked fine.

    If it is this link, you are talking about try this: http://www.ni.com/download/labview-myrio-toolkit-2014/4949/en/

    I hope it works for you,

  • IS THERE A LIST OF THE DRIVERS THAT MATCH A FAILURE CODE? FOR EXAMPLE (0XDEEDFADE)

    IS THERE A LIST OF THE DRIVERS THAT MATCH A FAILURE CODE?  FOR EXAMPLE (0XDEEDFADE).  «I GET THIS WHEN I TRY TO CONNECT A RECORDER APPLICATION MY PC (WITH CODE SCREEN BLUE DEATH "DRIVER IRQL-NOT-DONOR-BASED EQUALITY).»

    [Moved from comments]

    There is no error like code: 0XDEEDFADE

    Usually due to a bad driver, or a faulty or incompatible hardware or software. Use the general troubleshooting of STOP the Messages above checklist. Technically, this error condition means that a kernel-mode process or driver tried to access a memory location to which it did not have permission, or at a kernel interrupt request level (IRQL) that was too high. (A kernel-mode process can access only other processes that have an IRQL lower or equal to, its own.)

    Make sure you uninstall and reinstall the drivers using the following general method.

    First of all, download the latest driver. Then perform the following steps.

    Click on Start Menu

    Right click on my computer/my computer

    Click on manage the

    Click Device Manager in the list on the left

    Find the device you are trying to uninstall by expanding the game appropriate device (network adapter/IDE ATA / ATAPI controllers)

    Right click on the device

    Click on uninstall (do not click OK in the dialog box that opens after hitting uninstall it)

    Put a check mark to remove software driver for this device (if this option is available, if not, just hit OK) and click OK

    Restart your computer only if Windows asks you to.

    Install the latest driver for the device.

    You can also:

    Sign in as an administrative user.

    First of all, download the latest driver. Then perform the following steps.

    Click on Start Menu

    Click on Control Panel

    Click on hardware and sound

    Click device (the last link under devices and printers) Manager

    Find the device you are trying to uninstall by expanding the game appropriate device (network adapter/IDE ATA / ATAPI controllers)

    Right click on the device

    Click on uninstall (do not click OK in the dialog box that opens after hitting uninstall it)

    Put a check mark to remove software driver for this device (if this option is available, if not, just hit OK) and click OK

    Restart your computer only if Windows asks you to.

    Install the latest driver for the device.

    My system specs

    System manufacturer/model number HP Pavilion e9110t

    Windows 7 Home Premium 64 Bit operating system

    Processor Intel (r) Core (TM) 2 CPU Quad Q9550 @ 2.83 GHz

    Card mother Pegatron IPIEL-A3

    6,00 GB Hundai HMT125U6BFR8C-H9 memory

    Graphics card ATI Radeon HD 4850

    Its Realtek High Definition Audio card / ATI High Definition Audio

    Monitor (s) displays Acer AL2216W

    Screen resolution 1680 x 1050

    Keyboard HP keyboard

    Mouse HP mouse

    Unknown/installed by HP POWER supply

    Generic HP case

    Cooling Stock Intel cooling

    Hitachi HDP725050GLA360 ATA Device 500 GB hard drives

    Internet download speed: 19.15 Mbps Upload: 1.67 Mbps

    Another news network adapter D Realtek RTL8168D/8111 Family PCI - E Gigabit Ethernet NIC (NDIS 6.20) network adapter 802.11n Wireless PCI Express Card LAN Adapter

  • multiple folder for single user

    I want to configure several share folder in the folder for single user, but the user profile only have one option of folder is there, y at - it an option to configure multiple home folder?

    Hello

    I suggest you according to the question in this forum and check if that helps:

    http://social.technet.Microsoft.com/forums/en-us/categories

    It will be useful.

  • Activation is popping up for windows. My code is worn out cannot read. What should I do now? ___

    my window was reinstaled because I had problems with the laptop.  Now he asks me to activate the window and put in the code.  I can't read the code on the bottem of my laptop it is worn out.

    Contact the manufacturer of your computer.

    As you reinstalled Vista without using the product key, and you don't have it, we can not help you.

    See you soon. Mick Murphy - Microsoft partner

  • read the multiple analog inputs at the same time

    Hi all

    I use USB-6001 and want to develop an application to multiple tasks in C++. I try to read several analog inputs at the same time, but got some errors. To put it simply, I copy one of the sample code to read in analog data in a channel, and then turn it into function. Then I call this function to thread with the names of different poles (for example Dev1/ai0, Dev1/ai1) and I come across this error:

    "The specified source is reserved. The operation can not be specified such complete"code of State-50103

    I have search the forums, this may be because I use the hardware timing in this function, and this material timing cannot be used simultaneously by multiple tasks. I may have to put all the lines, I want to read in a single task (such as Dev1 / ai0:1). This way I can read two lines at the same time. However, when I try this, I encounter another error:

    Status code "buffer is too small to contain the data read" - 200299

    So here is my question, what should I do if I don't want to read the multiple analog inputs at the same time? Is the thing that hard time cannot be used by several true task? If I have to read several lines to a single task, how to set the settings?


  • How read datalog multiple files at the same time?

    Hello friends...

    can someone help me to show how read datalog multiple files at the same time?

    Here is the example of my case.

    I have 500 files in a folder. each file contains a waveform and its setting.

    and then I want to do a card spectral these files, because these files have been saved in the order.

    the point is to know how to read these 500 files at once? I made a program to read these files, but the program can read these files in one by one. So it is very uncomfortable to read 500 files one by one. can someone help me solve this problem? Thank you. I hope you can show me the program. Thank you again...

    Hi jojo,

    Well, in the range of functions daughter, you will find a function to list the contents of the folder. This allows to get the names of all the files datalog, and then use a loop FOR to read.

    No one is obliged to provide 500 names of files manually - that's why we use a programming language to let the computer do the stupid work

  • Received via Notepad in English not straight code. How do I read it?

    I have received a document sent by e-mail through my notebook, but cannot read. The wording seems to be in the code.
    Also, I managed to recover old emails that were lost when my computer went down and Windows should be re-installed, but they also seem to be in the code
    and I can't read them either.
    Need help trying to solve problem. Thank you.

    You have received an email that has an attachment. You opened it in Notepad, and it appeared to gibberish.
    Is that what you were trying to say?

    Each attachment has a file extension.

    Each file extension has a specific program to open it. Such as...

    Microsoft Word Viewer or Microsoft Office Word to open the format .doc or .docx attachments.

    File extension is represented by 3 or 4 letters at the end of the file, for example, .doc or .docx, or .pps, .ppsx etc etc etc.

    What is the attachemnt in question file extension?

    To open .doc or .docx files, you need Microsoft Word Viewer (free program)

    http://www.Microsoft.com/download/en/details.aspx?displaylang=en&ID=4

    To open the pptx, ppsx, ppt and pps files, you need Microsoft PowerPoint Viewer (free program)

    http://www.Microsoft.com/download/en/confirmation.aspx?displaylang=en&ID=6

    To open xls or xlsx, you need Excel Viewer (free program)

    http://www.Microsoft.com/download/en/details.aspx?displaylang=en&ID=10

    To open pdf files, you need Adobe Reader (free program)

    http://get.Adobe.com/reader/

  • How to search for words and phrases in multiple pdf documents

    Dear Sirs.

    I need to search for words AND phrases in a huge amount of PDF files (over 5000). The problem I found by using the "advanced search" is that I am able to search for single words sentences individual GOLD, but I need to combine a lot of words and multiple expressions in the same search. For example, if I need to look for instances of the word 'Florida' or 'Texas' or 'United States', I can't search for each PDF file that contains the word 'Florida' or 'Texas' or the phrase 'United States', since if I put 'word' in the search options, I will receive all the files that contain the word "Florida" or 'Texas' but also 'solidarity' or 'States' and simple words. I tried placing quotes in the words I need to research such as phrases, but it did not work. I would like to know if there is a way I can search the way I need.

    Thanks in advance.

    Alejandro Araujo.//

    Hello Alejandro,

    Please see this KB doc. helps Acrobat | The search for PDF files, it will be a great help.

    Kind regards

    Nicos

  • Structure of security suitable for Single Sign on Server

    We're all used to how design the structure of security for vCenter Server if you had a before 5.1 existing VMware environment.  Who should have administrative privileges in vCenter Server, what roles, permissions and so on should be attributed to the what users and groups - these issues have already been addressed in our current configuration.

    Now Single Sign introduced a significant new of the determination of the issues of access and authentication.

    I would like to have some ideas on how this should be managed.  For example, directors of previous VMware by definition should become Single Sign we're directors? The Active Directory domain administrators now begin to get involved with the SSO on the server?

    For example, the Single Sign on now VMware forces administrators to configure things like:

    -For the SSO password complexity policy

    -Expired password for SSO

    -Locking strategy

    We probably already have these things closely controlled in AD and locked with group policy, but you cannot apply the policy of group directly to a SINGLE authentication server and make it to a GPO in Active Directory.  (You can do Windows SSO running operating system on have a GPO applied, but it will not set up authentication SINGLE itself, just the OS).

    VMware admins are looking at a new set of issues related to authentication and authorization.  Someone must have written something or will write something to help us get the overview of what changes with SSO if anything and how we look at SSO to a safety design and best practices.

    Do I just existing vCenter Server admins admins SSO or do we need to take a step back and reconsider?

    Hello

    In fact, Yes. SSO is strong enough in 5.5. It has some limitations around to send passwords expired, but this is mainly because some people do not use. I use SSO to provide usernames and passwords for all my VMware vCenter and related products service accounts. That is an account for POS, Horizon, vCops, Log Insight, etc.  It's more about the conservation of the once separate systems more with no real need to AD for services. But AD via SSO is used by users.

    Read the documentation and determine how SSO fits in your current password policy and take a long, hard look at your virtualization environment. Y at - it a 1 service-by-service account in dialogue directly with vCenter? If this isn't the case, SSO can help you implement that. The key is to match its functionality to your security policy.

    Best regards
    Edward L. Haletky
    VMware communities user moderator, VMware vExpert 2009, 2010, 2011,2012,2013,2014

    Author of the books ' VMWare ESX and ESXi in the business: Planning Server Virtualization Deployment, Copyright 2011 Pearson Education. ' Of VMware VSphere and Virtual Infrastructure Security: securing the virtual environment ', Copyright 2009 Pearson Education.

    Virtualization and Cloud Security Analyst: The Practice of virtualization, LLC - vSphere Upgrade Saga - virtualization security Table round Podcast

  • Could some modify this code works for vertical scrolling?

    Hello

    I am a know nothing.

    Read this discussion... http://forums.Adobe.com/message/5501696 .

    UME YOSHIOKA provided the code to control the direction of reading the direction of scrolling animation.

    It is for the horizontal scrollbar only.

    His example of it in action... http://Ciruelo.jp/js/edge/WS/windowScroll.html

    Very smart.

    Could some modify this code works for vertical scrolling?

    I know nothing and I don't know if I'm too ask.

    My attempts have failed.

    The code is

    var totalFrame = 6250;
    var stageWidth = 10000;
    var maxScrollLeft = stageWidth - $(window).width();
    var baseFrame = 250;  //for adjustment

    //control the main timeline pos by $(window).scrollLeft() pos.
    $(window).scroll(function (e) {
      var scrollLeft = $(window).scrollLeft();              // get scroll pos
      var n = totalFrame*scrollLeft/maxScrollLeft|0;        // calc frame index
      sym.stop(n+baseFrame*(1-scrollLeft/maxScrollLeft)|0); // adjustment & move frame
    });

    Thank you

    Hi, epple2013.

    in the case of ths.

    You can use ' $(window) .scroll (func) ' and ' $(window) .scrollTop () ".". "

    $(window).scroll(function (e) {
      // get scrollTop
      var scrollTop = $(window).scrollTop();
    
      // control your timeline by value of scrollTop
      if(scrollTop>100){
        //sym.play(scrollTop); etc...;
      }
    }
    
    

    Here is the sample & source:http://ciruelo.jp/js/edge/vs/vertical.html

    Best regards.

    UME.

Maybe you are looking for