I want to sample current across inductor in regular time samples. For example find current delta at t(i+1)-t(i). How can I implement that. I tried using function block. inductor current is a continuous signal. I want to find delta between two successive samples continuously.

> I want to sample current across inductor in regular time samples.

If the sample instances are fixed, then one approach is to use the Zero-Order Hold (ZOH) Block with a Discrete-Periodic sample time input. You can enter the sample time parameter as “Tp” or “[Tp,To]” where Tp is the sample period and To is the offset in seconds within that sample period (0≤To<Tp). You could then use ZOHs with different offsets and subtract the results.