|
|
Chan1_V = 5.0 + 0.1 * sin(2 * 3.1416 * 0.5 * t) ;
Chan2_Temp = 22.0 + 3.0 * sin(2 * 3.1416 * 0.01 * t);
if (sin(2 * 3.1416 * 0.2 * t) > 0)
{
Chan3_Current = 0.5;
}
else
{
Chan3_Current = 0.0;
}
t_mod_8= t - 8.0 * floor(t / 8.0);
if (t_mod_8 < 4.0)
{
Chan4_NIM_V = 2.5 * t_mod_8
}
else
{
Chan4_NIM_V = 20.0 - 2.5 * t_mod_8;
}
double t_mod_10;
t_mod_10 = t - 10.0 * floor(t / 10.0);
Chan5_Current_Out = 2.0 * (t_mod_10 / 10.0) - 1.0;
Chan5_Current_Out = fabs(Chan5_Current_Out);
Chan5_Current_Out = 2.0 * (Chan5_Current_Out - 0.5);
double magnetic_gain = 100.0;
double noise_amplitude = 5.0;
Chan6_Magnetic_Field = magnetic_gain * Chan5_Current_Out
+ noise_amplitude * rnd()
+ 2.0 * Chan5_Current_Out * Chan5_Current_Out;
|
|