How to Read All Channels in one task in vc

I want to read 6 channals' datas in VC. Now I create 6 task, and read it sperately.
I know that it can read from one task, but how??
DAQmxCreateTask("",&task1);
DAQmxCreateTask("",&task2);
DAQmxCreateTask("",&task3);
DAQmxCreateTask("",&task4);
DAQmxCreateTask("",&task5);
DAQmxCreateTask("",&task6);
DAQmxCreateAIVoltageChan(task1,"Dev1/ai0","",DAQmx​_Val_Cfg_Default,-5.0,5.0,DAQmx_Val_Volts,NULL);
DAQmxCreateAIVoltageChan(task2,"Dev1/ai1","",DAQmx​_Val_Cfg_Default,-5.0,5.0,DAQmx_Val_Volts,NULL);
DAQmxCreateAIVoltageChan(task3,"Dev1/ai2","",DAQmx​_Val_Cfg_Default,-5.0,5.0,DAQmx_Val_Volts,NULL);
DAQmxCreateAIVoltageChan(task4,"Dev1/ai3","",DAQmx​_Val_Cfg_Default,-5.0,5.0,DAQmx_Val_Volts,NULL);
DAQmxCreateAIVoltageChan(task5,"Dev1/ai4","",DAQmx​_Val_Cfg_Default,-5.0,5.0,DAQmx_Val_Volts,NULL);
DAQmxCreateAIVoltageChan(task6,"Dev1/ai5","",DAQmx​_Val_Cfg_Default,-5.0,5.0,DAQmx_Val_Volts,NULL);
DAQmxCfgSampClkTiming(task1,"",1000.0,DAQmx_Val_Ri​sing,DAQmx_Val_FiniteSamps,N);
DAQmxCfgSampClkTiming(task2,"",1000.0,DAQmx_Val_Ri​sing,DAQmx_Val_FiniteSamps,N);
DAQmxCfgSampClkTiming(task3,"",1000.0,DAQmx_Val_Ri​sing,DAQmx_Val_FiniteSamps,N);
DAQmxCfgSampClkTiming(task4,"",1000.0,DAQmx_Val_Ri​sing,DAQmx_Val_FiniteSamps,N);
DAQmxCfgSampClkTiming(task5,"",1000.0,DAQmx_Val_Ri​sing,DAQmx_Val_FiniteSamps,N);
DAQmxCfgSampClkTiming(task6,"",1000.0,DAQmx_Val_Ri​sing,DAQmx_Val_FiniteSamps,N);
DAQmxStartTask(task1);
DAQmxStartTask(task2);
DAQmxStartTask(task3);
DAQmxStartTask(task4);
DAQmxStartTask(task5);
DAQmxStartTask(task6);
DAQmxReadAnalogF64(task1,-1,10.0,DAQmx_Val_GroupBy​Channel,OriginData1,N,&read1,NULL);
DAQmxReadAnalogF64(task2,-1,10.0,DAQmx_Val_GroupBy​Channel,OriginData2,N,&read2,NULL);
DAQmxReadAnalogF64(task3,-1,10.0,DAQmx_Val_GroupBy​Channel,OriginData3,N,&read3,NULL);
DAQmxReadAnalogF64(task4,-1,10.0,DAQmx_Val_GroupBy​Channel,OriginData4,N,&read4,NULL);
DAQmxReadAnalogF64(task5,-1,10.0,DAQmx_Val_GroupBy​Channel,OriginData5,N,&read5,NULL);
DAQmxReadAnalogF64(task6,-1,10.0,DAQmx_Val_GroupBy​Channel,OriginData6,N,&read6,NULL);
DAQmxStopTask(task1);
DAQmxStopTask(task2);
DAQmxStopTask(task3);
DAQmxStopTask(task4);
DAQmxStopTask(task5);
DAQmxStopTask(task6);
DAQmxClearTask(task1);
DAQmxClearTask(task2);
DAQmxClearTask(task3);
DAQmxClearTask(task4);
DAQmxClearTask(task5);
DAQmxClearTask(task6);
thank you!

DAQmxCreateTask("",&task1);
DAQmxCreateAIVoltageChan(task1,"Dev1/ai0:ai5","",DAQmx_Val_Cfg_Default,-5.0,5.0,DAQmx_Val_Volt​s,NULL);
DAQmxStartTask(task1);
DAQmxReadAnalogNChanF64(task1,-1,10.0,DAQmx_Val_GroupByChannel,OriginD​ata1,N,&read1,NULL);//This proto changes fo DAQmxNch1sample.... I do not have it in front of me
DAQmxStopTask(task1);
DAQmxClearTask(task1);
int32_t DAQReadNChan1Samp1DF64_130(uintptr_t taskID, double timeout, int32_t incomingStatus, Array1DDouble **data, LStrHandle extendedErrorInfo);// is the C version
Jeff

Similar Messages

  • Reading multiple channels in one task

    Hi i am trying to read three voltage inputs in one task. I have configured the task and used generate code to get the example. But i am now getting the data from all three channels in one waveform, but i would like to work independantly on the three channels. What should i do.

    Hi vamy,
    If you read all channels with AI Read, it should return an array of waveforms (not just a single waveform). You can use "Index Array" to get the waveform from each individual channel, or use "Index Waveform Array", which is basically the same operation.
    Dan

  • How to read the content in one node of XML in Java? Pls help

    My dear brothers,
    I am a newbie of XML, I have a exercise which is creating a Tree View from XML file. But the trouble is I do not know how to read the content in one node of XML file. I decide to use the algorithm as following:
    1. Create a GUI form which gives the ability for user to choose a XML file (ok)
    2. Load XML and return the file (ok)
    3. Read the file from node to node to create the node in Tree View (?!)
    Please help me, and if you are enough kind, please give me an small example to easy understand. Thanks in advance.
    Hoang Yen Binh

    I hope this one helps you.
         <ABC Type="ProductBased" ProdName="One" Location="India">
              <CEO>Raj</CEO>
              <Finance>Vikram</Finance>
              <HR>Karthik</HR>
              <Technical>Satish</Technical>
         </ABC>
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Attr;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import org.w3c.dom.DOMException;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import java.io.File;
    import java.io.IOException;
    public class XmlReading {
         Document doc;
         Element element;
         public static void main(String[] args) throws Exception{
              XmlReading xr = new XmlReading();
              xr.getXmlParser(args);
         public void getXmlParser(String[] args) {
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   if(args.length != 1) {
                        System.err.println("Argument Required");
              try {
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   doc = builder.parse(new File(args[0]));
              }catch(ParserConfigurationException e1) {
              }catch(SAXException e2) {
              }catch(IOException e3) {
              getAttributes();
         public void getAttributes() {
              // Retrive the entire Document from the Dom Tree
              element = doc.getDocumentElement();
    //          System.out.println(element);
              NamedNodeMap attrs = element.getAttributes();
              // Get number of attributes in the element
         int numAttrs = attrs.getLength();
         // Process each attribute
              for (int i=0; i<numAttrs; i++) {
                   Node node = attrs.item(i);
                   // Get attribute name and value
                   String attrName = node.getNodeName();
                   String attrValue = node.getNodeValue();
                   System.out.println(attrName + ": " + attrValue);
              String s1 = element.getTagName();
              System.out.println(s1);
              // To get all the elements in a DOM Tree
              NodeList nl1 = element.getElementsByTagName("*");
              int i2 = nl1.getLength();
              System.out.println(i2);
              for(int i=0; i<i2; i++) {
                   System.out.println(nl1.item(i) + "\n");
    }

  • How to delete all mails with one klick?

    It's annoying to delete every single mail.
    How to delete all mails with one klick, like in the paperbasket?
    Thanks

    If the emails have been previously deleted (I.e. in the trash folder), tap Edit at the top of the list. You should see a delete all button at the bottom. If the messages are in a standard folder, they need to be handled one at a time.

  • How to read URL parameters of one wdp component into other WDP component?

    Dear Experts,
    Can anyone let me know how to read URL parameters of one wdp component into other WDP component?
    My requirement is i have one standard WDP component with 3 URL parameters and i needto
    read that URL parameters along with their values in my Z-WDP component.
    Thanks
    SK

    Hi Santosh,
    You can read parameters send from one WebDynpro Component to another component by adding code in "HANDLEDEFAULT" Event Handler method ( Window )of your target Web Dynpro Component.
    data: lt_parameter             type tihttpnvp,
             ls_parameter             type ihttpnvp.
    lo_api_controller ?= wd_this->wd_get_api( ).
       call method lo_api_controller->get_message_manager
         receiving
           message_manager = lo_message_manager.
       clear : ls_parameter.
       refresh : lt_parameter[].
    * Read all URL parameters
       wdevent->get_data( exporting name = if_wd_application=>all_url_parameters importing value = lt_parameter ).
    if not lt_parameter[] is initial.
         clear : ls_parameter.
         read table lt_parameter into ls_parameter index 1.
         if ls_parameter-name = 'ACTION' and
            ls_parameter-value is initial.
           lv_flag = 'X'.
           clear : lo_msg.
           lo_msg = 'Action Parameter Missing in URL Link !'.
    *         report message
           call method lo_message_manager->report_error_message
             exporting
               message_text = lo_msg.
         else.
         endif.
    Best Regards
    Priyesh Shah

  • Function Module or table to read all EQUI for one KUNNR

    Hello,
    i need to read all Equipments for one specific KUNNR (endcustomer).
    Is there a function module which could be used?
    Or what is a good select for this?
    Thanks a lot.
    Kind regards
    Manfred

    Hi,
    EQBS table will be getting updated based on the Delivery document or while creating equipment for Material & Serial no combination.
    How you are maintaining End Customer in your Equipment Master?
    You can maintain in Partner Function or Sort Field or through automatic equipment creation.
    Based on that, you have to find the logic.
    Regards,
    Maheswaran.

  • How to print all columns in one page

    Hi,
    Can anybody explain me how to print all columns in one page.we have around 15 to 20 columns for 4 reports and all these reports are build on one multiprovider.we are using BW 3.5.
    Can anyone explain me  how to print ALL COLUMNS IN ONE PAGE  .currently they are getting all columns in 2 to 3 pages. They are using PORTAL to run the reports here.
    Is it possible to do by customizing Webtemplate or by macros in Workbook.Please help me
    Edited by: kotha123 on Oct 11, 2010 5:58 PM

    Hi,
    Your best bet is to use a workbook template or else Excel to pdf option...Thanks

  • How to read all values of a queue

    Hi All,
    In Message mapping I am checking condition for field value based on incoming value.
    In test cases i can see the second or third  occurence is getting supressed and first value fails the condition and mapping node not created.
    I would like to know how to read multiple values from queue and check condition for each value and if correct value present condition should pass.
    I tried all possible context changes but no luck.
    Any ideas how to read all values coming .
    Thanks.

    <?xml version="1.0" encoding="UTF-8"?>
    <msg version="" dbName="">
       <rowOp isLast="" cmitLSN="" cmitTime="" authID="" correlationID="" planName="">
          <updateRow subName="" srcOwner="" srcName="" intentSEQ="" rowNum="" hasLOBCols="">
             <col name="END_RSN_CDE" isKey="852369" invalidData="" rawData="">
                <smallint>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </smallint>
                <date>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </date>
                <char>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </char>
             </col>
             <col name="SVC_USER_SDT" isKey="789654" invalidData="" rawData="">
                <smallint>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </smallint>
                <date>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </date>
                <char>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </char>
             </col>
          </updateRow>
       </rowOp>
    </msg>

  • How to divide all textFrames in one-character-per-textFrame?

    Hello:
    How to divide all textFrames in one-character-per-textFrame?
    Example: the textFrame "Letters" will be divided in 7 textFrames: "L", "e", "t", "t", "e", "r", "s".
    Help, please.

    Hi Paul, try this one
    #target Illustrator
    //  script.name = splitSelectedFramesIntoWords2.0.jsx;
    //  script.description = splits selected texFrames into separate words;
    //  script.required = select point text textFrames before running;
    //  script.parent = CarlosCanto;  // 10/14/11
    //  script.elegant = false;
    var idoc = app.activeDocument;
    var sel = idoc.selection; // get selection
    var selCount = sel.length; // count items
    var tFrames = []; // to hold the textFrames
    for (j=selCount ; j>0 ; j--) // loop thru selection & get textFrames backwards
                        tFrames[j-1] = sel[j-1];
    for (k = 0 ; k<tFrames.length ; k++) // loop thru textFrames
                        var xpos = tFrames[k].position[0]; // get x
                        var ypos = tFrames[k].position[1]; // get y
                        var words = tFrames[k].contents.split(/\s/g); // get all words into an array
                        //$.writeln(words);
                        var space = tFrames[k].duplicate(); // dup to get width of a space
                        space.contents = " ";
                        var sw = space.width;
                        space.contents = words[0]; // replace space with first word
                        var w = space.width;
                        var wordCount = words.length; // count words
                        for (i=1; i<wordCount ; i++) // loop thru words
                                            xpos2 = xpos+w+sw; // next words position = previous word pos+width+space
                                            var iword = space.duplicate(); // duplicate previous word
                                            iword.contents = words[i]; // add next word
                                            iword.position = [xpos2,ypos]; // position the character = original position + new width
                                            w = iword.width; // get words width
                                            xpos = iword.position[0]; // get words position
                        tFrames[k].remove(); // remove textFrame

  • How to read a table from one host to other host

    Hi Everybody,
    How to read a table from one host to other host.
    For Example,
    a/a@abcd - host 1
    b/b@xyz - host 2
    suppose im having a table called emp in a/a@abcd
    i want to read the table emp in b/b@xyz
    how to do this.??
    I know that we have to create a dblink...after that how to proceed.
    Plz help..
    Thanks in Advance,
    Gita

    connected as scott/tiger@test
    SQL>
    CREATE DATABASE LINK local
    CONNECT TO admin IDENTIFIED BY pinnet
    USING 'pinnet';
    Database link created.
    sql>
    select count(*) from
    users@local;
    COUNT(*) 
    16
    Message was edited by:
            jeneesh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to transfer all materials from one plant to other plants?

    How to transfer all materials from one plant to other plants?

    Hi
    To transfer stock in one step  between plants belonging to same company code use movement type "301" and using transaction code "MIGO". IF you like in two step it helps to monitor stock in transit use movement type "303" and "305".
    303 Transfer posting plant to plant in two steps - removal from storage
    305 Transfer posting plant to plant in two steps - placement in storage
    to transfer stock between plants of diffrent company code go for stock transpor order using tcode "me21n"
    hope it helps

  • How to Read All Discussions and Replies

    Hi,
    I have to read all discussions and replies of a sharepoint discussion board using object model.
    Any help is greatly appreciated.
    Thanks,
    Tushar

    Finally I was able to solve this puzzle. Thought of sharing for people still having this issue:
    1) Take instance of your site collection and web:
    SPSite currentSite = SPContext.Current.Site;
    SPWeb currentRootWeb = currentSite.RootWeb;
    2) Suppose I have the name of discussion list - "MyDiscussionList". Get GUID of this list:
    Guid myDiscussionListGUID = Guid.NewGuid();
    foreach (SPList list in currentRootWeb.Lists)
          if (list.BaseTemplate.ToString() == "DiscussionBoard" && list.Title == "MyDiscussionList")
                myDiscussionListGUID = list.ID; // Read GUID of Discussion List
                break;
    Tips:
    a) list.ItemCount will return all discussions and their replies
    b) list.Items.Count will return only replies
    3) Get your list:
    SPList myDiscussionList = currentRootWeb.Lists.GetList(myDiscussionListGUID, false);
    4) Create a new Discussion
    SPListItem newItem = SPUtility.CreateNewDiscussion(myDiscussionList.Items, "New Message using code");
    newItem["Body"] = "My new message content using code";
    newItem.Update();
    5) How to read all discussions:
    foreach (SPListItem folder in myDiscussionList.Folders)
         Response.Write("Folder Name: " + folder.Name + "<BR>");
         Response.Write("Folder ID: " + folder.ID + "<BR>");
         Response.Write("Attachments Count: " + folder.Attachments.Count + "<BR>"); // Returns attachment count
         // Code to read attachment URL.
         for (int i = 0; i < folder.Attachments.Count; i++)
                Response.Write("Attachment Url " + folder.Attachments.UrlPrefix + folder.Attachments + "<BR>");
         // Read body of attachment
         Response.Write("Body: " + folder.Fields["Body"].GetFieldValueAsText(folder["Body"]) + "<BR>"); 
    6) If you want to delete a discussion
    SPListItem listItemParentToDelete = null;
    foreach (SPListItem folder in myDiscussionList.Folders)
          listItemParentToDelete = folder;
    if (listItemParentToDelete != null)
        listItemParentToDelete.Delete();
    7) Loop through all discussion replies:
    foreach (SPListItem listItem in myDiscussionList.Items)
         Response.Write("Item DisplayName: " + listItem.DisplayName + "<BR>"); // Returns Title of Discussion
         Response.Write("List ID: " + listItem.ID + "<BR>");
         Response.Write("List Folder ID: " + listItem.Fields["Parent Folder Id"].GetFieldValueAsText(listItem["Parent Folder Id"]).ToString() + "<BR>"); // Returns ID of Parent Discussion
         Response.Write("Body: " + listItem.Fields["Body"].GetFieldValueAsText(listItem["Body"]) + "<BR>");
         // Create Parent List Item
         int parentListID = Convert.ToInt32(listItem.Fields["Parent Folder Id"].GetFieldValueAsText(listItem["Parent Folder Id"]));
         SPListItem parentListItem = lvContentItemsDiscussionsList.GetItemById(parentListID);
         Response.Write("Parent List Item Name: " + parentListItem.Name + "<BR>");
         // Code to Reply to a Discussion Message
         SPListItem reply = SPUtility.CreateNewDiscussionReply(parentListItem);
         reply["Body"] = "<div class=ExternalClass89C47CD7892B4279A8F42A65DD63AE3A><div> </div> <div>Reply to the new message<br><br> <hr> <b>From: </b>Admin<br><b>Posted: </b>Friday, July 20, 2007 4:01 AM<br><b>Subject: </b>New message<br><br> <div class=ExternalClass3D04672E599B486F9ECB76C138494708> <div>My new message content</div></div></div></div>";
         reply["TrimmedBody"] = "<div class=ExternalClass677134B4EA284660B1B236824800345C><div> </div> <div>Reply to the new message<br></div></div>";
         reply.Update();
        // Code to delete a discussion reply
        listItemToDelete = listItem;
    8) Code to delete a discussion reply:
    SPListItem listItemToDelete = null;
    foreach (SPListItem listItem in myDiscussionList.Items)
        listItemToDelete = listItem;
    // Code to delete a discussion reply
    if (listItemToDelete != null)
        listItemToDelete.Delete();
    Note: You need to allow unsafe updates in order to do any operation on SharePoint list directly.
    currentRootWeb.AllowUnsafeUpdates = true;
    Hope this help!
    Thanks!

  • How do I read multiple channels at one time using labview with the Fluke Hydra Data Bucket 2620a using serial port?

    I need to take a reading of 15 channels about once a second. I can read one value at a time using the monitor function on the read values.vi driver, but this takes forever to read all the channels.

    I don't have this instrument but I took a look at the instrument driver and it appears that you can only configure one channel at a time to read from. You might want to take a look at the command set for this instrument and see if it allows for configuration of multiple channels. It could be that the instrument driver just doesn't have that built in.
    J.R. Allen

  • CS5 - How to read all the film or only one chapter

    I have a movie which includes several chapters (defined by Encore marks).
    I would like to have a menu with 2 buttons, one to read the whole movie, one to open a submenu with several buttons, one for each chapter. At the end of the reading of a chapter I want to return to the submenu (and not continue to read the following chapter)
    Who can advise to me?
    Sorry for my English, I am French …
    Thank you

    Hi,
    there is one easy way to delete data from PSA .You can create a process chain have one delete data from PSA step where you need to give PSA table name and request older than (no of days before which you want to delete data ).
    Execute it and it will delete all the data before specified no of days .You can add multiple PSA tables here and can delete whole data in one go .
    Regards,
    Jaya

  • How to read frequency channel & voltage channels at the same time with different rates?

    I am using a DAQCARD 6036E with a SCXI-1000 chassis.  I have a SCXI-1100 & a SCXI-1126 modules, along with a SCXI-1124 AO module for voltage output.  I am acquiring several voltage input channels with the SCXI-1100 & one frequency channel (frequency signal upto 12000Hz) with the SCXI-1126.  I want to configure all the channels in the Measurement & Automation so that I can use the Scale function to setup all the channels.  I am using a higher acquisition rate for the frequency channel than the voltage channels.  I had the block diagram as attached.  When I run the vi, I had the resource problem.  The err. msg. is: the specified resource is reserved..  Any suggestions as how to acquire a frequency signal & several voltage signals with this system setup using the DAQ-mx?
    Attachments:
    Document.rtf ‏4727 KB

    Since a common ADC is shared with all your SCXI analog input channels , you will have to sample all channels in a scan list at same sampling rate.
    However, you can set up frequency and voltage virtual channels using different instances of "create DAQmx Virtual channel" function in the same task as shown in attached pic, set scan rate and read them using a single DAQmx read
    Attachments:
    vi.PNG ‏6 KB

Maybe you are looking for

  • Calendar - Day Link settings getting cleared

    Hello all, I'm running Application Express 3.1.1.00.09. I have an application with a page that has a "Small" calendar on the left and a report on the right. I wanted to set it up so that when the user clicks a day link, it targets back to the page sh

  • Problem with Illustrator toolbars

    I just bought the CS4 Design Premium Student Version from my school. When I opened up illustrator, it says this: "The document 'Print.ai' contains elements that are managed by plug-ins that are not currently available. You can delete or expand these

  • How do I uninstall PS 7 without a functional installer?

    Since I installed Mac 10.5.8 my PS 7 will not funtion, and an error message pops up that says it cannot be used. I purchased PSE 10 to update photoshop and it says there is not enough memory to install it.  I figured if I ununstalled PS 7 that should

  • Installing the Enterprise Manager 10g (Browser-based) Console

    i've installed the oracle 10g client and am successfully running the OEM 10g java interface. however, when i try to start the web browser-based interface, i get a "page cannot be displayed" error. the URL shown is <the name of the machine: >/em Are a

  • Problems with setCurrentRowWithKeyValue

    Hi, I'v got a problem with setCurrentRowWithKeyValue... it just doesn't set the value. I'm probably missing something obvious.. On the first page, I have a link command: <af:commandLink text="#{row.DocumentTitle}" action="myAction">   <tr:setActionLi