Subversion Repositories f9daq

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
355 f9daq 1
Fourier transformation
2
 
3
It is IMPORTANT to put ADC and GRBL Arduino into right USB ports in computer. (for Windows) In the code ports are fixed on COM6 for grbl (stepper motor) and COM7 for ADC.
4
If changed, change "name" of the port in function "initialize" and "initialize_voltage" ( OpenComConfig (pCOM1, "COM6", 115200, 0, 8, 1, 512, 512) - second parameter).
5
 
6
Buttons "Start, Stop" are for scanning Num. of points of voltages and then with "Fourier" making a pop-up window of fourier transformation. Then both files Voltage.txt and
7
Fourier.txt are created.
8
 
9
On the right side is "Example" - takes the amplitudes a1,a2 and frequencies f1,f1 as an input and calculates the fourier transformation of a1*sin(f1*t)+a2*sin(f2*t).
10
 
11
Button "Voltage only" - "Start" is for measuring voltage in real time. Mark the toogle button "Fixed range" for range [0,2] or [0,5], depending on measurment. If something strange
12
happens to range, just restart the run. While "Voltage only" scan is in process, one can move the stepper motor left/right to see voltage differenceas the motor runs. And if the
13
stepper motor is far from starting position 0, just reset the position with button "Set position on 0" (that just closes the port and then opens it again since that is the
14
only way to reset the GRBL).