Showing results for 
Search instead for 
Did you mean: 

How can I create and sample and hold circuit in Labview?

Go to solution

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!

0 Kudos
Message 1 of 8

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.



0 Kudos
Message 2 of 8

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. 

0 Kudos
Message 3 of 8
Accepted by westerman111

How about something like this??

0 Kudos
Message 4 of 8

You can do the same without any local variables... 😉

0 Kudos
Message 5 of 8

Hmm local variables?


Give me a hint! Smiley Happy

0 Kudos
Message 6 of 8

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.)


Message 7 of 8

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 😄

Greetings from Germany

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

Message 8 of 8