How to read data simultaneo​usly from different cdaq modules?

Is there a way to synchronize input from separate cdaq modules?
I need to read a voltage on an NI-9219 analog input channel and a
frequency on an NI-9211 channel.  As far as I can tell a single "task" can
only read input from channels on one module. Is there a way to build a task that reads data from multiple modules?
Seems to me that buffered input is useless when multiple tasks are employed. With multiple tasks you get arrays of data that are sequential, not simultaneous. Is this correct? I'm thinking that the only way to
get synchronized readings is to read each channel individually inside a
loop. But this restricts the program to low speed data
acquisition with  measurements that are spaced unevenly. Right?
I want to create a data file with three columns: time, voltage,
frequency. What's the best way to get these readings at the same
instant?
Referrence to a help document or tutorial would be great.
 thanks! 

Synchronizing measurements of different types using separate cDAQ modules can be done by making sure that the physical channels for each module IO control are selected (and separated by commas). Please review the following Developer Zone article illustrating how this can be accomplished. Cheers
1. NI-DAQmx: NI CompactDAQ Module Synchronization:  http://zone.ni.com/devzone/cda/epd/p/id/5259
Regards,
Ali M
Applications Engineer
National Instruments

Similar Messages

  • How to read data using SQLGetData from a block, forward-only cursor (ODBC)

    Hi there.  I am trying to read data a small number of rows of data from either a Microsoft Access or Microsoft SQL Server (whichever is being used) as quickly as possible.  I have connected to the database using the ODBC API's and have run a select
    statement using a forward-only, read-only cursor.  I can use either SQLFetch or SQLExtendedFetch (with a rowset size of 1) to retrieve each successive row and then use SQLGetData to retrieve the data from each column into my local variables.  This
    all works fine.
    My goal is to see if I can improve performance incrementally by using SQLExtendedFetch with a rowset size greater than 1 (block cursor).  However, I cannot figure out how to move to the first of the rowset returned so that I can call SQLGetData to retrieve
    each column.  If I were using a cursor type that was not forward-only, I would use SQLSetPos to do this.  However, using those other cursor types are slower and the whole point of the exercise is to see how fast I can read this data.  I can
    successfully read the data using a block forward only cursor if I bind each column to an array in advance of the call to SQLExtendedFetch.  However, that has several drawbacks and is documented to be slower for small numbers of rows.  I really
    want to see what kind of speed I can achieve using a block, forward-only, read-only cursor using SQLGetData to get each column.
    Here is the test stub that I created:
    ' Create a SELECT statement to retrieve the entire collection.
    selectString = "SELECT [Year] FROM REAssessmentRolls"
    ' Create a result set using the existing read/write connection. The read/write connection is used rather than
    ' the read-only connection because it will reflect the most recent changes made to the database by this running
    ' instance of the application without having to call RefreshReadCache.
    If (clsODBCDatabase.HandleDbcError(SQLAllocStmt(gDatabase.ReadWriteDbc, selectStmt), gDatabase.ReadWriteDbc, errorBoxTitle) <> enumODBCSQLAPIResult.SQL_SUCCESS) Then
    GoTo LoadExit
    End If
    Call clsODBCDatabase.HandleStmtError(SQLSetStmtOption(selectStmt, SQL_CONCURRENCY, SQL_CONCUR_READ_ONLY), selectStmt, errorBoxTitle)
    Call clsODBCDatabase.HandleStmtError(SQLSetStmtOption(selectStmt, SQL_CURSOR_TYPE, SQL_CURSOR_FORWARD_ONLY), selectStmt, errorBoxTitle)
    Call clsODBCDatabase.HandleStmtError(SQLSetStmtOption(selectStmt, SQL_ROWSET_SIZE, MAX_ROWSET_SIZE), selectStmt, errorBoxTitle)
    If (clsODBCDatabase.HandleStmtError(SQLExecDirect(selectStmt, selectString, Len(selectString)), selectStmt, errorBoxTitle) <> enumODBCSQLAPIResult.SQL_SUCCESS) Then
    GoTo LoadExit
    End If
    ' Cursor through result set. Each time we fetch data we get a SET of rows.
    sqlResult = clsODBCDatabase.HandleStmtError(SQLExtendedFetch(selectStmt, SQL_FETCH_NEXT, 0, rowsFetched, rowStatus(0)), selectStmt, errorBoxTitle)
    Do While (sqlResult = enumODBCSQLAPIResult.SQL_SUCCESS)
    ' Read all rows in the row set
    For row = 1 To rowsFetched
    If rowStatus(row - 1) = SQL_ROW_SUCCESS Then
    sqlResult = clsODBCDatabase.HandleStmtError(SQLSetPos(selectStmt, row, SQL_POSITION, SQL_LOCK_NO_CHANGE), selectStmt, errorBoxTitle)
    Call clsODBCDatabase.SQLGetShortField(selectStmt, 1, assessmentRollYear(row - 1))
    Console.WriteLine(assessmentRollYear(row - 1).ToString)
    End If
    Next
    ' If the rowset we just retrieved contains the maximum number of rows allowed, there could be more data.
    If rowsFetched = MAX_ROWSET_SIZE Then ' there could be more data
    sqlResult = clsODBCDatabase.HandleStmtError(SQLExtendedFetch(selectStmt, SQL_FETCH_NEXT, 0, rowsFetched, rowStatus(0)), selectStmt, errorBoxTitle)
    Else
    Exit Do ' no more rowsets
    End If
    Loop ' Do While (sqlResult = enumODBCSQLAPIResult.SQL_SUCCESS)
    The test fails on the call to SQLSetPos.  The error message I get is "Invalid cursor position; no keyset defined".  I have tried passing SET_POSITION and also SET_REFRESH.  Same error.  There has to be a way to do this!
    Thank you for your help!
    Thank You! - Andy

    Hi Apelkey,
    Thank you for your question. 
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    Regards,
    Charlie Liao
    TechNet Community Support

  • How to update data in database from different region of the same page

    Hi,
    I have pepared two regions of tabular form based on the same table,each region is selecting different columns of the same table.
    I want to update the values from different regions in the database using single submit button.
    Regards
    Shashi

    I presume that the two regions are working fine with their individual buttons and your issue is how to make them both save with one button.
    Here is how
    a. You will have 2 ApplyMRU and 1 ApplyMRD processes for each of the regions. Right? Lets say you have 2 "Save" (i.e. label=Save) buttons, one has name SUBMIT and the other SAVE ( SUBMIT and SAVE being the requests that will be sent when they are clicked , respectively)
    b. Make the Display condition on one of the buttons 'Never'. Now it won't show when you run the page. Lets say you made SAVE's conditional Display 'Never'
    c. Go and change the condition on all ApplyMRU and ApplyMRD processes from "When Button Pressed" to "Request is contains in Expression1". In Expression1 enter SUBMIT,SAVERegards

  • How to merge data in icloud from different devices into one before restoring?

    I have 2 devices listed on my icloud.
    Two of them are lost phones.  I want the data from both devices to be on my new iphone.
    It is easy enough to restore one of them (which I have done) but how do i know restore from the other one? 
    Is there any simple way to merge the data somehow?

    Hello!
    Unfortunately, it is not possible to merge 2 different back ups in one. However, if you need the photos and contacts from these back ups you can restore one and then import the pics to your PC and sync the contacts to iCloud then restore the iPhone from the other back up and merge the info with iCloud again.
    Best
    B.

  • How to read data from a CLUSTER STRUCTURE not cluster table.

    Hi,
    how to read data from a CLUSTER STRUCTURE not cluster table.
    regards,
    Usha.

    Hello,
    A structre doesnt contain data.. so u cannot read from it. U need to find out table of that structure and read data from it.
    Regards,
    Mansi.

  • How to read data from a file that was formatted by excel?

    Hi everyone, I'm familiar with java.io and the ability to read from files, can anyone tell me how to read data from a file that was formatted by excel? Or at least give me some web references so that I can learn about it?

    http://jakarta.apache.org/poi/hssf/index.html
    HSSF stands for Horrible Spreadsheet Format, but it still works!

  • How to read data from a router by using labview

    I am a  beginner labview. How to read data from a router by using labview ? 

    What kind of data are you trying to read?
    Does the router behave like a webserver that you log into?  If so, search the forums for threads discussing HTML.

  • How to read data from a connected modem

    any one can help me? how to read data from a connected modem. The modem received real-time data from other server. The data is in text format. I can see this text when I used hyperterminal for dial up and the data is accumulated such as:
    @aa1235678
    @bb2135647
    @cc5214367
    since it is real-time data, I want to read one line each time instantly when it arrives.

    You need to use the Java Communications API. (http://java.sun.com/products/javacomm/index.html)

  • How to read data from a zipped MS Access file?

    How to read data from a zipped MS Access file?

    RPJ,
    You do not need to use the Close Zip File.vi when you unzip a folder.  This VI is used when you are creating a zip folder.
    As for examples, I found a couple of ActiveX based MS Access examples.  These programs look to be pretty basic.  For more in depth example I would search Microsoft Developers Network
    http://zone.ni.com/devzone/cda/epd/p/id/2188
    http://zone.ni.com/devzone/cda/epd/p/id/1694
    Regards,
    Jon S.
    National Instruments
    LabVIEW R&D

  • How to read data from itab

    can someone help me with this....
    how to read data.....and move it to internal table....
    the requirement is as:
    <b>Get the Participant details in an internal table IT_FINAL_PAR</b>
    •     Loop through IT_PA0002 and move Personnel number (PERNR), Personnel ID Number (PERID), Last name  (NACHN), First name (VORNA), Gender Key (GESCH), Date of Birth (GBDAT) into a final internal table for Participant data IT_FINAL_PAR.
          Read the internal table IT_PA0006 to get the corresponding House Number and Street 
    (STRAS), City (ORT01), Postal code (PSTLZ), State (STATE), 2nd address line (LOCAT) by comparing Personnel Number (PERNR)and move those retrieved field values to the final internal table for Participant data IT_FINAL_PAR.

    Hi,
      you could try the following:
    * work areas
    data: W_PA0002 like line of IT_PA0002[],
          W_PA0006 like line of IT_PA0006[],
          W_FINAL_PAR like line of IT_FINAL_PAR[].
    loop at IT_PA0002 into W_PA0002.
      clear W_FINAL_PAR.
    * move values from IT_PA0002
      W_FINAL_PAR-PERNR = W_PA0002-PERNR.
      W_FINAL_PAR-PERID = W_PA0002-PERID.
    * read address values from IT_PA0006
      read table IT_PA0006 into W_PA0006 with key pernr = W_PA0002-pernr.
      if sy-subrc = 0.
    * move fields from IT_PA0006
        W_FINAL_PAR-STRAS = W_PA0006-STRAS.
      endif.
      append W_FINAL_PAR to IT_FINAL_PAR.
    endloop.

  • How to read data from an internal table into a real table?

    Hello experts,
    I'm relatively new to ABAP and I'm trying to figure out how to read data from an internal table into a table that I created.  I'm trying to use the RRW3_GET_QUERY_VIEW_DATA function module to read data from a multiprovider.  I'm trying to read data from the e_cell_data and e_axis_data tables into a table that I've already created.  Please see code below.
    TABLES MULTITAB.
    DATA:
      query_name TYPE RSZCOMPID,
      s_cubename TYPE RSINFOPROV,
      t_cell_data TYPE RRWS_T_CELL,
      t_axis_data TYPE RRWS_THX_AXIS_DATA,
      t_axis_info TYPE RRWS_THX_AXIS_INFO,
      wa_t_cell_data like line of t_cell_data,
      wa_t_axis_data like line of t_axis_data,
      w_corp_tab like line of t_cell_data.
    s_cubename = 'CORP_MPO1'.
    query_name = 'Z_corp_test'.
        CALL FUNCTION 'RRW3_GET_QUERY_VIEW_DATA'
           EXPORTING
             i_infoprovider           = s_cubename
             i_query                  = query_name
            i_t_parameter            = query_string_tab
           IMPORTING
             e_cell_data              = t_cell_data
             e_axis_data              = t_axis_data
             e_axis_info              = t_axis_info.
    If anyone has any information to help me, I would greatly appreciate it.  Thanks.

    Hi,
    <li>Once you call the function module RRW3_GET_QUERY_VIEW_DATA, lets say data is available in the corresponding tables e_cell_data e_axis_data which you have mentioned.
    <li>Modify your internal table defined for other purpose, with data from e_cell_data e_axis_data like below.
    LOOP AT t_cell_data INTO wa_t_cell_data.
      "Get the required data from t_cell_data.
      MOVE-CORRESPONDING wa_t_cell_data TO it_ur_tab.
      "Modify your internal table wih data
      MODIFY it_ur_tab TRANSPORTING <field1> <field2> <field3>.
    ENDLOOP.
    LOOP AT t_axis_data INTO wa_t_axis_data.
      "Get the required data from t_cell_data.
      MOVE-CORRESPONDING wa_t_axis_data TO it_ur_tab.
      "Modify your internal table wih data
      MODIFY it_ur_tab TRANSPORTING <field1> <field2> <field3>.
    ENDLOOP.
    Thanks
    Venkat.O

  • How to read data directly from clusters

    hi all,
    how to read data directly from clusters
    Thanx in advance,
    amruta.

    Using macro:
    RP-IMP-C2-B2.
    RP-IMP-C2-B1.
    RP-IMP-C2-ZL.
    ....etc.
    For TM cluster, U also can use BAPIs like HR_TIME_RESULTS_GET
    More details see SAP HR course 350(HR Programming)

  • Help me,  How to read data from USB ???

    Help me, How to read data from USB ???

    If its a disk on key or some portable hard drive than once its connected to the usb and recognized by the system you can access it through java like you would access your hard drive.

  • JTable, how to read Data from it when enter is pressed

    How to read Data from JTable on Return or lost focus from cell.
    Also please tell me which listener I should should.
    thx for help

    You should read the tutorial about tables, cell editors and models.
    Also you should not [url http://forum.java.sun.com/thread.jsp?thread=472677&forum=57&message=2186815]crosspost
    Mike

  • How to merge two search button from different criteria

    How to merge two search button from different criteria
    this image show the question
    http://s24.postimg.org/4algthuj9/1111.jpg
    two different criteria for the same view and I need to merge it in one button as when I click
    on the button search result give from two criteria parameters

    You can!t using af:query. the af:query component comes as is. If you can't do it through the properties, you probably can't do it at all.
    As in your other thread, the way to go is to program your own search form. This way you can use a layout and functionality you like.
    For this you create a form with input fields for the values you are searching for, put them on hte page in a way you like and in the end by hitting on a button (e.g. called Search) map all inputfields to parameters of a service method you defined in your application module or VO. This service method then executes a view criteria returning all matches in the default iterator (just as if you had used af:query.
    Timo 

Maybe you are looking for

  • Runtime exception in mapping

    Hi Gurus,          In my scenario, while testing the scenario Iam getting the error in MONI as "During the application mapping com/sap/xi/tf/_MM_NUNACE_SR3_01_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message

  • How to switch off my main screen (Imac 24") to use an external proyector?

    Please Help! How to switch off my main screen (Imac 24") to use an external proyector? It's not comfortable when you want to see a nice movie! Thanks Jack

  • Update of confirmed quantity to the equivalence number in Settlement Rule

    We are in IS - Mill. Combined order is created with child orders. GR is done against Child Order. Is it possible that after TECO is done for Combined Order, the individual GR qty gets updated in the Equivalnce field of the Settlement rule of the Comb

  • Weblogic RMI question

    I am trying to implement a basic RMI class, using the example in "Programming Weblogic RMI" book. I used java rmic instead of wls rmic. The only difference from the book example is that I am tyring to bind remote object implementation from within a s

  • Maintaining session among Web Applications

    Hi! I would like to know if there is a good solution for this purpose: maintain the session in three, four or more web applications. We know that if a user navigates through the pages that belong to only one of the web apps, the session can possibly