DAQ Quadrature Code Example and Simulated Mode

Hi,
I have what I hope is a quick question:
I currently am trying to develop .Net software for an NI-DAQmx device. I am
attempting to read data from either 1 or 2 attached quadrature devices sampled
at 1000hz with the resulting data streamed to a file on a Windows machine. I
was wondering which code example(s) would be applicable and how I can run the
example both in simulated and live modes.
Thank you,

Hi, you can find those examples on your computer. You just have to go to the NI-DAQ folder under National Instruments on your C drive. For example on my computer the file path is this : C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples  in there you can find many examples of text based DAQmx.

Similar Messages

  • Recording Demo and Simulation Modes

    Prior to beginning my recording session, I'm selecting the
    Demontration and Training Simulation mode. When I complete the
    recording and save, Captivate prompts me with a "Project to Open"
    field that contains: Demonstration or Training Simulation. My goas
    was to have the first section of the project as a demonstration and
    the subsequent section as a Training Simulation. How do I combine
    both the Demonstration Mode and Training Simulation Mode into one
    file? It appears that although Captivate allows you to record in
    both modes, you must save in one or the other????

    Welcome to our community, Curtis
    As you have seen, Captivate does create two files when you
    record that way. However, it doesn't mean you can't have both in a
    single project if you like. But before you do that, please note
    that projects DO have a suggested maximum size. Adobe Technical
    Support seems to be advising folks that 50 Megs for the CP (source)
    file of your project is considered the upper limit. Personally, my
    recommendation has always been 50-65 slides as a very broad and
    general rule of thumb. So if each project is already at or beyond
    that size, I wouldn't go there with having both in a single
    project.
    Assuming the combined project would fit within those
    guidelines, you may open one project, then click File > Import
    > Slides/Objects... and point at the other file to bring it in
    and combine it with the original. Note that you would want to first
    select the last slide in the original project, so that the new
    stuff would follow that slide and append.
    Assuming this would create a project that is too large to
    handle, you should consider leaving them as separate projects, then
    using what we call a "Daisy Chain" so the next is opened by the
    project as the first ends.
    For information on Daisy Chaining,
    Click
    here
    Cheers... Rick

  • Can't see any difference between two code examples

    Hi,
    I wonder, what is the difference between these two code examples?
    In my eyes they do the same thing, or?
    protected void processWindowEvent(WindowEvent e) {
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    dispose();
    super.processWindowEvent(e);
    public void actionPerformed(ActionEvent e) {
    if (e.getSource() == button1) {
    dispose();
    /A

    Where did you learn Swedish? You wrote it right but this sentence: "Mig sj�lv, jag kommer fr�n....." is not quite right. You have to write it like this: "Sj�lv s� kommer jag fr�n ...." or "Jag kommer fr�n....".
    When I wrote "or" before, I meant or like in "right or wrong" not like in "eller hur".
    I'm born in Poland but i moved to Sweden when I was 6,5 years old.
    I have one more question about the window-closing-thing:
    In an other file it looks like this:
    private class SymWindow extends java.awt.event.WindowAdapter
              public SymWindow(){}
                        public void windowClosing(java.awt.event.WindowEvent event)
    jMenuFileExit_actionPerformed();
    ////////this comes after that one above//////////
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING){
    jMenuFileExit_actionPerformed();
    In this file you can choose to exit the program by choosing exit from a menu or just click in the upper right corner (the cross). If you have a file open, don't save it and want to exit, a message will appear with a question if you want to save. This worked fine from the beginning but to this message I added a cancel button (before it was only yes and no). This didn't work. I took away the second code example and and added this: "setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE)" to the first one and everything works fine. The three buttons work if I choose exit from the menu or if I click the cross. Is it right?
    By the way, thanks for your help
    /A

  • When i run a sequence with ivi step types in simulation mode i get the error code number BFFA0015 - Types do not match.

    When i run the sequence with ivi step types in simulation mode i get the error Types do not mathc. The step that generates this error is an IviScope step type and is configured as a measurement. Th weird thing is that in real mode is working perfectly. I have three measure steps and i get the error in all of them. The exact error message is:
    UUT Result: Error, Error executing substep 'Post'. An exception occurred calling 'RunStep' in 'ISubstep' of 'TestStand Ivi Step Types 1.0 Type Library' An error occurred while executing the step. Component Works IVI Control Error: The IVI Read operation failed on channel '1' for logical name 'SampleScope'. Details: (1
    ) Types do not match. [IVI Error Code: BFFA0015] Source: TSIviStepTypes [Error Code: -30721, User-defined error code.]
    Can someone tell me how to fix this problem?. It seems to me that the simulation generates a diferent type of measurement of that generated in real mode.

    Update:
    The simulation driver appears to be raising the error. By switching to specific driver simulation the error does not occur. This may be a problem in either the class simulation driver or the specific driver.
    Scott Richardson
    National Instruments

  • Region Monitoring iOS 7 : didEnterRegion method is not calling when app is killed by user or by OS in iOS 7 only. It is working fine when it is in background. and the same code is working fine with iOS 6 for both app in suspended mode and background mode.

    Region Monitoring iOS 7 : didEnterRegion method is not calling when app is killed by user or by OS in iOS 7 only. It is working fine when it is in background. and the same code is working fine with iOS 6 for both app in suspended mode and background mode. What changes I have to made to work great in iOS 7 also.

    I rewrote code for debugging purpose and tried to catch error using GetLastError();  method,
    but it only printed 0. Below is code snippet; I think Create() throw an exception
    and code goes to catch block. 
    LONG ConnectTS(CString strIP, UINT n_Port)
    try{
              ErrorLog(0,0,"ConnectTS is calling Create [is going to call]","");
              if(!Create())
    // Exception Line
    n_Err = GetLastError();
    return NET_INIT;
    catch(...)
                       DWORD errorCode = GetLastError();
                       CString errorMessage
                       errorMessage.Format("%lu",errorCode);
                       ErrorLog (0, 0, "Image
    System", (LPTSTR)(LPCTSTR)errorMessage);
                       return  IS_ERR_WINDOWS;
    Output: -
    ConnectTS is calling Create [is going to call]
    Image System
    0

  • I need code example for server act as client and vice versa

    Hi all,
    I want code example for performing both server and clients using RMI. I mean Server will act as client and client will act as server. So a single program will act as both client and server .
    Please give example, it will helpful to complete my project. I am struggling in this stage. Its like peer to peer action.
    Thanks & Regards
    R.Ragupathi

    1. The tutorial shows you how to do cleint/server.
    2. Search on the topic "callback" to see how cleint and server roles can be reversed.

  • Control Design and Simulation and DAQ

    I'm learning Control Design and Simulations. I have some questions about it.
    1. For System Identification use, we can find the transfer function/model of the system by feeding data measurement from the system. But, how long data do we need to be sufficent for Identification System to estimate the model? Until the get saturated value (steady state)? or any other intervals? What if the system is unstable? How will Identification System Toolkit estimate that case?
    2. For connecting to hardware, we just connect the clock in the simulation loop to the hardware? And the simulation loop will simulate the blocks inside once it got the trigger/data from the DAQ? what about the step time and solver? Do they follow the timing from hardware? or they will run on their own supplied values/clock?if we use USB DAQ, we can't have any clock from it (as far as I know it's because USB connection is not that stable for clocking since it might be any jitters or delays.) So, how do we configure the timing parameter for USB DAQ?
    3. There is possibility to convert model in transfer function to state space, how do we know the states inside that conversion?
    Any helps would be great...
    Thanks in advance...

    Dear Chin ho,
    After going through your questions I found some documentation which will be useful for you. But I you still have more questions, you can reply me any time.
    1- About the data and amount of it I couldn't find any info but maybe you can use the new functions in LV version 2009 and find your answer.
    Estimating States of Nonlinear Stochastic State-Space Models with Extended Kalman Filters
    In previous versions of the LabVIEW Control Design and Simulation Module, you can use the Discrete Kalman Filter function and the Continuous Kalman Filter function to estimate the states of a linear discrete or linear continuous stochastic state-space model, respectively. In the LabVIEW 2009 Control Design and Simulation Module, you can use the Continuous Extended Kalman Filter function and the Discrete Extended Kalman Filter function to estimate the states of a nonlinear continuous or a nonlinear discrete stochastic state-space model, respectively.
    The Continuous Extended Kalman Filter function and the Discrete Extended Kalman Filter function estimate model states of a partially observable plant based on noisy measurements. First, use the SIM Discrete Nonlinear Plant Model template VI or the SIM Continuous Nonlinear Plant Model template VI, located in the labview\templates\Control and Simulation directory, to define the system model. Then use the the Discrete Nonlinear Noisy Plant function or the Continuous Nonlinear Noisy Plant function to simulate the discrete or continuous nonlinear model, respectively, with the addition of noise. Finally, use the Continuous Extended Kalman Filter function or the Discrete Extended Kalman Filter function to estimate the states of your model.
    The Continuous Extended Kalman Filter function and the Discrete Extended Kalman Filter function linearize the nonlinear system either by calculating a Jacobian matrix internally or by using an external Jacobian matrix that you define. Use the SIM Continuous Jacobians template VI or the SIM Discrete Jacobians template VI, located in the labview\templates\Control and Simulation directory, to define an external Jacobian matrix.
    Refer to the LabVIEW Control Design User Manual, accessible by navigating to the labview\manuals directory and opening CD_User_Manual.pdf, for more information about estimating the states of nonlinear stochastic state-space models with extended Kalman filters.
    2- I think that I found a pdf document about this part of your question which will be helpful. If you would like to give your email address, I can send it to you.
    3- About this part you can check the help function in LabVIEW when you open the "CD Convert Transfer function To State-space" function in your front panel.
    I pasted some info about the mathematic part below.
    The LabVIEW Control Design and Simulation Module provides tools to study the dynamics of systems described by linear time-invariant (LTI) continuous and discrete models. You can create deterministic state-space, transfer function, and zero-pole-gain models. You also can create stochastic state-space models and the second-order statistics noise models.  You can use these forms to describe both single-input single-output (SISO) and multiple-input multiple-output (MIMO) systems.
    Continuous transfer function and zero-pole-gain models use the s variable to define time, whereas discrete transfer function and zero-pole-gain models use the z variable to define time.  Continuous state-space models use the t variable to define time, whereas discrete state-space models use the k variable to define time. 
    Deterministic State-Space Model
    Continuous
    x(t) = Ax("t) + Bu(t)
    y(t) = Cx(t) + Du(t)
    Discrete
    x(k + 1) = Ax(k) + Bu(k)
    y(k) = Cx(k) + Du(k)
    Stochastic State-Space Model
    Continuous
    x(t) = Ax(t) + Bu(t) + Gw(t)
    y(t) = Cx(t) + Du(t) + Hw(t) + v(t)
    Discrete
    x(k + 1) = Ax(k) + Bu(k) + Gw(k)
    y(k) = Cx(k) + Du(k) + Hw(k) + v(k)
    Second-Order Statistics Noise Model
    Q = E{w . wT} – E{w} . ET{w}
    R = E{v . vT} – E{v} . ET{v}
    N = E{w . vT} – E{w} . ET{v}
    where
    t is continuous time.
    k is the model sampling time multiplied by the discrete time step, where the discrete time step equals 0, 1, 2, …
    x is the model state vector.
    u is the model input vector.
    y is the model output vector.
    w is the process noise vector.
    v is the measurement noise vector.
    A is an n × n state matrix of the given model.
    B is an n × m input matrix of the given model.
    C is an r × n output matrix of the given model.
    D is an r × m direct transmission matrix of the given model.
    n is the number of model states.
    m is the number of model inputs.
    r is the number of model outputs.
    G is a matrix relating w to the model states.
    H is a matrix relating w to the model outputs.
    Q is the auto-covariance matrix of w.
    R is the auto-covariance matrix of v.
    N is the cross-covariance matrix between w and v.
    E{} denotes the expected value or the mean of the enclosed term(s).

  • IDOC with example and T.codes ??

    hii
    Some body explain me about the scenario and steps to be followed in configuration and in front process with transaction codes .
    Jus some experts can explain me about over all procedure of IDOC in SAP with transaction code (Full cycle with examples...??
    In MM , exaplin me with some examples and with transaction codes ..
    Thanks

    Check these links
    [IDOC Configuration|http://sapmm.posterous.com/idoc-configuration]
    [Learn SAP u2014 IDOC basic|http://blogs.moovar.com/sap/learn-sap-idoc-basic/]
    1) What is IDOC?
    IDoc means intermediate document is a standard data structure for electronic data interchange (EDI) between application programs written for the popular SAP business system or between an SAP application and an external program. IDocs serve as the vehicle for data transfer in SAP's Application Link Enabling (ALE) system.
    2) Why its is used with SAP?
    IDocs are used for asynchronous transactions: each IDoc generated exists as a self-contained text file that can then be transmitted to the requesting workstation without connecting to the central database. Another SAP mechanism, the Business Application Programming Interface (BAPI) is used for synchronous transactions.
    3) What its advantages & disadvantages?
    a) IDOC - Advantages :
    The target system need not be always online. The IDOC would be created and would send the IDOC once the target
    system is available.
    No additional programming required. Configuration is the only one need to be set up.
    b) IDOC - Disadvantages :
    Receipt/Processing on the target system need not be immediate
    When no standard IDOC is available, then it is very hard to create a custom IDOC when compared to creating a
    standard BAPI
    Unless ALE is used, it is difficult to trace if the IDOC has actually reached the target system
    4) IDOC flow with MM :
    In order to make use of the workflow for IDoc processing, you do not have to go through the cumbersome
    workflow design procedure as it is described in the workflow documentation. For the mentioned purpose, you can
    register the workflow handler from the menu, which says Event Coupling from the BALD transaction.
    Triggering the IDoc from a workflow event has a disadvantage: if the IDoc has to be repeated for some reason, the
    event cannot be repeated easily. This is due to the nature of a workflow event, which is triggered usually from a
    precedent action.
    Edited by: Afshad Irani on Aug 26, 2010 5:48 PM

  • T code VL06C and VL06G in Display mode

    Hi sap gurus.........
    I want to know that is there any other t codes present in sap in which a user can get same information as he get by t code VL06C and VL06G but in display mode only.
    Parveen

    Dear Praveen,
    Why do you need alternate transactions with same purpose? What is your requirement?
    Few useful Transactions:
    VL06                 Delivery Monitor                    
    VL06C                List Outbound Dlvs for Confirmation 
    VL06D                Outbound Deliveries for Distribution
    VL06F                General delivery list - Outb.deliv. 
    VL06G                List of Oubound Dlvs for Goods Issue
    VL06I                Inbound Delivery Monitor            
    VL06IC               Confirmation of putaway inb. deliv. 
    VL06ID               Inbound Deliveries for Distribution 
    VL06IF               Selection inbound deliveries        
    VL06IG               Inbound deliveries for goods receipt
    VL06IP               Inbound deliveries for putaway      
    VL06L                Outbound Deliveries to be Loaded    
    VL06O                Outbound Delivery Monitor           
    VL06P                List of Outbound Dlvs for Picking   
    VL06T                List Outbound Dlvs (Trans. Planning)
    VL06U                List of Uncheckd Outbound Deliveries
    Regards,
    Naveen.

  • Phone stuck in recovery mode error code 40 and would not restore

    My Iphone 3GS stuck in recovery mode error code 40 and would not restore.I was with AT & T.Please help!

    Hi there...
    Actually I was stuck with this situation yesterday. Here is what I did to overcome this issue: I hope it helps.
    To start with, here are few things to you should make sure of:
    1- You have the latest version of iTunes. You may try to uninstall and reinstall iTunes.
    2-Restart your Windows.
    If still no luck, try editing the Hosts file, here is how;
    1- click on RUN then copy and paste the following:
    notepad c:\windows\system32\drivers\etc\hosts 
    2- look for gs.apple.com
    3- if there are numbers infront of it just delete them or just type # before the numbers.
    4- Save the file and try restoring again.
    Note: you should have administror access to edit the Hostes file.
             put your iphone in DFU mode before restoring.
    I hope this helps. It did for me

  • Simulation mode for PCI-5640R

    Hi,
    I am evaluating whether to buy a PCI-5640R (or PXI-5641R) card for a project.   I would like to prototype the code first to see if what I want to do would work.  Is it possible to use the 5640R driver in simulation mode, without a physical card installed?   M-series daq cards support this, is there similar support for 5640R / 5641R/
    thanks in advance
    greg

    Hi Greg,
    You can simulate the use of your IF Transceiver code before you make a decision on whether or not to purchase. There are a couple caveats though. First, you must have the NI-5640R driver installed in order to find that device as a simulated device. The other thing is that you'll need to have the LabVIEW FPGA module already purchased and installed. If neither of these are issues, then you are good to go for prototyping. I recently updated the instructions on how to set your IF-RIO FPGA project for simulation that you can find HERE.The updates that I made to include the IF-RIO may not be live yet, but should be up within the next day. Those instructions should get you rolling. Enjoy!
    Chris W

  • DAQ Express code reporting wrong DT.

    All,
       I have an odd problem where a bit of DAQ Express code is reporting the wrong DT consistently. This occurs with both the hardware device and a simulated device. I've attached screenshots detailing everything I found relevant to the problem as well as the source code.
    You can download the files here.
    http://sites.google.com/site/xkenneth/downloads 
    Regards,
    Ken 
    Solved!
    Go to Solution.

    Hi Ken,
    Thanks for posting to the NI Discussion Forums! From your pictures, I saw that you are using an NI-9239. From page 16 of the NI-9239 Operating Instruction and Specifications,
    it explains that the valid rates for sampling are derived from the
    timebase by first dividing this value by 256. Then, the value may
    further be divided down by an integer value from 1-31. Thus, valid
    sampling rates may be as high as 50 kS/s down to 1.613 kS/s when using
    the internal timebase of 12.8 MHz.
    In your case, you have specified a
    sample rate of 300 S/s, which is much less than the lowest possible
    rate of 1.613 kS/s. Therefore, the board is coercing this value up to
    1.613 kS/s and the inverse of this is the dt value you are seeing,
    which is 0.00062 seconds. To get an actual sample rate less than this
    value, you will need to provide an external clock. For example, to
    achieve a clock rate of 300 S/s, you would need to provide an external
    clock at an integer multiple of 76.8 kHz (up to 2.3808 MHz).
    Also, thanks for adding the attachments to your post. This gives other users easier access to the information to both provide help
    and also to be able to view all the relevant information when exploring
    the post in the future (in case anyone else runs into the same type of
    problem). In any case, thanks again for the post and for all the
    details of your problem! Cheers,
    Daniel S.
    National Instruments

  • How to use a single page for create and update mode.

    Hi,
    I need to develop a single page to be used for both create and update modes.
    I am going to use a variable MODE
    and i will set this in the emp summary page.
    Based on the button clicked by the user i have to render the JSF page.
    For tis if the user selects a perticular and cliks on update thn i will pass the empno to the next.
    so there in the next i will appy a ViewCreiteria on my View Obj to fetch only that row so that only that emp will be displayed ion update mode.
    This is working fione for me.
    So now the issue is
    when the user clicks on CreatEmp button.
    i need to enable my VO for insert operations.
    for this i wrote the code like this in the beforePhase event
    FacesContext ctx = FacesContext.getCurrentInstance();
    ValueBinding valBinding = ctx.getApplication().createValueBinding("#{data}");
    BindingContext bContext = (BindingContext) valBinding.getValue(ctx);
    DCDataControl dcControl = bContext.findDataControl("DataControl");
    Application app = ctx.getApplication();
    ApplicationModule am = (ApplicationModule) dcControl.getDataProvider();
    System.out.println("After Appmodule initiation");
    // get the VO reference and initiate the query
    System.out.println("Before Page VO initiation");
    PrismDmPageSectionViewImpl vo = (ViewImpl)am.findViewObject("View");
    //ViewRowImpl row = (ViewRowImpl) vo.createRow();
    /* TO CREATE AN EMPTY ROW*/
    Row row=vo.createRow();
    System.out.println("New Row is created");
    //vo.createKey(row);
    vo.insertRow(row);
    vo.setCurrentRow(row);
    By doing this a new empty page is rendered.
    But when i fill up the values and click on ok.. i am getting the error like this..
    JBO-27023: Failed to validate all rows in a transaction.
    JBO-27027: Missing mandatory attributes for a row with key null of type View3
    JBO-27014: Attribute Id in View3 is required
    JBO-27014: Attribute PageeId in View3 is required
    Please point me out where i am missing.
    Thanks

    Hi,
    In my opinion you are over complicating things.
    This is what I do for using the sme page as both create and update without all this code.
    1) Create a browse page containing a an adf table with a select one component bound to your view object.
    2) Create an additional edit page containing only an edit form containing fields of your view object that your users must enter in order to add or edit rows.
    3) Link the pages in the JSF diagram with an "edit" navigation case from browse to edit page and a "return" navigation case from edit to browse (make sure that redirect option is NOT set on both cases)
    4) Remove the submit button from the edit page and add two application module bindings for the commit and rollback operations as command buttons in the form footer facet. Make sure that both buttons has an action of return and that their disabled property is set to false. You will probably change their labels to ok and cancel respectively.
    5) Drop a create action for your view object from the data control palette inside your page as a command button and set the action property to edit also.
    3) Set the action property of the view button to edit
    This should basically work without any code from your part. -- at least it does so for me -- if you like to make it a bit more funcy you may add am action listener inside your buttons and set a requeScope variable for example #{requestScope.editing} to true or false depending on the button clicked. Then add a title to your page with a value like #{requestScope.editing == true ? 'Editing record' : 'Adding a new record'}..
    Hope that helps.
    Thanassis

  • Multiple Infotype operation in simulation mode

    Hi All,
    We have a requirement to first delete a infotype record and then add another record in simulation mode or to add multiple new record in simulation. Can you please let me know how to implement this functionality.
    Thanks in advance.
    Srikanta

    Hi Raj,
    <li>I tried the with the below code. It worked for me. Can you please check this way.
    REPORT  ztest_notepad .
    DATA:p0015  TYPE p0015.
    DATA:return LIKE  bapireturn1.
    p0015-pernr = '00909089'.
    p0015-subty = '1500'.
    p0015-endda = '99991231'.
    p0015-begda = sy-datum.
    p0015-lgart = '1500'.
    p0015-betrg = '100.00'.
    CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
      EXPORTING
        number = '00909089'.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
      EXPORTING
        infty         = '0015'
        number        = '00909089'
        subtype       = '1500'
        validityend   = '99991231'
        validitybegin = sy-datum
        record        = p0015
        operation     = 'INS'
        tclas         = 'A'
      IMPORTING
        return        = return.
    WRITE return.
    CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
      EXPORTING
        number = '00909089'.
    Thanks
    Venkat.O

  • Control design and simulation module

    Hi,
    I am new to Labview and i am trying to work on Control System design. I have downloaded and installed the Evaluation Module of Control Design and Simulation Module. The problem I am facing witht this is its not showing any control fuctions in functions Palette. While installing it said its installing only control design and simulation assistant. Please, can anyone help with this.
    I am actually looking at this module to implement Sliding mode control for non linear systems. I would like to know if there are any examples to implement this??
    Thank You.

    Hello
    The problem is the following. The version of LabVIEW that you are using does not match the version of the evaluation version of LabVIEW Control Design and Simulation Module (CD&SIM). If that happens, the installer will not select the support files for your LabVIEW. If you download LabVIEW 2011, then you must install CD&SIM 2011.
    Now, the module in the current version does not have an example with sliding mode control. But using this module, you can easily implement the algorithms and simulation its result using the Control and Simulation Loop.
    Hope this helps.
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments

Maybe you are looking for