How do I acquire two analog inputs simultaneo​usly using a PCI-6052 E series DAQ?

I am using the data to develope transfer functions.

The simple answer is to put the 2 channels of interest in the Channel Control of your VI. Separated them with a comma.
To be honest your question is not very specific. There must be hundereds or thousands of ways to simultaneously acquire 2 analog inputs.
Try looking at the example VIs that ship with the software. Use the Find Examples function of the startup page for LV. Familiarize yourself with the information there and try some likely ones out. At this point you may have some more specific questions to ask.
The descriptions of the VI's are sometimes hard to read, but are usually enough to operate the VI.
Mike

Similar Messages

  • How to write a VI to measure the difference between two analog inputs (voltage)

    I'd like to measure the difference voltage between two analog inputs.
    Could someone write me a VI for it, please?
    I'm new with Labview....
    Thanks a lot!!!

    On the numeric palette, there is a function called subtract. As the
    help for it says, it 'Computes the difference of the inputs.'.
     Since
    this is such a simple process, you need to provide some details on why
    you can't do this. You can wire just about any data type into the
    inputs. Post your code if you need further help.
    Message Edited by Dennis Knutson on 04-05-2009 08:23 AM
    Attachments:
    Subtract.PNG ‏1 KB

  • How can I syncronize the analog input?

    The signal coming from the microphone input of the DSP module, displayed on Waveform Graph, is "slipping".
    How can I syncronize the analog input?
    Thank you!

    Ahh!  You are doing this on the DSP itself.  That would explain the Express VI problem, since you probably do not have floating point available.  A simple level trigger is not hard to code using integer math.  You can use the VIs I mentioned above as a guide (the algorithms should work well with integers as well as floating point) or just do it yourself.  A possible algorithm for a positive going edge trigger is the following:
    Search array until first point is less than level and second is greater than or equal to level (use In Range and Coerce to search).
    Extract array subset from your data starting at the point you just found.
    If you need a particular length of data and are continously acquiring, append data from the next scan onto your data until required length is met.
    If you run into issues, let us know.  Remember that shift registers are your friend.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • 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

  • Two analog input tasks

    Hi,
    I have a VI with two analog input tasks. One outputs a waveform, from which I determine the frequency of that waveform. Another one just samples the signal once, because all I need is to one value from the signal.
    Is there any way to synchronize these tasks? Right now I perform one task then the other because from what I know, you cannot perform two analog input tasks at the same time.
    I've attached a VI. Thanks for the help.
    Attachments:
    Master_v2.vi ‏98 KB

    duplicate post. Try to to keep the same question in one thread. What is wrong with adding all of you channels to the single task as recomended?

  • Can you perform simultaneous timed digital input and output using a PCI-6120?

    Is it possible to do simultaneous timed digital input and output using a PCI-6120? It seems that timed digital operations require using the group read/write commands, which utilize an entire port. Since the PCI-6120 has only 1 digital I/O port, I would like to be able to use 2 lines as outputs and 1 line as input, and do both in a deterministic fashion. i.e. create a digital signal with known pulse widths and read an input line at a known time after the outputs were set. Is this possible to do with only one digital I/O port?

    Hello,
    This can be done in LabVIEW. There is actually an example that installs with NI-DAQ.
    Below is a link to a Knowledge Base that explains how to find the correlated digital I/O examples.
    http://digital.ni.com/public.nsf/websearch/B849664604EB34B886256D12005B5520?OpenDocument
    Just take a look at the example titled �Continuous CDIO with external clock (E).vi�
    Best regards,
    Justin Tipton
    National Instruments

  • How can I measure the frequencies of two analog input signals simultaneously?

    Hi
    I have two AI signals, and I need to determine the frequencies of those signals. The frequencies range from 1-125Hz. I currently have a VI where I can sample one of the signals for 1 second (sampling at 300 Hz for 300 samples) and determine the frequency. 
    I need to read two signals at the same time and get both of the frequencies at the same time, but I can only figure out how to read them individually, so I can read one signal, then one second later I read the second one, then I read the first one again, then the sceond one, etc..  How can I read two signals simultaneously?
    Thanks
    Attachments:
    FreqMeas11.vi ‏41 KB
    FreqMeas11.PNG ‏18 KB

    "at same time", this depends on the hardware, you can do as has been previously stated just set up a 2 channel acquisition and you will get 2 sampled waveforms back.  Most hardware A/D as multiplexed and true simultaneous sampling is not done.  At 125Hz this is not an issue unless you are interested in very small phase changes between the samples.  just keep this in mind if you are expecting samples to be completly synchronized.
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • How to send out two analog signals

    hi
    I'm running Labview 10.0 with a PXI controller 8196 with with an M-series DAQ board 6289 which has 4 analog out ports. What I have done is create a statemachine which controls a multi LED board (57 LEDs arranged in 7 concentric circles, with a centre LED). The state machine moves between various states such as Fixation point on, Fixation point off, Target on, Target off. At the moment I have one Analog out port which outputs a voltage to tell me which state I am in, but I want to know how to configure a second port to say which LED I am turning on. I am controlling the LED with the digital out, and converting a binary to a digital code so I was just going to convert that digital code (by diving it by some factor) and write out that factor to a second port. I've read I can not confiure two Analog out ports on the same board, but instead I have to cluster the outputs together, I'm just not sure now to do that. I've attached my main vi as well as the two subvi's that the main vi calls. I've looked at some of the other threads and the suggestion was to close one port to open the other, that's just not possible in my case as I need to keep both channels open throughout the whole program as the analog out is constantly changing. I'm also recording from up to 25 analog channels at the same time.
    Thanks in advance
    NB. I could only add two of the sub vi's that the main program calls, so the main vi will not work, so if need be I can post the other sub vi in an additional post.
    Attachments:
    VisDisplay_v1.vi ‏121 KB
    Build Table_v3.vi ‏45 KB
    LEDon.vi ‏24 KB

    Hi
    For one of the channels it is a stepping voltage which changes between +/- 5 volts depending of which state of the statemachine the program is in, so it is not just a constant voltage through out the whole task. On the second channel I want to out put a single voltage that would signify which LED is turning on, that would just be a constant voltage, but it would not be the same voltage on both channels. I'm just about to try something else and hopefully that will work.
    Thanks
    Sam

  • How to making smooth the analog input.

    I am trying to get an analog input from a device (torque meter). sending trough compactRIO and using NI 9025 analog module.
    can get the signal, but too noisy. so how to make it smooth.
    any suggestion what to use and what to do. please

    actually I am trying to get analog input from a torque meter, the input is voltage,
    and I am used the NI 9073 compact RIO with the NI 9025 analog module.
    I am able to get the signal, but too much noise.
    so, how to reduce that noise, just get torque signal,
    what should I used,
    any filter such band pass filter or what,
    any suggestion.
    I am still new with the compact RIO and labview, so hope any one expert can help me
    thank you
    regard
    MSyafiq
    Attachments:
    measuring torque.pdf ‏165 KB

  • How to synchroniz​e two analog output with USB-6353 sharing a trigger

    I'm have the need to synchronize two analog output on the same device (USB 6353) sharing a trigger signal on PFI0.
    The programming environement is Visual C++ , and the code I wrote is as following:
    DAQmxCreateTask ("", &Ao0TaskHandle);  // is the task handle for the analog output Ao0
    DAQmxCreateVoltageChan((Ao0taskHandle,"Dev1/Ao0","​",-5.0,5.0,DAQmx_Val_Volts,NULL);
    DAQmxCfgSampClkTiming(Ao0taskHandle,5000.0,DAQmx_V​al_Rising,DAQmx_Val_ContSamps,1000);
    DAQmxCfgDigEdgeStartTrig(Ao0taskHandle,"/Dev1/PFI0​",DAQmx_Val_Rising);
    DAQmxCreateTask ("", &Ao1TaskHandle);  // is the task handle for the analog output Ao1
    DAQmxCreateVoltageChan((Ao1taskHandle,"Dev1/Ao1","​",-5.0,5.0,DAQmx_Val_Volts,NULL);
    DAQmxCfgSampClkTiming(Ao1taskHandle,5000.0,DAQmx_V​al_Rising,DAQmx_Val_ContSamps,1000);
    DAQmxCfgDigEdgeStartTrig(Ao1taskHandle,"/Dev1/PFI0​",DAQmx_Val_Rising);
    DAQmxWriteAnalgF64(Ao0taskHandle,1000,FALSE,10.0,D​AQmx_Val_GroupByChannel,AOdata,NULL,NULL);  AOdata is a buffer containing a sinwave
    DAQmxWriteAnalgF64(Ao1taskHandle,1000,FALSE,10.0,D​AQmx_Val_GroupByChannel,AOdata,NULL,NULL);
    DAQmxStartTask(Ao0taskHandle);
    DAQmxStartTask(Ao1taskHandle);
    What happen as result of the code is that only the Ao0 channel get the sinwave output , but not the Ao1 . It seems the two channels are not synchronized.
    What is wrong in my code?
    Please any help non referred to a LabView soloution , first because I'm not a LavView programmder and secondly the project impose C++ as the unique environement.
    Thanks
    Enky

    It will depend on what you are programming the NI 5112 device with.
    If you are using LabVIEW, you can use the example program attached below. In it, it will show you how this is done.
    If you are using VB, VC++ or CVI, you can look at one of the NI 5112 shipping examples that are installed on your computer. These are located in the VXIPNP folder. For example, the VC++ example would be located here:
    C:\VXIpnp\WinNT\NISCOPE\Examples\c\MStudioC++\5112​Sync
    These examples will show you how to synchronize the two digitizers.
    Let me know if you have any questions about these examples.
    Brian
    Attachments:
    Multiple_NI_PXI-5112_Synchronization_Demo.llb ‏151 KB

  • How to read data from analog input and export it to a file using Components Works

    I've made a simple application (Delphi 5 using the activeX) that read data from analog input channel 0. After I read the data, I want to export it to a file using the Components Works on a 6035E NIDAQ. (I'm not using labview and don't want to use it)
    How can I do that???
    Regards,
    Francis

    Here's a sample code to do this...
    P.S.: If you read only one channel this code won't work.
    function MyFunction: Integer;
    var
    Low, High, i, j, ChannelCount, RowCount: Integer;
    Po: P;
    begin
    //you are reading multiple channel
    ChannelCount := VarArrayHighBound(Buffer, 1);
    RowCount := VarArrayHighBound(Buffer, 2);
    for i := 0 to ChannelCount do begin
    for j := 0 to RowCount do begin
    WriteToDisk(Buffer[i, j]));
    end;
    end;
    end;

  • 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;

  • How to set the gain and input coupling for each channel on a NI 4462 DaQ card?

    I've seen a few examples in how to set the gain for NI 4462, but none tell me how to chose the channel I wish to set this gain.  Also the same problem with input coupling
    Does anyone know how to set the gain and input coupling for each individual channel?
    Thanks,
    Hector
    LabView 8.5 Windows XP

    Hey Hector,
    http://forums.ni.com/ni/board/message?board.id=100&thread.id=1688
    This has a few examples of how to do that.  Let me know if you have further questions.
    Have fun!
    -gaving

  • Aquire two analog inputs & How to put in array

    Hi ,
    I am a new to labview ,please help me out in following Querry .
    I am having DAQ card  6341 , I want to capture two signals as showed in image of analog type . whenevr the first signal is changing trasition from 0 v to 5v  i have to start capture the rising edges of secong signal & when first signal transit from 5v to 0v , I have to stop counting the edge of secong signal & store the counted value in array .
    Please help me . I am scrating my head from long time in this .
    Thanks & regards
    Nitin
    Attachments:
    labview_ques.JPG ‏68 KB

    Hi gerd
    Sorry to disturb you again and again
    You seems to be a good person .
    I Hightlighted  red in check .png  , which i am not able to find in my fuction pallete.
    Thanks
    Nitin
    Attachments:
    check.jpg ‏71 KB
    virtual_channel .png ‏119 KB

  • How can I display an analog input to PXI-5105 out on LabVIEW?

    Hi ALL,
    I am very very new to LabVIEW and I just started to fiddle around with it. I am running LabVIEW 2010 SP1 version on Windows 7 OS. I also have NI PXIe-1073 chassis with PXIe-6361 and PXI-5105 modules and the chassis is connected to my PC via PCI. I was getting myself acquainted with the devices and was trying to see some analog signals to one of the channels on the PXI-5105 module in a graph in LabVIEW.
    I would appreciate your helps. 
    Solved!
    Go to Solution.

    Hello Henokview!
    I would like you to read through these tutorials to understand the programming steps of NI-SCOPE and NI-DAQmx. After reading these links below you will be able to understand how to connect output from a readfunction to a graph or chart.
    DAQmx
    http://www.ni.com/white-paper/5434/en
    NI-SCOPE
    http://www.ni.com/white-paper/3382/en
    Best regards
    Jonas
    Best Regards
    Jonas Mäki
    Applications Engineering
    National Instruments

Maybe you are looking for