// SPiDCOM Technologies. // NĂ©lio Laranjeiro // 16-05-2008 // Cesar project. // This script will provide a function to generate a 50 Hz frequency // AC Line based on the NTB date with a little jitter. // Function to simulate the frequency of the AC line. // @param phy the previous value provided. // @param var The variation of frequency. // @Return phy + 250 000 function phy = phy_clock_get_zero_cross (phy) var = int(rand (1) * 1000); phy = phy + 1e6 + var; return phy; endfunction