I am trying to replicate the functionality of the Discrete Order Hold Function so that I can use it without having to have a ''Control and Simulation Loop''. The attachment desiredresult.vi shows an example of the Discrete Order Hold Function inside the ''Control and Simulation Loop''. The other attachment (zeroorderholdquestion.vi) shows my attempt at achieving the same result. I multiplied the while loop index by the sampling period to get the array index for the resampled y-output. I based this on my understanding of the formula for Discrete Order Hold given under http://zone.ni.com/reference/en-XX/help/371894G-01/lvsim/sim_dzoh/#details.
However, I am having difficulty getting the frequency of the waveforms before and after resampling to match up. (See attachment for clarity on what I mean by this). Any suggestions on what I am doing wrong?
Solved! Go to Solution.
here i wrote something maybe similar to simulate a multi channel, mux, sample and hold with cross talk 🙂
If samplerate and hold time have a clean ratio you just need the decimate vi 🙂
another simple version:
Have a look at the
Owning Palette: Waveform Conditioning VIs
Requires: Full Development System
Resamples input waveforms or data according to the user-defined t0 and dt values. Wire data to the waveform or data input to determine the polymorphic instance to use or manually select the instance.