How to combine the analog input and analog output vi's

Hi !
I have a perfectly running triggered analog input acquisition vi. I have a seperate vi for analog output that's running perfectly too. Can someone tell me how to combine these two operations so that I could get a vi that does simulataneous AI and AO without missing triggers. I have tried all the different kinds of configurations suggested by NI support but nothing seems to work. Can someone help ?
thanks,
Shiva
Attachments:
dac_good.vi ‏77 KB
adc_good_fw.vi ‏124 KB

Shiva;
I'm attaching a good Application Notes that shows how to synchronize multiple DAQ tasks, in Labview.
Hope this helps.
Filipe
Attachments:
Advanced_Sync_Techniques_for_DAQ.zip ‏166 KB

Similar Messages

  • When using the analog inputs and analog outputs of the PCI-7344, what is the conversion between the voltage entering the card to counts? Similarly, what is the conversion between counts to voltage at the output of the card?

    I am using the PCI-7344 to control my system. The analog inputs are connected to the output of my system while the analog outputs serve as feedback to the system. The system is a servo. I want to know what is the conversion between the voltage read at the input, to card counts, and finally to the voltage output to the system.

    Carole,
    If you are trying to do analog feedback with a servo motor, Chapter 14 of the manual talks about how to set up the torque feedback. Also linked below is a LabVIEW example of analog feedback.
    Chapter 14
    NI-Motion User Manual
    Automatic Analog Feedback with FlexMotion example
    A. Talley
    National Instruments

  • Difference in analog input and analog output values

    i am using 6014 DAQ card for providing motor speed reference voltage to Driver and reading back speed
    feedback voltage using LabVIEW 6.0. For this i have used AO Single Update and AI Single scan. Both are in the same while
    loop.The loop has a Wait timer of 50ms. When i take a plot of Analog o/p and input, i get a shift
    between input and output. Why is the shift or the time not synchrnised..please help..When the while loop wait timer is 200ms instead of 50ms, the shift is not there.

    I believe the problem is 2 fold. First if you are using traditional DAQ, or DAQ 6.9.3 or before, the driver is single threaded. Therefore the 2 VIs will not run simultaneous. Try DAQmx and you may be more successful.
    The other is that you are using higher level 1 point VIs. In general they are not the best to use in a time sensitive loop. You are better off using hardware timing, rather than software timing. With hardware timing you have more control over the synchronization of the 2.

  • Simultaneous Analog In and Analog Out

    How to Output on Analog Out and read Analog In at the same time.
    I am using a VC++, NIDAQ 7.01.
    No LabView.

    Greetings,
    The following example demonstrates how to perform synchronized analog input and analog output:
    Synchronizing Analog Input and Output
    The example was written in CVI, but modifying it for use in VC++ is fairly straightforward and documented within the code.
    Good luck with your application.
    Spencer S.

  • How to synchronize analog input and output from two different USB daq boards

    Hi all,
    I have two very differnt USB boards the NI USB 6008, which I am using to acquire the data (Analog Input) and a NI USB 9263, it is an Analog Output only board that I am using to deliver a signal (in this case a square pulse). The reason why I am not using the 6008 Analog Ouputs is because I need to deliver negative voltages and need the full +/-10V range.
    Looking at similar posts I am pretty sure that I can't use an external trigger or a shared clock, I also tried to use the synchronization of timed structures but no cigar.
    I am including a quick vi that I whipped out showing how the signal jitters due to the lack of synchronization. The AO from the 9263 connects to the AI in the 6008 in this example.
    Solved!
    Go to Solution.
    Attachments:
    Test Pulse.vi ‏117 KB

    I talked to a specialist in the phone and tols me that it is not possible.

  • Can we acquire the Analog input and Digital Input at

    Can we acquire the Analog input and Digital Input at
    the same time? My sensor data include Analog and
    digital signals.

    Hi Chenchen,
    It usually simplifies things greatly if you use analog inputs to monitor both the analog signals AND the digital signals.
    If you abosulutely HAVE to use digital lines, then the answer is, DEPENDS....
    With the correct hardware and depending on how fast you want to collect data and how closely the measurements have to be syncronized in time, it can be done.
    But first, concider using analog inputs to monitor all signals.
    If you need to move forward with both analog and digital acquisitions, then post a new quesion and give us details on the hardware you are using and the other details we will need to advise you.
    Trying to help,
    Ben
    Ben Rayner
    Certified LabVIEW Developer
    www.DSAutomation.com
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to get signal from analog input and send it to analog output (real-time​)

    Hi everyone,
    I am doing simple task in Visual C++ and I am using PCI-6221(37 pin).
    Basically, I want to send same signal from 'analog input' to 'analog output'
    at the same time (almost), to make it real-time application.
    Can someone please provide me sample program. 
    I would appreciate if you could provide me with the good tutorial which explains
    step by step everything about programing NI-DAQmx for C/C++.
    Best Regards,
    Khassan
    Solved!
    Go to Solution.

    This is my code in C++, you can optimize it if it looks too messy. This code reads signal from analog input and outputs it through analog output. 
    To make this code work additional  include directories and library directories must be added from NI.
    I hope it helps someone.
    #include <stdio.h>
    #include <conio.h>
    #include "NIDAQmx.h"
    #include <math.h>
    #define DAQmxErrChk(functionCall) { if( DAQmxFailed(error=(functionCall)) ) { goto Error; } }
    int main(int argc, char *argv[])
    int32 error=0;
    TaskHandle taskHandleRead=0,taskHandleWrite=0;
    int32 read=0;
    float64 dataRead[1000];
    char errBuffRead[2048]={'\0'};
    char errBuffWrite[2048]={'\0'};
    bool32 done=0;
    int32 written;
    DAQmxErrChk (DAQmxCreateTask("",&taskHandleRead));
    DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandleRead,"Dev1/ai0​","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Vo​lts,NULL));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleRead,"",100.0,DAQ​mx_Val_Rising,DAQmx_Val_ContSamps,0));
    DAQmxErrChk (DAQmxCreateTask("",&taskHandleWrite));
    DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandleWrite,"Dev1/ao​0","",-10.0,10.0,DAQmx_Val_Volts,NULL));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleWrite,"ai/SampleC​lock",100.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1​000));
    DAQmxErrChk (DAQmxStartTask(taskHandleRead));
    DAQmxErrChk (DAQmxStartTask(taskHandleWrite));
    while( !done && !_kbhit() )
    DAQmxErrChk (DAQmxReadAnalogF64(taskHandleRead,1,10,DAQmx_Val_​GroupByScanNumber,dataRead,1000,&read,NULL));
    DAQmxErrChk (DAQmxWriteAnalogF64(taskHandleWrite,read,0,10.0,D​AQmx_Val_GroupByChannel,dataRead,&written,NULL));
    _getch();
    Error:
    if( DAQmxFailed(error) )
    DAQmxGetExtendedErrorInfo(errBuffRead,2048);
    DAQmxGetExtendedErrorInfo(errBuffWrite,2048);
    if( taskHandleRead!=0 )
    DAQmxStopTask(taskHandleRead);
    DAQmxClearTask(taskHandleRead);
    if( taskHandleWrite!=0 )
    DAQmxStopTask(taskHandleWrite);
    DAQmxClearTask(taskHandleWrite);
    if( DAQmxFailed(error) ){
    printf("DAQmx Error: %s\n",errBuffRead);
    printf("DAQmx Error: %s\n",errBuffWrite);
    printf("End of program, press Enter key to quit\n");
    getchar();
    return 0;

  • Analog Input and Output in One Single VI

    I need help in setting both analog input and output in one single VI. How do I assign channels to be either input or output? How do I simultaneously uses both in one single VI with a while loop structure?? Which AO am I suppose to use to obtain signal from the function generator I have built to feed into the DAQCard-1200?? Help!!
    Attachments:
    Test1.vi ‏48 KB

    One thing you'll need to be aware of is that you will need to DMA lines: one for AI and one for AO. If you don't, then you can configure the DAQCard to do without DMA using the Config VI. But you certainly can do this.
    As far as your function generator, you will want to do a buffered analog output. You will write your buffer of points to the buffer, and then tell NI-DAQ how fast to update your analog output channel with these values.
    So, you can be reading from AI and checking the AO process in the same while loop. Just make sure you handle the while loop execution (the wait it exits) correctly. This can get tricky when you're doing two types of measurements.
    J.R. Allen

  • How can I combine the nav bar and menu bar on the same line to save space?

    Firefox v29 seems to be a huge step backward in customization. I need to save space for content so previously I turned off tabs and combined the menu bar and nav bar on the same line. The url space is way too long anyway. Now with v29 all my customization is gone and I cannot get it back. I can no longer move items on the nav bar to combine it with the menu bar. Why was this done? It only limits my ability to customize my browser? I am very frustrated that you took a great browser and ruined it.

    I get it that Firefox has changed, but the change is for the worse. It makes it impossible to customize menus as I had before v.29.

  • How to temporally match/save Input and Output Channels's data?

    Hello, I have a voltage-input, voltage-output SISO system, and need to indentify its dynamic response (or transfer function) as a reference to a PID control. Without using the system identification toolbox, my goal is to generate/provide a sine sweep input (ranging 1Hz-5kHz for 10sec) to the system and to save the corresponding output response signal as well as the sweep input signal simultaneously.
    I got a sample program online and am trying to modify it as attached, but I really need your advices/comments concerning several problems I am facing with:
    1) With the below setting, the number of the acquired Input channel samples obtained is 5461, which is smaller than expected (i.e., 10000). What would I be missing in setting parameters?
    - H/W: NI-USB-6341 DAQ
    - AO: continuous samples with the waveform timing (1k sampling, 10000 samples => 10 sec, slower sampling just for testing purpose)
    - AI: continuous samples, samples to read: 30k, rate: 1k
    2) I am using flat sequence structure as a way to making the start point of saving AI and AO data same, but wonders if this is a right method or if there is other better approaches. (I had an idea of using an internal clock with "1-sample mode" for sync, but this may not work at the high speed sine sweep like 5kHz, right?)
    3) I just want to provide the sine sweep just once to the system and do not require the "reset" functionality implemented in the original sample program. I failed to remove this "reset" part as I did not fully understand the sample code. If I run the attahed, the generated AO signal is periodically provided to the system. Please give me any advice to modify the program as I want.
    Thanks for your help and valualble time.
    Attachments:
    siso.vi ‏230 KB

    Hi J. Kim,
    To begin, you say you want to synchronize your analog input and output so that they start at the exact same time, yes? To achieve tight synchronization, you need to use DAQmx VIs instead of the DAQ Assistant. There's a good overview of DAQmx VIs  here. There's also a document that deals specifically with synchronization in DAQmx here. Additionally, if you go to Help>>Find Examples in the LabVIEW example finder, you can see many other examples of acquiring data using DAQmx.
    As for your configuration, you have your analog input DAQ assistant wired far before your analog output DAQ assistant in your sequence strucutre, so the dataflow of the program will cause the analog input DAQ Assistant to execute before the output. They cannot be in different sequences if they are executing simoultaneously, and I would not use flat sequences here except to start the two tasks in DAQmx. Where did you find this example?
    Best,
    Dan N
    Applications Engineer
    National Instruments 

  • How to set the table input in Query template?

    Hi all.
    I need to call a Bapi_objcl_change, with import parameter and a table as an input. I have done this, in BLS. I have set the table input in the
    form of xml. In BLS, I get the output(the value gets change in SAP R3, what i have given in BLS).  But if i set the same xml structure  in
    query template, I didn't get the output. Table input parameter does not take that xml source.  How to set the table input in Query template?
    can anyone help me?
    Regards,
    Hemalatha

    Hema,
    You probably need to XML encode the data so that it will pass properly and then xmldecode() it to set the BAPI input value.
    Sam

  • Sample rate off the audio input and out devices do not match - what to do?

    This is fundamental, I know, but nevertheless I can't find my way around it. I get this error message when trying to recor:
    Sample rate off the audio input and out devices do not match
    and am asked to do this:
    Use the appropriate operating system or audio device control panel to adjust the sample rates of the input and output devices to use the same settingt.
    I have defined the sample rate to 44.1/16 bit in accordance with my inbuild soundcardt.
    I am trying to record from LineIn.
    When running on a M-Audio sound card I don't face any problems.
    HP 8560W, sound card IDT/High definition audio Codec
    Any suggestions?
    Knud
    Copenhagen

    You're sure you have set BOTH the input and output settings to 44.1 16 bit?
    Which version of Windows are you running?  There are a number of posts on this forum about how to fully access both the Windows Mixer and the Mixer for your soundcard.  Especially, you need to ensure that all "Windows Sounds" are turned OFF.

  • How to use the selection profile and status profile for production order?

    Hi expert,
       I want to know how to use the selection profile and status profile for production order. what's the usage for these two selection profile and status profile ?
      Please help me.
      thanks in advance.
      george.shi

    Hi George,
    There are are two types of statuses.One is system status and second one is user status.These statuses will tell us current situation of an order.
    We can't change system statuses.But we can create our own statuses through status profile.With this profile we can control user statuses.
    In this status profile,
    1.We define the sequence in which user statuses can be activated,
    2.We define initial statuses
    3. Allow or prohibit certain business transactions.
    Selection profiles are used to select the objects (say production orders) with different status combinations.We assign status profiles to selection profiles in BS42 T-Code.
    Regards,
    Raja.
    Edited by: Rajarao on Oct 30, 2008 6:21 AM
    Edited by: Rajarao on Oct 30, 2008 6:22 AM

  • How to combine the line items of 2 Sales orders into 1 delivry

    how to combine the line items of 2 Sales orders into 1 delivry
    and their process, pre-requisites and tcode

    The prerequisites are:
    1) In the customer master sales area data, shipping tab, there is a field called Order combination. u must tick that.
    2) for the two orders, the sold to party & ship to party must be same
    3) both orders must have created from same plant & shipping points
    4) the line items must have same loading grp.
    5) the both orders sheduline line date must be same.
    transaction code for the same is VL04.
    enter the required data and select the order nos to be processed.
    Do reward points if it is useful

  • How to give the length , cardinality and format when creatin a data type?

    Hi,
    I am new to XI and i wish to know how to give the cardinality ,format and length when creating a data type .Also please let me know how to give the following?
    cardinality --repeating and required
                      non repeating , optional
    thanks and regards

    When you are defining the elements of the datatype there are columns where you can do what you need:
    <b>column type</b>: here you choose the type of data of the element
    it can be a standard type or a user defined one (if you click one time only it should appear an icon in the right for input help: click there and choose the type you need)
    <b>column occurence </b>: in a similar way of column type here you define the cardinality of the element (min occurence and max occurence)
    setting min occurrence: 1, max occurrence 1 or unbounded --> required
            mmin occurrence 0, max occurrence 0, 1 or unbounded --> optional
    about the attributes there are directly the choice between required or optional.
    <b> column details </b>: here you define the length of the  element if it is a string or a lot of other things if the type is a different one.
    I hope this will help you

Maybe you are looking for

  • Crystal report viewer version error

    Now I am tring to call reports in crystal reports server by asp.net.  My server is crystal reports server xi, and for develop I also installed crystal report server client-side part on my develop machine, and crystal reports xi designer xi,r2. My pro

  • Anything similar to MobileMe Gallery?

    I am researching options for my website after MobileMe is gone. I wanted my website gallery to be one nice interactive interface that included photos and videos n the same gallery without the user having to navigate thru several pages of my site. My

  • Can find documents on android

    cant find documents on android

  • Upgrade - 3 way match data conversion

    I am on an upgrade project(erp 6), the question posed to me is: What is the best way to convert data to new system when there is a PO and a GR, but no IR at the moment ? Previously this company did upgrades and for this scenario, left the items in le

  • Defrag my computer

    can I defrag my computer like a PC to help speed up the processing?