03-28-2013 05:37 AM
I am trying to find a simple way to create a sample and hold circuit in Labview for analog to digital conversion. Any suggestions are appreciated!
Solved! Go to Solution.
03-28-2013 08:29 AM
Can you explain more learly what you are trying to do?
LabVIEW is a program which runs on digital computers. It operates on digital values.
If you want to convert some continuous voltage signal to a digital representation, you need some kind of hardware - an electronic circuit - to do that conversion. NI offers a wide variety of A/D conversion devices, software drivers for them, and LabVIEW to control all of those.
Lynn
03-28-2013 03:47 PM
I am generating a continuous sinusoid with the waveform generator in Labview. I want to simulate a sample and hold circuit, not actually use separate hardware.
03-28-2013 04:22 PM
How about something like this??
03-28-2013 06:01 PM
You can do the same without any local variables... 😉
03-29-2013 05:08 AM
Hmm .....no local variables?
Give me a hint!
04-27-2013 01:11 PM - edited 04-27-2013 01:12 PM
Shift Register.
Also both cases of the case structure do the same thing with the boolean: (Flip its state.) That is a Not function and it is moved outside of the case stucture.
(Note, the boolean wire through the case structure may not be necessary. It all depends on whether you want the indicator to change appearance after the sample value is shown. In real life, this would appear to be simultaneous and shouldn't matter. But wiring it through effectively makes the VI behave more like what you have coded up.)
04-29-2013 06:48 AM
Out of curiosity and for educational reasons I build a simple Sample & Hold simulation for a multiplexed input including the effect of crosstalk due to the S&H cap.
Crosstalk can be seen in the pic on the dark blue Out 4 plot 🙂 and the per channel group delay ...
I was to lasy to add the bit resolution digitizer ....
Have fun 😄
04-23-2025 05:14 AM
Henrik, I apologize. I wasn't even thinking when I PM'd you that you wouldn't receive a link to the VI I was referencing. But, I've copied the PM here and I hope it finds you well. I've been studying your S&H simulation with MUX and crosstalk. Beautiful work! I hate to ask and expose my pitiful working knowledge of LabVIEW as compared to yours, but I cannot for the life of me fisure out how to take your example and "dumb it down" to just one sine wave and its associated sample and hold representation. The multiplexing and sample cap has me stumped. I know I can either just set the front panel No. Channels control to 1 and/or turn off the Plot Visible option for all except 2 of the traces, but I'm trying to understand what it actually is that you're doing with the multiplexing and the crosstalk. Would you be willing to help improve my knowledge of the subject, or point me in the right direction.
04-23-2025 02:27 PM
However, doesn't seems to be the right thread 😉