From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Solved!
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
(7,428 Views)

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

0 Kudos
Message 2 of 8
(7,402 Views)

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
(7,378 Views)
Solution
Accepted by topic author westerman111

How about something like this??

0 Kudos
Message 4 of 8
(7,367 Views)

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

0 Kudos
Message 5 of 8
(7,354 Views)

Hmm .....no local variables?

 

Give me a hint! Smiley Happy

0 Kudos
Message 6 of 8
(7,332 Views)

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
(7,240 Views)

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

 

S&Hsim.png

 

I was to lasy to add the bit resolution digitizer ....

Have fun 😄

Greetings from Germany
Henrik

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
(7,213 Views)