We met some problem. In order to measure real time speed, timer interrupt would be used in code. Timer interrupt will stop the main program in a certain period whilst a real time speed will be detected and send to serial chart, and then the serial chart will draw graphs according to each real time speed detected in every single period. Nevertheless, when the real time speed is measured, the main program is stopped and it may not send command to motor to adjust motor. It was never be done before, we did not know how to solve the problem, we searched on the Internet, and there was no a proper solution. As a result, we attempted to write the code first, see whether the problem would cause any negative influence. Then we consider we can write 'attachinterrupt' into the code to solve the problem.
Meanwhile, we wrote the figuration for serialchart and connected it to encoder to draw the graph of real time speed. On the left side of serialchart is the real time data that come from the motor, and on the right side is the configuration that needed to enter, at the bottom of serialchart will show the graph. There is a example of how does it draw the graph (In Figure 1) .
Figure 1
We received the PCB that we asked for last week (shown in Figure 2), hence, we began to solder the encoder with PCB, however, we did not finished soldering, thus, we left the soldering part to next week.
Figure 2


No comments:
Post a Comment