日本語
English
Steps for FFT Analysis of Analog Input and Graph Display (4/5)
Procedure
- Step 7: Create Test Data
- 7-1. Create test data
- 7-2. Program assignment settings
- 7-3. Change the analog value capture part
- Step 8: Graph the Test Data
- 8-1. FFT result at 1 kHz
- 8-2. 2 kHz graph
- 8-3. 50 Hz graph
- Step 9: Data Actually Acquired from Analog Input
- 9-1. Input data from analog
- 9-2. FFT result
Step 7: Create Test Data
7-1. Create test data
Add a new program and add the program below to create a test waveform
dummyPower is the waveform amplitude and dummyFreq is the frequency; change them freely to create test data
Values are put into the global arrays dummyAnalogInputValue_1_10 and dummyAnalogInputValue_10_20, which replace the high-speed analog unit inputs
dummyPower is the waveform amplitude and dummyFreq is the frequency; change them freely to create test data
Values are put into the global arrays dummyAnalogInputValue_1_10 and dummyAnalogInputValue_10_20, which replace the high-speed analog unit inputs
7-2. Program assignment settings
Add the test program to the primary task
7-3. Change the analog value capture part
Comment out the high-speed analog unit inputs and change the analog input to the test data
Step 8: Graph the Test Data
8-1. FFT result at 1 kHz
This is the graph of the FFT result after turning FFTStart ON
The PowerSpectrum value is correctly large at 1 kHz
The PowerSpectrum value is correctly large at 1 kHz
8-2. 2 kHz graph
Graph with the test data's dummyFreq changed to 2 kHz
Showing page 2
Showing page 2
8-3. 50 Hz graph
Graph with dummyFreq changed to 50 Hz, below the high-pass filter cutoff frequency (100 Hz)
It is much smaller
It is much smaller
Test data graph display complete
We were able to display the graph of the FFT results for the test data and the analog graph
Step 9 shows the results from actual analog input
Step 9 shows the results from actual analog input
Step 9: Data Actually Acquired from Analog Input
9-1. Input data from analog
Showing the first 500 ms of analog data
With actual analog input the input values are scaled; adjust according to the data you acquire
With actual analog input the input values are scaled; adjust according to the data you acquire
9-2. FFT result
The acquired waveform seems to show components around 120 Hz, 240 Hz, 360 Hz... harmonics of 120 Hz
There is also a large component around 700 Hz
In this way we could see what components the waveform contains
There is also a large component around 700 Hz
In this way we could see what components the waveform contains
On the next page
On the next page, we output the FFT results to a csv file and import it into Excel
