1 In detail, describe the process of setting up analog inputs and outputs for a range of -10V to 10V in 2s compliment in realtime sampling mode.
2. Develop a program to sample analog data values and calculate the average, standard deviation, and the control limits. The general steps are listed below.
1. Read ’m’ sampled inputs.
2. Randomly select values and calculate the average and store in memory. Calculate the standard deviation of the ’n’ stored values.
3. Compare the inputs to the standard deviation. If it is larger than 3 deviations from the mean, halt the process.
4. If it is larger than 2 then increase a counter A, or if it is larger than 1 increase a second counter B. If it is less than 1 reset the counters.
5. If counter A is =3 or B is =5 then shut down.
6. Goto 1.