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

Similar Messages

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

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

  • 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

  • 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

  • 6601 sample and hold

    Hi,
    I have a probe set in quadrature count mode. I have it connected to an SCB-68, which is in turn connected to a PCI-6601 card. I am using a C program to read the counter values from this probe.
    I also have a swinging arm (parallel to the floor) mounted on a rotary encoder which is connected to an MID-7652 box, which is in turn connected to a PCI-7342 card, used to control the servo motors to move the swing-arm. The 6601 and 7342 card are connected by an RTSI cable. The idea is to read the probe counter value while the arm is swinging about its pivot in order to measure surface profiles. It is important to know the exact arm position when the probe is read, and so latency is an issue. I am able to create an use breakpoints for the swing-arm.
    Since latency is an issue I am looking to trigger a reading of the probe counter every time the arm reaches a breakpoint. I can do this using a C program but there is a delay between the breakpoint being reached when the arm reaches a breakpoint and the probe being read while the software executes lines of code.
    How can I use the breakpoint output from the 7342 as a trigger to latch the value of the counter of the probe 6601 onto one of the NI-TIO registers?
    Thanks
    Attachments:
    SampleAndHold.png ‏18 KB

    Hi Chris,
    I have tried to program a breakpoint output from the PCI-7342 board into the RTSI using the following function:
    flex_select_signal(boardID, NIMC_RTSI4, NIMC_BREAKPOINT2);
    Breakpoint 2 is the correct breakpoint output because my swing-arm is on axis 2 and I have been able to detect the output from pin 2 on the BP socket on the MID-7652 box.
    However I am unable to detect anything in the corresponding RTSI pin (I have checked the pin connections diagram for a PCI board) using a multimeter or an oscilloscope. Please help!
    Once I am able to detect something I am planning to program the input of the PCI-6601 using:
    Select_Signal(1, ND_TRIGGER, ND_RTSI4, ND_LOW_TO_HIGH);
    Is this the correct function to use?
    As for latching the counter value into the save register, I haven't thought properly about that part yet. My thinking is that I will need to operate ina buffered mode. Is that correct?

  • SSD: for OS and apps, or for samples and audio?

    I'm thinking about adding a 256 gig solid state drive; I currently have two 1TB drives. I tend to use large sample-based instruments - Play, Ivory, Vienna, Kontakt, Omnisphere, etc. - but not particularly great track counts. If I used it as the startup disk, 256 gigs would be way more than enough (because audio and video files are on other disks.) As a sample disk it would hold my most demanding and most often used libraries.
    What would be the most efficient use of that SSD speed - OS and apps, or streaming samples and audio?

    Thanks for the recommendation on size. I found a great answer to my question about file locations at:
    http://discussions.apple.com/message.jspa?messageID=12293000#12293000
    Using the advanced Options (control click the active admin account) in the accounts pane in System Preferences, one can specify a new location for the home folder. Very practical and way easier than trying to go into all the app's libraries to tell them where their files are.
    Now I can just copy my home folder to the internal drive, and delete it on the SSD. After a restart, this new location will be recognized as the correct home folder.

  • HT4059 I purchased a book, not a sample, and the download only gave me the first 60 pages. What's wrong? JohNny

    I purchased a book, not a sample, and the download only gave me the first 60 pages? Johnny

    If I was you I would do a reset ie hold the sleep/wake and home buttons simultaneously until the Apple logo appears. If that didn't help I would then delete and redownload the book. If problems still persist contact Apple support:
    https://getsupport.apple.com/LocaleChange.action

  • Building Peak and Hold output counters: HW and SW required?

    Hello,
    I am using the 2 counter outputs of USB-6211 and PCI-6602 to drive injectors with PWM commands at rather slow frequencies (up to 10Hz) --- see top picture in the attached file. What I would like to do now is to drive Peak-and-Hold injectors (as shown in the below picture). I wonder if such profiles can be programmed or set in the hardware at the beginning of a test then reset everytime the users want to change the current settings (this latter does not need to be in real-time).
    Can I achieve this with my hardware, do I need specific hardware? Is the only solution to build the train of impulsions and send it in a sort of time-based way? I do not really see the SW related that I must use.
    Thanks for any insight.
    Christophe
    Attachments:
    P&H command.doc ‏34 KB

    Hello,
    If you really need the exact pattern to be completely accurate up to 0.1%, then your pulse parameters should be able to change with maximally a 0.1% error. 
    This means that your pulse parameters should be updatable with an error smaller than 1 ms.
    Therefore you cannot use Non-Buffered Pulse Train Generation (Implicit timing), because in that case changing your pulse parameters would be done software-timed. This type of Pulse Train Generation can be performed on STC 2 - and STC 3 - chipsets.
    Because a computer only has an accurate 1kHz clock available, this would probably not fulfill your needs.
    Two other options that could do what you are asking are Buffered Pulse Train Generation (with Implicit Timing) and Buffered Pulse Train Generation (with Sample Clock Timing).These options are only available on STC 3 - chipsets. These chipsets allow you to change your pulse parameters in a hardware-timed manner.
    The 6211 card you mentioned is an M-series device and these devices use a STC 2 - chipset. Therefore it will not be possible to do a hardware-timed buffered  pulse train generation.
    As far as I know it will not be possible to do the hardware-timed buffered  pulse train generation with the 6602-card.
    I don't have one available over here to test it, but of course you can always test it at your side.
    The examples to test this can be found the following way:
    - Open LabVIEW and go to Help > Find Examples
    - Select Browse and go to Hardware Input and Output > DAQmx > Generating Digital Pulses
    - Here there should be two examples of the buffered Pulse Train Generation. (starting with "Gen Dig Pulse Train - Buff-... ")
    - In the Requirements section they also mention the cards that do support this functionality.
    Can you let me know if your test allows you to produce the wanted results?
    Kind Regards,
    Thierry C - Applications Engineering Specialist Northern European Region - National Instruments
    CLD, CTA
    If someone helped you, let them know. Mark as solved and/or give a kudo.

  • Parked and hold document

    Hi All
    What is the difference between parked document and hold document and how it is used in real time
    What is difference between dample doc and recurring doc
    Regards
    Mahesh Kum

    Hello mahesh,
    Parking Document:
    Its is for longer period generally used for internal purpose.  eg: Advance made for employes.
    Hold Document: 
    It is for short term and is used when tranaction Dr or Cr is uncertained and generally its is used for external purpose.  eg: Advance from potential customer
    Recurring Entries:
    A periodically recurring posting made by the recurring entry program on the basis of recurring entry original documents.
    The procedure is comparable with a standing order by which banks are authorized to debit rent payments, payment contributions or loan repayments.
    Sample Documents:
    Special type of reference document. Data from this document is used to create default entries on the accounting document entry screen.
    Unlike an accounting document, a sample document does not update transaction figures but merely serves as a data source for an accounting document.
    Regards,
    shashikanth
    Assign points if usefull

  • Problem push and hold on a Surface Pro tablet's touch screen

    Hi,
    I tried posting this before, but I can't find my origional post so I hope I'm not spamming accidentally.
    I have a problem with my program on a Windows 8.1 Surface Pro tablet. I programmed a button to be 'push-and-hold', but when I touch the tablet nothing happens until I release my finger. This briefly controls the button. When I connect a USB mouse to the tablet, it responds normally; when I press the left mouse button: the button in my program goes down until I release the mouse button. I tried about every setting in the Touch section of the Windows control panel without any succes.
    Does anyone have a suggestion?
    Any help would be greatly appreciated.
    Chris  

    Previous Post.
    http://forums.ni.com/t5/LabVIEW/Press-and-hold-on-a-Surface-pro-touch-screen/m-p/2816346
    If you clicked on your username and looked at your profile, you can see the messages you've created or replied to in the past.

  • Press and hold on a Surface pro touch screen

    Hi,
    I am having some problems with my Surface Pro, trying to control a relay 'press-and-hold'. When I connect a mouse to the Tablet, Windows registers the left mouse up and down events perfectly, allowing the user to control the relay exactly the way I intended, but when I use the touch screen with either the stylus pen or my finger it only seems to press the LabVIEW on release.
    Does anyone have a solution for this problem?
    Chris

    Jeff-P wrote:
    I just tested this on my touchscreen laptop and got a similar behavior. Windows doesn't seem to be registering the left click when you touch the screen until you release. My guess is that this is related to the press+hold for right click functionality on Windows. When I touch and hold for over a second, I get a right click, but when I touch and hold for a shorter time, I get a left click that only registers when I take my finger off. This is consistent with the way that the Windows UI handles touch as well (test the start button for an example).
    Interestingly, if I change the mechanical action of the LabVIEW boolean to 'Switch Unit Released' I can't actually toggle the button ever because the press and hold does not register as a left click, and eventually registers as a right click.
    Jeff Peacock 
    Product Support Engineer | LabVIEW R&D | National Instruments | Certified LabVIEW Architect 
    Actually, this is expected behavior.  Try clicking a button on any Windows app, then, while holding down the button, move off of it.  The button does not register as pressed.  This feature has saved me any number of times. 
    edit:
    Or do you mean it doesn't even depress the button?
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

Maybe you are looking for