Sampling analog signal- Sample and Hold!

Hi,
I just started learning labVIEW so I am very new to labVIEW environment( there is always a first time for everything).. I just learned the basics ..Now I am trying to implement a simple basic Sample and Hold but unfortunately no idea (and no one to guide me) as to where to start from or how to do it..I know for sure an analoge signal generator(sine wave) will be required but where to go from here  
Can you please help me? any algorithm, hint, reference vi..any type of guide will be appreciated !! I have the concept but not the idea on implementation!! 
Any help is appreciated..
Thanks
**SORRY for the double post..had no idea as first one was showing error and not posting**

Hi,
Okay here is what I am trying to do..just the basics..Sampling is a stage in ADC ..i am just trying to reproduce this behaviour..taking an audio input (or any input ) in the analogue continous form..I thought of multiplying it with an impulse train (at a particular sampling frequency) so as to generate the samples at the each sampling interval..I was (I think) able to generate ann impulse train but once it is multiplied with the original signal, it gives nothing at the output (should be a sampled signal)
I have labview 2010!! so I am attaching both vi and screenshot!
Take a look..any help/ideas/changes are appreciated!!
thanks
Attachments:
test-audio.png ‏38 KB
audio-test.vi ‏20 KB

Similar Messages

  • Niscope for pxi5105, use a digital pulse signal to control analog signal sample

    i want to use ni-scope to drive pxi5105. And the PFI1 connect to a digital pulse signal(10KHz, 0-3.3V), to control a single channel analog signal continuous sample(Chan 0). I want a loop when the digital signal falling, the analog singal start to sample, and when the digtal signal rising, the analog singal stop. And by the low level of the digital singal, the analog singal sample (coupling by DC) can get an average and export to txt. I have tried the "start_and_reference_trigger.vi " and it did not work correctly. i need your help, thank you very much.
    Attachments:
    start and stop triggers for analog sample.vi ‏94 KB

    Hi Phil,
    The SCC carrier is only conditioning your signals (i.e. if your signals are not in optimal ranges, bandwidth or need external excitation). The actual counters and all digital lines are controlled directly by the M-series board. This means you will never be able to refer to a counter in the SCC module.
    If you route the signals of the M-Series board, is as if you had done so externally from the SCC. Look at this example and might give you more insight to how to implement it (This is software timing). The hardware timing would be doing correlation DIO. Here is an example that needs to be modified to adapt to your timing: http://zone.ni.com/devzone/cda/epd/p/id/4414
    Hope this helps,
    Yardov
    Gerardo O.
    RF Systems Engineering
    National Instruments
    Attachments:
    Finite Dig Output High.vi ‏31 KB

  • Sampling Analogic Signal cRIO 9201

    Hallo,
    I succed to achive analogic signal and to create fpga and host program for cRIO 9004 and Analogic input module RIO9201!
    I achive very well a 1 Hz signal but when I  increase frequency of my signal I lose in resolution!
    the sampling rate of module is 800KS/s and I don't understand if it is a problem of  time in my software!
    in the example of NI web site it isn't clear!
    Thank you
    Marco
    Attachments:
    provaanalogico.zip ‏98 KB

    Thank you, Alessio!
    I call Nationale Support but they still recall me!
    I follow the step in Tutorial High Speed Continuous Buffered Data Acquisition.
    ...........and there is a problem with FIFO,  I mean!
    because the the led empy is always turn on and the FIFO read doesn't work!
    I know that four value enter into FIFO write but FIFO read doesn't read them!
    I believe the problem is here!
    could you help me another time?
    Thank you

  • Analog signal duty cycle incorrect

    I am using an NI PCIe 6535 board to send digital timing signals to a custom PCB.
    The signals are digital square wave signals with various duty cycles and phase shifts.
    I also need to send a 12 bit ramp signal to the board.
    I am having issues with the frequency.
    I need the timing signals to run at 833.33333 khz.
    I need the lsb of the ramp to run at 416.666666khz.
    To create the timing signals I am using "Create Analog signal", so that I can set up the square wave with the appropriate phase shift and duty cycle.
    Then I conver from analog to digital.
    I am using a DAQmx generate to output the signal to the PCB. I have noticed that the DAQmx gen frequency directly controls the ramps frequency.
    However for the digital timing signals there is some scaling factor. The frequency of the digital timing signals can be set in the timing signals them selves. The sample rate in the analog signal also effects the frequency.
    To get the frequencies that I need. I had to set the"create analog signal" sample rate at 2.778G S/s, the "create analog signal" frequency to 1.2889GHZ, and the DAQmx generate frequency to 1.66666 MHZ. At those numbers, I get the timing signals to output at 833.333KHZ and the second bit of the ramp at 416.6666HZ (for the ramp I upped it to 13 bit and I don't use bit 0, as it outputs at 833KHZ).
    However at these settings all of my timing signals have the same phase, and the same duty cycle, even though I have them set differently.
    Can someone please help? I think the issue is that I have the sample rate and frequency of the "create analog signal" block set too high, but if I set them lower my signals will not be at the right frequency.
    Attachments:
    timing signal 1.JPG ‏44 KB
    timing signal 2.JPG ‏47 KB
    daqmx gen.JPG ‏55 KB

    Hi David,
    We found that there seems to be a weird divider between the sampling rate of the analog signal module, the analog signal sample rate, and the f daqmx gen.
    After various tests we made a chart of what we observed. Fsignal and sample rate are values set in the "create analog signal" module, Fdaqmxgen is set in the "DAQmx generate" module. We used a "create anaolg signal" module to create the square wave, then convert analog to digital convert the square wave to digital.
    We have "repeated signal" and "N periods" checked.
    Fsignal
    Fdaqmxgen
    Sample rate
    Frequency   measured on the scope
    1GHZ
    10MHZ
    100G s/s
    100KHz
    100MHZ
    10MHZ
    100G s/s
    10KHZ
    1GHZ
    1MHZ
    100G s/s
    10KHZ
    10GHZ
    10MHZ
    100G s/s
    1MHZ
    100GHZ
    10MHZ
    100G s/s
    10MHZ
    100GHZ
    10MHZ
    100G s/s
    5MHZ
    The equation we came up with is Feff = (Fsginal/FDaqmxgen)*1000.
    To meaure the frequencies were using an HP 54600A oscilloscope, and probing standoff pins on our custom pcb.
    We have several versions of the project, attached is the latest one.
    Kyle,
    How do I set the compression to false?
    The picture below looks like labview? We are using signal express.
    I can't change the frequency on the DAQ mx gen because I need the ramp to run at a set frequency.
    There is a divider between the daqmx gen and the f signal. I have to set the Fsginal in the GHZ to get it to out at the right frequency. The equation we came up with is Feff = (Fsginal/FDaqmxgen)*1000.
    Thanks,
    Devin

  • How can analog signals are measured every several counters from Quadrature Encoder using USB-6221

    how can I sample analog signals every counters from quadrature encoder using usb-6621?

    There is a well documented example of what you are trying to do at :
    http://zone.ni.com/devzone/explprog.nsf/webmain/DD85F07A7CA99F8F862568690062DE54?opendocument
    Don't be afraid because of the BNC-2120. It is just used in this example to simulate the pulses from a device. So it is not needed in your case. Obviously, you will need to change the number of increments/rev according to your encoder to get correct RPM values.

  • Where can I found hardware to get analog signal from VCR and work with labview and then sample this signal in very high frequency?

    I am trying to build a Digital Video Recorder using Labview. The problem is that I found that Labview sample the signal in the order of milisecond. I wanted it to be in the order of microseconds. Also I am looking for a cheap Hardware solution if it is possible

    Your question does not make a lot of sense to me, so I will just point out a few things.
    1. The PCI-1411 works well with VCR signals. It has a BNC connector as well as a S-Video connector. The price is under $1000, so it is fairly reasonable. The amount of time you save getting it to work with LabVIEW is worth any extra cost.
    2. The PCI-1411 is sampling three colors at 30 frames per second, with an image resolution of 640x480. This is the best resolution you are likely to get from a VCR signal. The sampling rate for each byte in the image is about 28 MB/sec. This is in the microsecond range that you are looking for, I think. If you are only interested in the raw signal instead of the image, you could look at the high speed digitizing boards NI sell
    s that acquire at higher rates.
    If this information isn't really what you were looking for, perhaps you could clarify your question.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Sample and Hold Application.

    I am acquiring data with the NI ELVIS on an analog input channel A0.
    I need to sample and hold the data according to a 480 Hz (2.08 ms) clock as follows:
    1. Acquire data for the 0.69 ms (1st third of the cycle) and place the data into a new waveform.
    2. Acquire data from 0.69 ms to 1.39 ms (the 2nd third of the cycle) and place the data into a new waveform.
    3. Acquire data from 1.39 ms to 2.08 ms (last third of the cycle) and place the data into a new waveform.
    Currently, I have built a VI (attached) to generate two clock signals. The first clock signal turns on a red LED for 0.69ms then turns off for the rest of the cycle. The second clock signal turns on when the first clock signal transititions to a low state for the next 0.69 ms and remains off for the rest of the cycle. Both LED illumination signals are picked up by a photodetector, so this is why I need the sample and hold application explained above.
    If you could help that would be great. My current VI is attached. Thanks so much!
    -David
    Attachments:
    SaO2.vi ‏146 KB

    Correct me if I'm wrong, you are turning on two LEDs in a pattern and reading the light level. You want to have three separate waveforms for the light reading, based on when the lights are turned on and off.
    If this is the case, here is what I would try:
    Trigger your analog input reading off of the turning on of the first LED. You might have to put an initial delay into your clock pulse (that turns on the first LED). This initial delay will insure that the LED is not turned on before the analog input has been started. Data collection will start when the first LED is turned on (the trigger) and will end after the appropriate amount of time. (You could end it in many ways; user presses a stop button, configure collection for a finite number of data points, final pulse has ended,..). After data collection is finished take the single waveform that is storing all of the light data and use the waveform functions in the Waveform palette to split it into your three waveform subsets.
    I suppose another way to produce the three waveforms would be to wire your light sensor into three analog inputs, then configure three separate voltage inputs with appropriate triggers based on the turning on and off of the LEDs. CH 1 triggers when LED 1 is turned on, CH 2 triggers when the LED 1 is turned off, CH 3 is triggered when LED 2 is turned on.
    I hope this is helpful in some way,
    Sam

  • Help required for sample and Hold

    Hello,
    I am working on a project Cerebral Oxygenation Monitoring. The concept is similar to pulse oximetry. I help already developed the hardware that includes the timing circuit , led driver for driving Red and IR Led, Amplifier and Filter Stage. I am getting the pulse signal but it is multiplexed signal corresponding to effect of both Red/IR Led. Now to separate it I need to use sample and hold circuit, whihc I can achieve with and IC LF398 but I want to minimise this part and directly take this multiplexed signal through DAQ Card in to LabVIEW and further create sample and hold in LabVIEW.
    The sampling needs to be in synchronus with the Timing signal given to Red and IR. How I can achieve this in LabVIEW.
    For eg: the Red Led is triggered with a pulse of 1 ms with a repeatation rate after 10 ms. So this timing pulse should trigger the sampling part.
    Please Help.

    CoastalMaineBird wrote:
    Not sure what you need the HOLD part for.
    Correct me if I'm wrong:
    You have a 1 mSec pulse, every 10 mSec.
    Each pulse triggers two LEDs:  RED and IR
    You have a single signal which contains the processed (through the body, or whatever) responses to BOTH of those signals.
    So, how does a S&H, hardware or otherwise, separate the two responses?
    Is one delayed in time, relative to the other?
    YES you are right, 1 mSec pulse, every 10 mSec. 
    Above figure shows the trigger pulses generated using standard hardware. One triggers IR and other triggers RED. In above case  I had kept repetation rate 4msec
    This is the signal which I may get
    Now how do I separate both of these signals in LabVIEW

  • Sample and hold

    Could you please help me in getting the sample and and hold (Or Peak and hold )functionality of any any given input using LABVIEW
    Regards,
    Sharanu

    If Dennis has already answered your question, than you can disregard
    this message. I got the sense that your question wasn't about the
    "sample-and-hold" circuitry built into DAQ cards capable of
    simultaneous sampling, but actually was a software question about
    tracking and holding peak (or maximum) values that are coming in
    through an analog input. If this is the case, please provide a little
    more information about your program, and I'm sure we can help you out.
    Chris

  • Sample and hold inputs on 6023e card

    I am using a 6023E card and need to input 2 similiar channels into Labview and see the amplitude and phase differences. I have the program working for simulated inputs but the problem (according to NI) seems to be that the time delay in switching between channels causes the phase numbers to be wrong.
    Has anyone used a sample and hold vi or something like it that will allow both signals to be read with respect to the same reference? I realize that there are better cards that will do this but this is a student lab and we need 16 of them so cost is a big problem.
    Any suggestions would be appreciated.
    Thanks
    Dave

    There are two ways of correcting for the multiplexing delay of your board.
    - You can either use the method I suggested in your previous posting http://exchange.ni.com/servlet/Redirect?id=10455451 or
    - You can re-align your signals so they are "in phase". To do so use the Align Waveforms VIs located in your Analyze>>Waveform Conditioning palette. The output of these VIs will be your time signals resampled so they are aligned. Check-out the example called "Correct for MIO inter-channel delay (continuous).vi". But, as mentioned, this method is "overkill" in your case. I'd recommend you to use the first method which is both faster and more accurate.

  • Sample-and-hold vi for USB-6251

    I want to implement a sample-and-hold circuit on my USB-6251 device.
    The input will be an analog voltage waveform.  The output will be that same analog voltage waveform (this is the "sampling" in the sample and hold), with one caveat:   I want to hold the output at a certain level depending upon a digital input (ttl 5V hi or 0V low).  For example, when the digital input cycles hi, I want to take the value of the analog output at that point in time, and continue to output that voltage value until the digital input cycles back low (the "hold" in the sample and hold), at which point the output continues outputing the incoming analog voltage waveform. 
    I think I should be able to create such a VI using a comparison function, but I cannot quite figure out how to implement it.  Any suggestions?
    thanks!

    I would imagine this could be accomplished with the use of a simple true false selector.  In the false case the waveform coming from the Analog Read would be passed on and also into a shift register on the right side of the reading while loop.  This shift register would then also be the true case of the selector.  There would then be a producer consumer style structure where this output array would be fed into a DAQmx write.
    Doug Farrell
    Product Manager - Condition Monitoring
    National Instruments
    National Instruments Condition Monitoring
    Attachments:
    2009-03-20_135919.png ‏4 KB

  • Are there any PC cards which have sample and hold capability

    Are there any PC A/D cards which have sample and hold capabilities up to a 10 Khz sampling rate which we are interested in for modal testing of engine structures. Also if this type of card is available what would be the maximum input channel count of this card. We would be interested in the highest count available up to 64 channels.
    A second question: We currently have a 64 channel PCI 6071 capable of 1.25 MS/s throughput. If we are using all 64 channels what would be the interchannel delay between the first and last recorded channel and at what frequency would we have to be sampling to even be able to see the affect of the interchannel delay of this specific card.
    This issue has been debated wi
    th in our group and your insight would be appreciated as you are the experts in this field.

    Dear Sir,
    Thank you for using NI Developer Zone.
    National Instruments has a product line designed specifically for acquisition of dynamic signals, it is called DSA - Dynamic Signal Analyzers. In according to the description of your application the card that best fits your needs is the NI-4472 that is available in PCI and PXI format. This card is able to acquire 8 channels simultaneously, as opposed to the regular DAQ cards that have a single A/D converter and a multiplexer. The NI-4472 has 8 Delta-Sigma A/D converters one per channel, what results in a better performance than having a single A/D converter in combination with a sample and hold and a multiplexer. To Acquire 64 channels you would have to have 8 boards and synchronize all 64 channels. The Synchronization process is very simple and with a couple of software calls we can synchronize as many as 112 channels for simultaneous acquisition at 102.4K samples per second per channel.
    Regarding your second question, the PCI-6071 will sample between channels in a single scan at the maximum sample rate of the board (1.25 MS/s) but the
    scan rate, i.e. the rate in which the same channel is sampled is defined by the user. Being that said, we can conclude that the interchannel delay will be the inverse of the 1.25 MS/s clock, or 0.8 micro seconds.
    For a 1 KHz sine waveform, this represent a phase delay of 0.288 degrees between consecutive channels. For a channel list of 64 channels each one having the same 1 kHz sine waveform, the phase delay between the first and the last waveform will be 18.432 degrees.
    I really recommend the NI-4472 as a very good solution for your application, besides that the combination of the NI-4472 with LabVIEW and the sound and vibration toolset will give you a tremendous tool to solve not only your immediate need but also provide you a system that will be easily modified and adapted for future needs.
    If you need more info, feel free to contact me and I can give you more details about this product.
    Call 1 800 IEEE488 and ask to speak with the Computer Based Instruments (CBI) support team.
    Best Regards.
    Omar De Andrade
    Applications Engineer - Computer Based Instruments
    http://www.ni.com/support/

  • DAQ Assistant, Analog Signal to Analog Comparison Event for sample clock

    I am using a PCI-6071E and DAQmx.  I would like to use an analog signal on PFI0 to trigger Analog Comparison Event to be used as the sample clock in DAQ Assistant.  Is this possible and if so, how? 

    Hi Ben,
         You can use your analog signal on a PFI0 line as you are intending.  A few pitfalls of doing so are listed in this article.  Additionally, this Developer Zone article explains what you are trying to do, and gives and example that you may find helpful.  Have a good one!
    aNItaB
    Applications Engineer
    National Instruments
    Digital Multimeters

  • Simultaneous sample and hold

    Hello everyone,
    This is the hardware we are using our project and our labview version is 8.2
    NI cDAQ-9172
    NI-9025 Analog Input card
    I wasnt able to find any information if this current setup is capable of simultaneous sampling and holding.  Eventually, we want to monitor and control synchronous machines.  I'm new to labview and if this equipment is capable of simultaneous sampling and holding does anyone have a sample program to illustrate this.  from NI.com i did find some programs (thermocouples) that had "DAQmx create channel's" in paralled with eachother.  I wasnt sure if that layout executed simultaneous sample and hold.
    thanks in advance

    Neither the NI 9205 nor the NI 9211 are simultaneous sampling modules.  There are three analog input modules for CompactDAQ that support simultaneous sampling:
    NI 9215 - 100 kS/s 16-bit +/-10V
    NI 9233 - 50 kS/s 24-bit +/- 5V w/ AC coupling and IEPE excitation
    NI 9237 - 50 kS/s 24-bit for bridge sensors
    Please post if your application isn't handled by one of these modules.  I suspect the 9215 will be a good choice, since it supports the same voltage range as the multiplexed NI 9205 that you already have.
    Kyle

  • Generate analog signal using samples fpga

    Hi,
    I have 20  samples of (time,data). using these samples i need to write data to AO channel in FPGA card. Here the data should be written to a channel w.r.t time. i need to generate signal(ramp) based on time and data available.
    for example - 
    time( in seconds) -   0   0.01   0.04   0.05  0.07 ...
    data -                        0   1.0    3.2      2.5     1.3 ...
    Please suggest me best way to achive this.
    Thank you,
    Ranjith

    Keep all ur samples in a array and auto index the array to a for loop, Inside the for loop put a wait timer and give the dt as input(t2-t1) to the timer. Inside the loop connect the auto indexed output to the A0 Channel.
    Balaji PK (CLA)
    Ever tried. Ever failed. No matter. Try again. Fail again. Fail better
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.

Maybe you are looking for

  • Moving Stack from one folder to another?

    Is there a way to keep a stack together while moving it from one folder to another. When I grab the stack and drop it to a folder, I view the folder and the images are no longer in a stack. It would save me a lot of time if they would stay stacked. A

  • Can my DVD drive be cleaned?

    We been watching Netflix on our Mini for several years.  Gradually, the DVD drive has become pickier & pickier.  We have to wash the discs and sometimes even blow air into the disk slot to get a DVD to play.  It's getting worser and worser.  I think

  • PS Elements 12 comes up with empty menus

    I have a new Win7 PC and installed PS Elements 12.  It was working fine initially and I worked on a few pics successfully.  Then today, when I tried to start it with the shortcut, nothing happened.  So I right-clicked a pic and opened PS that way.  T

  • "About" Box, Robohelp 8, and Internet Explorer

    I am having an issue with the About box in our custom-built skin and (seemingly) all versions of Internet Explorer.  I have an About box configured that contains information such as our company name, copyrights, and a link to my email for questions. 

  • How do I change background in Elements 12

    I've used Adobe PhotoDeluxe 2.0 for years then had to get a new computer and the old 2.0 won't work on it. In the 2.0 it was EASY to change backgrounds in photos. I haven't been able to figure out how to do that with the layers in Elements 12 and it'