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

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

  • 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

  • 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

  • How do i freeze a frame in a movie and hold it for several seconds?

    Hi
    I have a clip where someone turns round and gives the 'thumbs up' to the camera - how do i hold this thumbs up position, for several seconds?
    Do i need to export a frame and import it back to the timeline or what?
    thanks

    Cut the clip in the timeline at the point where you want the "Thumbs Up" to freeze and make sure the playhead is on that frame.
    Then select Modify>Make Freeze Frame.
    The freeze-frame will appear in the Viewer.
    Click on it and drag it down to the timeline.
    You will have to alter its length according to what you want.
    Ian.

  • BACD and hold times for Call Queue

    Hi Everyone,
    Is it possible to include hold times/wait times for BACD call queues?  Also, anyone run into issues when configuring BACD and the time it takes for it to ring in?  We had an issue previously that where the call would enter the queue, wait 30 seconds or so, and then ring out.  Unless this is normal.
    Thanks as always,
    HelpDesk

    Hi Help Desk,
    Its been a while since I configured this and I am not sure if the current versions of CCA allow for this change to take place.
    I know on the command line that this is possible, but ultimately it would be better to use CCA to make the changes as I am not sure if it would recognize the change if you did it via CLI.
    In the past as an alternative to hold times I did some work around's by pushing the BACD to an AA and putting in there some rudimentary options that would allow a user to go back into the line, but they would loose their position in doing so, but this shouldn't be a big problem.
    Also in terms of entering the BACD, I havent see the 30 second delay before so I am not sure what is going on there and I cannot say for that that it is normal operations for it.
    Cheers,
    David Trad.
    davidtradconsultinggmail.com

  • Samples and aiding docs for beginners

    Hi,
    Where can i find some sample models, apart from QuoteToCash..
    some samples that explain how to take inputs, capture KPIs, goals, objectives and assign rules..
    Say, for example, this is my scenario(might sound weird)..
    I want to compare 2 numbers and output the biggest of two.. Im writing a process for this..
    Here are my rules:
    both the number should be >=10 and <=20
    should be an integer
    Where should i feed these rules..
    how and whr should i give the inputs.
    Thanks,
    Vishnupriya

    Hi Vishnupriya,
    the easiest way is to put these rules directly into BPEL as you would do with a usual expression (e.g. for SWITCH conditions).
    However, a more elegant approach might be to use the Oracle Business Rules Engine. Have a look at http://download-east.oracle.com/docs/cd/B31017_01/web.1013/b28965/toc.htm
    Where should i feed these rules..You can add new rules via Oracle Business Rules Author, which is part of the Oracle SOA Suite.
    Within Business Processes (in BPA Suite) rule information are modeled via the Oracle Business Rules extension object. Later on, when you'd like to generate the BPEL process, the information you specified in Business Architect will be transformed into annotations. Based on these annotations you can integrate the rules into your BPEL process.
    Furthermore check out the SOA OrderBooking demo as another example regarding Business Rules:
    * http://www.oracle.com/technology/software/tech/soa/index.html
    * http://download.oracle.com/docs/cd/B31017_01/core.1013/b28764/intro_tour.htm
    Hope it helps,
    Danilo

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

  • Looking for a way to "deselect all" and "hold page" for bsp tableview

    Hallo Experts,
    I'm quite new to bsp programming. My first application is nearly complete, but I'd like to add some more convenience. I got two issues to solve, both connected with the tableview element.
    1) User is clicking through the pages of the table control, marks some lines and hits submit button. After the submit, the table is back to page 1. Is there a way to keep the page that was last viewed?
    2) Same situation. After the user has hit the submit button, I retrieve a list of all marked table lines. After I'm done, I'd like all lines to be unmarked. Does anyone know how to achieve that?
    Any help or hints are highly appreciated.
    Christian

    Hi Chris,
    1)User is clicking through the pages of the table control, marks some lines and hits submit button. After the submit, the table is back to page 1. Is there a way to keep the page that was last viewed?
    declare a global variable gv_visiblefirstrow.
    In EventHandler
    when 'submit'.
    gv_visiblefirstrow = request->get_form_field( 'your_tableview_id_visiblefirstrow' ).
    In Layout:
    Add the below line to code of your tableview
    visibleFirstRow     = "<%= gv_visiblefirstrow %>"
    2) Same situation. After the user has hit the submit button, I retrieve a list of all marked table lines. After I'm done, I'd like all lines to be unmarked. Does anyone know how to achieve that?
    After you are done..just add the code..
    Data: lv_total_rows type i.
          describe table itab lines lv_total_rows.
          cl_htmlb_manager=>check_tableview_all_rows(
          rowcount = lv_total_rows
          request = request
          id = 'tableview_id'
          check = ' '
    As suggested by Raja,pls search the forum before posting a new thread.
    Regards,
    Anubhav

  • I have an iphone 4ios and recently uploaded the new update.  since then i am unable to ssave pictures from say, facebook for example.  When i click on the picture and hold it for a moment until the save picture comes up, i hit save, and it does not save

    why am i unable to save photos on mu 4ios since i downloaded the recent update?

    See my response to your other post.

  • Selecting analog cutoff frequency for NI-USB 6251

    Hello everybody!
    -I´m trying to acquire voltage analog signals by using a BNC 2110 and a bord NI USB-6251. Does anybody know if a programmable analog lowpass filter is available for NI USB-6251? If it is available, how can I set a value for the analog lowpass filter on labview?
    thank you in advance,
    best regards!

    Thank you for this information John Passiak!
    -If there is no programmable analog lowpass filter for NI-USB 6251, so I will need to use the standart cutoff frequency "fc" of the analog lowpass filter (fc= 750 kHz, as mentioned in the user´s manual) for acquiring my signals. By doing so, it will be necessary to use a sampling rate of at least 1,5 MHz to digitize the signal, in order to avoid aliasing! The maximal sampling rate "fs" available is fs= 1,25MHz (according to the user´s manual). Besides, the duration of the signals which I need to digitize take about 25s. That would lead to a considerably higher number os data, and problems to open and save the signals in Labview!  How can I solve this problem?
    thank you again for your help!
    best regards!

Maybe you are looking for

  • My macbook pro doesn't bootbeyond the grey screen with apple icon and spinning wheel.

    My macbook pro doesn't boot beyond the grey screen with apple icon and spinning wheel.  I used the "Option" button to access the Disk Utility function and run Repair Disk and Repair Disk Permissions.  Should I restart my computer?

  • Sending mail smtp vs exchange without outlook mailbox opened

    We have an application published via Citrix Xenapp 6.5 on win2k8r2 servers which uses server-side Outlook for composing/sending mail.  The user does a one time setup of the Outlook profile through a Citrix published Outlook.exe.  After the setup thei

  • RMI connectivity problem (multi-NIC)

    I'm developing a simple photo share program with Java RMI. I connect rmiregistry (192.168.100.3), it returns the object reference, but when I invoke a method I get problems. My server (remote) - 192.168.100.3 - reply with an address of another NIC -

  • SQL Query Calculating Price based on logic

    Hi Experts, Here is my table records, SHIPMENT_ID     SHIP_PRICE     SHIP_ADDT_PRICE     PRODUCT_ID     PRODUCT_QTY 1000          3.95          1          12          2 1000          0          0          17          1 1000          6.95          2  

  • SnS Live Event Video

    Hello forum. I am setting up a DME 2200 to integrate  to my SnS in 5.2.3 version  But I have some errors in the browser where I tested. With Chrome and  Firefox shows this phrase : "Windows media plugin not installed click here to install" , and with