Simultaneous analog output 1k sine wave and data acquisition

Although many topics of simultaneous analog output and input can be found in NI Developer Zone, I have not found a case similar to my project. I'm trying to generate a 1kHz sine wave by using the analog output of NI DAQPad-6070E, and acquire one channel input signal simultaneously. I found most of the examples can not work properly above 100Hz. Any suggestions are welcome. Thank you.
Jian

I have sucessfully solve the problem when I observed the increase of
scan backlog number. Simply increase the buffer size of AI/AO and you
can make the 1kHz sine wave output and data acquired properly.
On Tue, 3 Feb 2004 09:03:07 -0600 (CST), jujian wrote:
>Although many topics of simultaneous analog output and input can be
>found in NI Developer Zone, I have not found a case similar to my
>project. I'm trying to generate a 1kHz sine wave by using the analog
>output of NI DAQPad-6070E, and acquire one channel input signal
>simultaneously. I found most of the examples can not work properly
>above 100Hz. Any suggestions are welcome. Thank you.
>
>Jian

Similar Messages

  • Simultaneous analog output

    I am using PCI-6052 with (LabVIEW) .Where two analog outputs are available ,DAC0 and DAC1.I want to simultanouly output the different waveforms on each Channel at the same time.Time is important.
    I tried it with two DAQ assistance vi's setting each channel on each vi ,but at time randomly one vi's gives output not both at the same time.
    Thanks
    Haider

    Hello Haider,
    It sounds like you are trying to get started with NI-DAQmx and want to
    output separate signals on the two analog output lines.  The
    restriction of the hardware is that all of the analog input or output
    channels must be contained with in the same DAQmx Task.  There are
    a couple ways to do this. 
    If you want to stick with the DAQ Assistant, I searched our KnowledgeBases and found the following example program which does analog output for two channels using the DAQ Assistant. 
    If you would like to drill down a little farther and use the lower
    level DAQmx VI's, I would recommend looking at one of the shipping
    examples, the format for multiple channels is Devx/AOy:z where x is the
    device number, y is the starting AO channel, and z is the final AO
    channel. 
    Also, another good reference, especially if you are going to use the lower level VI's is the Learn 10 Functions in NI-DAQmx and Solve 80% of Data Acquisition Applications Tutorial.  Hopefully,
    that'll get you going with your program.  Let us know if you have
    any other questions with either the online example or one of the
    shipping examples. 
    Regards,
    Micaela N
    National Instruments

  • How to measure time difference between zero crossing of a sine wave and rise time of a pulse on a same graph?

    I have a 50Hz sine wave and a pulse signal on a same graph. The phase difference between two is between 0-90 degrees.
    Now I need to calculate the time difference between (when the sine wave crosses zero volts) and (when the pulse rises). The frequency will stay approximately same for both signals.
    The application is for a three phase generator. In simple words, when the time difference between the zero-crossing of sine wave and the pulse rises increases, that means that the load on the generator has increases.
    I am a beginner user of LabView (version 9, 2009), maybe it is a very simple problem but I've been pulling my hair out for the last few days and coudln't figure anything out. Any help would be greatly appreciated. I am using DAQ USB-6008 to measure these voltages and pulse from the generator and a sensor
    I have attached a jpg (a graph that i just made with excel to explain). The time 't' is what I am trying to measure
    Cheers
    Awais 
    Message Edited by awais.h on 03-30-2010 11:20 PM
    Message Edited by awais.h on 03-30-2010 11:21 PM
    Solved!
    Go to Solution.

    Hi
    Thanks for the code but I'm afraid it won't work. Like you said the probability of choosing a value that is on both graphs may not happen. This is something that I would like the code to do automatically.
    But I did use the previous code posted and made some modifications to it and it seems to work perfectly. Now the next thing is to be able to get just that one value that tells you the first time difference.
    Here is what I get using that code.
    As you can see from the t Values. I only need the one that is highlighted. If there is a way to filter out the rest it would be great.
    I was thinking of a while loop and as soon as the value is higher than 3E-5 it would store the number and stop the loop, but I'm not too familiar with arrays in labview.
    Here is the the code modified.
    As you can see, it wasn't that big of a modification and it still is your code.
    I will keep trying.
    Thanks for the help
    Attachments:
    FinalShockSpeed.vi ‏55 KB

  • How to create sine wave and step input using cwgraph in VB 6.0

    hello..
    i'm doing my master's project now. i'm stuck on how to create a sine wave and a step input using the cwgraph using VB 6.0. please help. thanks.

    hello..thank for the reply.
    i'm having problem with my coding using cwgraph. can anyone help. everytime i do the full compile, there's error.but it can still can run, but can't convert to application form.for your info, i'm using RTscope and cwgraph to plot graph.the error is in the cwgraph coding.below are part of the coding with error. and can somebody tell me how to add cwgraph component in the VB? i try adding component, but it's not in the list of component,and i've browse for it already too.i'm doing the software at home, but i'can run it at my lab cause cwgraph component is not listed.please help.
    Dim countTime As Integer, count1 As Integer, countFreq As Integer, countVolt As Integer
    Private Sub cmdRun_Click()
    If cmdRun.CausesValidation = True Then
    cmdPause.CausesValidation = False
    tmrOsc2.Enabled = True
    tmrOsc3.Enabled = True
    Else
    cmdPause.CausesValidation = False
    tmrOsc2.Enabled = False
    tmrOsc3.Enabled = False
    For count1 = 0 To 100
    Data1(count1) = 0
    Data2(count1) = 0
    RT1.Value(1, count1) = 0
    RT1.Value(2, count1) = 0
    RT1.Refresh
    CWGraph2.Plots(1).PlotY count1 ' THIS CODING HAS AN ERROR ...
    CWGraph2.Plots(2).PlotY count1 ' THIS CODING HAS AN ERROR ...
    Next count1
    End If
    End Sub

  • Generate n sine waves and add them together

    Hi
    I'm new to Labview and I want to generate n number of sine waves and add them together to form one signal that can be out put through a DAQ card. Each successive wave frequency will be the multiple of a base wave all will be the same amplitude.
    This to me suggested a For loop with a sig generator  and a passback in it but when I tried this it threw an error because the dt were different.
    Any help will be appreciated.
    Thanks

    Show us what you did.
    LabVIEW Champion . Do more with less code and in less time .

  • Does anyone know how to display (in LabVIEW) the memory use during execution of an image and data acquisition VI to predict when it is time to cease the acquisition to prevent the program crashing?

    Does anyone know how to display (in LabVIEW) the memory use during execution of an image and data acquisition VI to predict when it is time to cease the acquisition to prevent the program crashing?
    I am acquiring images and data to a buffer on the edge of the while loop, and am finding that the crashing of the program is unpredictable, but almost always due to a memory saturation when the buffers gets too big.
    I have attached the VI.
    Thanks for the help
    Attachments:
    new_control_and_acquisition_program.vi ‏946 KB

    Take a look at this document that discusses how to monitor IMAQ memory usage:
    http://digital.ni.com/public.nsf/websearch/8C6E405861C60DE786256DB400755957
    Hope this helps -
    Julie

  • How can I output successive sine wave sequences?

    I'm using Labview 8.2.1 and I'd like to output sequences of sine voltage waves to a motor, each sequence being associated with n number of cycles at a given frequency and magnitude. For instance, three 0.5V sine cycles at 1Hz followed by three 0.2V sine cycles at 10Hz - no waiting time in-between and all data saved to a given folder. I've been using the 'Cont Gen Voltage Wfm-Ext Clk.vi' within the example library. I added to that a stacked structure thinking that I could copy-paste the first sine sequence to the next frame - changing only the frequency+magnitude values of the sine wave - but I couldn't get the second sequence to execute. I tried out other options with different timed structures but it was not successful either. My block diagram for now looks like this:
    What fundamental steps/elements am I missing?
    Thanks for your help,
    Thibault.

    Instead of using frames let’s try something a little bit simpler. First your generation is set to continuous so it will never go to the next frame until the first task is done.  
    You have two options to solve this problem:
    1.       You build the waveform the way you want it, and then you start the generation with the whole waveform load into the card. Just need to make sure this will limit the size of your waveform to as much memory you have on your card.  Advantage about this approach is there will not be time gaps between one signal and the other one
    2.       The other option is to start the generation with one waveform stop it and start it over with different specification. Basically what this is what you are trying to do, but you need to change your generation to: “N samples”. One thing to consider about this approach is that your signal will have a gap every time your task is started and stopped.
    Let me know if it helps
    Two point to remember, this is a question that can be answer more correctly in DAQmx discussion forums not, labview and next time if you can reduce the picture width to less than 500 pixels.
    Jaime Hoffiz
    National Instruments
    Product Expert
    Digital Multimeters and LCR Meters
    Attachments:
    Cont Gen Voltage Wfm-Int Clk.vi ‏54 KB

  • Sampling sine wave and saving the samples in an array.

    helo..
    I am new to Labview and i need some help regarding sampling the sine wave.
    I have generated the sinewave in labview and now i want to sample it.(do i need an ADC for sampling?) and the samples should be saved in an array.
    I dont know how to do this.
    Please tell me how to do this or post some related examples..
    Thanks in advance 

    All of the functions that generate a sine wave in software do save all of the samples in an array. You just need to know how to get them. Since you did not mention the function you used to create the sine wave, lets assume it's the Express VI Simulate Signal. On the signal output, wire a Convert From Dynamic Data type function and select the default 1d Array of Scalars. Right click on the output of this and select Create Indicator. You now have the array. If you are using Sine Waveform which outputs a waveform data type, just wire up a Get Waveform Components function and select the item 'Y'.
    For learning the basics, please see the free tutorials
    Message Edited by Dennis Knutson on 10-28-2008 08:23 PM
    Attachments:
    Get Y Array.PNG ‏4 KB

  • While loop and data acquisition timing worries

    Hello everyone, 
    I apologize in advance if this is a silly question, but I could not find the answer around here. 
    I have made a VI to record continuously from 64 analog channels at a 5kHz sampling rate. I then stream this data to a tdms file. The data acquisition and write functions are in a while loop. 
    I the same loop, I have a bunch of other loops, that each run on their own wait timers to help limit the amount of memory they take up. I am now worried that this may somehow affect my data acquisition timing.
    If I put a bunch of timed loops within another loop, does the outer loop run at the same pace as the slowest of the inner loops? And could that mess up my sampling rate?
    I have attached my VI, in case what I just wrote makes no sense at all. 
    Thanks for any tips...
    Attachments:
    Record_M8viaDAQv3.vi ‏237 KB

    Well, looking at your code you will only write to your TDMS file one time. You have multiple infinite loops within the main/outer loop. That means that the main loop will only run a single iteration because it cannot complete an iteration until all code within it completes. With at least two infinite loops inside the loop it will never complete. Not too mention the only way to stop your code is to hit the stop/abort button. NOt a very good way to stop your code. As someone once said using the abort to stop your code is like using a tree to stop your car. It will work but not advised.
    As Ben mentioned try to understand data flow better. You have unnecessary sequence frames in your code where normal data flow will control the execution sequence.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Synchrosnised video and data acquisition

    I am a Labview user who would like to capture video and data (from one video
    camera and 4 strain gauges) simultaneously, then be able to play the video
    whilst being able to process the data streams. Is there a simple way to do
    this? - Thanks!

    I use Imaq for Labview to do the image acquisition, while using a traslation
    system. It works. The Motion controller is controlled by Labview too.
    (RS232)
    It doesnt seem u need syncronization from ur mail, maybe just a simultaneous
    acquisition. In this case it's very easy.
    Saint
    "Kevin Powell" ha scritto nel messaggio
    news:[email protected]..
    >
    > I am a Labview user who would like to capture video and data (from one
    video
    > camera and 4 strain gauges) simultaneously, then be able to play the video
    > whilst being able to process the data streams. Is there a simple way to do
    > this? - Thanks!

  • Phase shift of a sine wave and a square wave

    Hi,
    I would like to simply compute the phase shift between a sinusoidal waveform and a square one. Between two sin-s I can compute, but I have no idea how to do that with a square waveform.
    Thanks,
    Ussr123

    Hi there,
    the easiest way is to use the ExpressVIs.
    But you are only allowed to use the ExpressVI "Tone Measurements" if you have enough periods of the square wave, because it computes the phase with FFT.
    An other possibility is to use the spectrum analyser VI as used in the attached exsample.
    Greetz
    Branni
    Attachments:
    Phaseshift_Sqr_Sin.vi ‏89 KB

  • I am inputting my guitar tunes(.wav files) and I am trying to do an FFT on this. Wen I do, the FFT signals are very small and are not on the right frequency scale. However I am able to simulate a sine wave and get an accurate FFT plotted as a cluster.

    My .wav file has about 8100 samples and has a sample rate of 11050. I pass the samples into FFT. The output I devide by the size of the array(8100??). This I seperate into 'real' and 'polar'. The 'real' I use to plot. My plot has a starting value of '0' on the X axis. My problem is with the other value for the cluster, i.e; To plot this I need 1. 'real' part of the FFT output. 2. the 'x' axis starting value(0) and 3. how do i get this value? I tried deviding the sampling rate by the size of the samples, but
    the FFT plot is really wrong. Anybody has an example vi to convert .wav files to FFT? Thanks alot!!!

    Mark! Thanks again for the extended answer!!! I have learned alot from that example you gave me. Here is a simple VI which I am trying to plot as an FFT plot. I have also included a 0.5 sec .WAV file. If you have the time, I will appreciate it if you can tell me how to plot the FFT. This vi is very simple. You can open the included .wav file on the included VI, and you will understand why I am unable to plot an FFT. I am doing this to process my music. Appreciate it!!!
    Attachments:
    fft_test.vi ‏85 KB
    guitar.wav ‏8 KB

  • Stepper Motor with Linear Stage (Position Control and Data Acquisition)

    Hey All,
    So.. I've attached a stepper motor to a linear stage and so far it's working pretty well.  Using a stepper motor driver from Pololu, I've simplified the control of the motor by just using output pulses from the counter output of a PXI-6143.  I've tested the motor using the Pulse Train examples in LabVIEW and all is working well.  
    My goal now is to allow the user to collect data from a pressure sensor, attached to the linear stage, every X number of steps.  From what I can tell so far, and please correct me if I'm wrong, the motor step movement is synchronised with the pulse train input.  That is to say, if I give the motor a 200 step pulse train, the pulse train ouput is completed at the exact time the motor has moved 200 steps.  From this, I've created a VI that moves the motor X steps, aquires the data point, and then repeats this process for the required amount of data points.  The problem with this is that the motor movement is not continuous; it stops for a split second to take the data point.
    How can I have labview ouput a pulse train of say 1000 steps and record a data point every 50 steps?
    Two ideas that came to mind were:
    1. Use the counter input port on the card to count the pulses being sent to the motor.  
    2. Use an encoder connected to the motor shaft.
    I wanted to stay away from theses ideas though since they require resources from the DAQ card.  
    Thanks,
    Ryan

    Hi Ryan,
    Just to cover all the bases, what version of LabVIEW are you using and can you attach your VI? Initially your ideas sound like they should work, do you expect to be nearly maxing out the DAQ?
    Thank you,
    Deborah Y.
    LabVIEW Real-Time Product Marketing Manager
    Certified LabVIEW Architect
    National Instruments

  • Timing control signal and data acquisition

    I have a series of relays which when activated will close different elements of a circuit and I also have a sourcemeter(Keithley) sending a constant source current and reaing the voltage back.(But when no relays are closed the circuit is open and no source current flows )
    I have a microcontroller(pgmmed for 9600 baud rate) based hardware circuit which closes different relays sequentially based on the input it recieves from labview pgm passed on through a Rs232 cable(9600/8 bit/no flow control)
    So i made a sequence structure of sending signal to microcontroller signal then wait for the signal transmission and realy activation and then read the voltage value form keithley sourcemeter back to labview thro a GPIB cable.
    These three events are reapeated sequentially in a while loop. 
    A schematic picture is attached.
    BUt the problem I ma facing is the maximum speed of reading is limited to 200msec/reading even thought the relay activation time is as low as 30 msec.
    I tried with many different delay times (140-60 msec...but more or less each reading takes up 200msec irrespective of the delay time..) 
    What could be the bottle neck is it the Rs232 setting at 9600 baud rate..can changing that to higher baud rate/including flow control solve this problem?
    Attachments:
    daq_printscreen.GIF ‏45 KB

    siva0182 wrote:
    Find attached the picture of the vi where I tried to put in timers.one in each of the frame and at the end added one more frame just to measure the time elapsed .
    The last frame and the frame with sourcemeter measurment show adifference of about 140 msec.
    Is there any way to improve the speed of this portion?
    Probably not.  It sounds like the Keithly VI is taking 140 msec.  You can try opening that up to see if there is anything in there that could be causing an unnecessary slowdown.  But trying to tighten it up too much may cause occasional errors (such as timeouts) in trying to get a response back. 
    But surprisingly I tried displaying the actual timer value at the start and at the start of sourcemeter read function ..but the display of both indicators is almost equal with little difference of only 10 msec.?????  I'm not sure which of the several timers you are referring to here.  What is the value going into the wait function between the VISA write and the Keithly VI?
    When you do benchmarking, the timer functions should be in a frame all by themselves.  Having it mixed with another function or VI causes a bit of uncertainty as to when the time was taken.  For instance, you dont' really know if the Keithly VI was started before the time was taken or after.  (The time was probably taken first, but without a data flow or sequence structure dependency, you can't be sure.)

  • Agilent E4980A Measurement Speed and Data Acquisition Speed

    I am using E4980A LCR meter, I need very fast data aquisition unfortunately limited by device own speed with 5.6 ms per measurement which means nearly 178 Hz. I am using usb interface with the software provided by NI, in that program I made some modification taking the reading side of the programme in a while loop .
    To test my speed I start the program count 5s and stop saving the results to an excell file. If I plot the results in a graph while programme is working I have 60 Hz speed. If I don't, then it is 80 Hz which are far below the potential maximum speed of 178 Hz. If my lap top battery is very low then my speed is worse. But with no battery problem, my celeron laptop performance is the same as an i7 laptop.
    Here it is my programme, it is the same provided NI but some modification. What can I do to have higher data acquisiton speed ?
    Probably, USB's speed is not enough but I can not believe that while it can save gigabytes of data in a few min can't take 200 datapoint in 1s. Why can't I have 178 Hz speed now and how can I reach this limit ?
    Regards.
    Attachments:
    Read Measurement.PNG ‏44 KB
    Read Measurement.PNG ‏44 KB

    Instrument communications via serial, USB, Ethernet, GPIB, etc just tend to be slow.  The instrument has to interpret the data, react to it, and then send data back.  That takes time.  A few ms per measurement is quite normal.  One option you might have is you could tell the instrument to take several measurements and then request all of the measurements once it is done.  I haven't looked into the E4980A yet to see if it can do that.
    What exactly are you trying to measure.  There might be better ways to get "fast" readings.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions

Maybe you are looking for

  • Ipad not recognized by usb windows

    Trying to get an iPad hooked to iTunes for a guy at work. I can't. His iPad is not recognized on his laptop, but ALL our iPods/iPads are recognized by it. This is an original iPad.

  • Partial confirmation and credit block

    Hi Friends, I have a scenario where we are using automatic credit check.  in the sales order based on the availability check the full 2 quantity is confirmed and then there is a credit block.  hence i check back the document and the confirmed quantit

  • What is the best way to re-install my apps data when changing the hard disk

    My MacBook (120Gb disk) is finally full and I have ordered a 500Gb disk to replace it. I am fine with changing over the disk but can anyone tell me the best way to reload all my apps and data from the present disk please? I have a Time Machine backup

  • Place background on each photo in an efficient manner?

    Say I have a bunch of pictures, and I want to place each of them on a certain (bigger) background, is there a way to do this in an efficient manner instead of opening up each photo and manually putting it on the background and then saving them indivi

  • Need procedure -Load txt,csv,xls pdf file to db

    Could you please share me the procedure for loading the csv,xls,txt,pdf files into oracle database