This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Dear expert,
My customer is using TTL encoder for testing motor speed. They find two issues:
1. The motor is found to rotate at a constant speed, QEPSTS[QDF] will be mutated from 1 to 0, after a pulse returns to normal. The QPOSCNT increases normally, does not decrease, and the AB change of the TTL encoder corresponds to a positive rotation. Please see figure 1.
2. In the process of motor acceleration and constant speed, the QCPRD will be inaccurate, the time mutation is large. Please see figure2.
figure1:
figure2:
[0]: AB
[1]: Speed
[2]: QEPSTS register
[3]: QPOSCNT
Hi Angela,
Are you using any of our examples as the base starter for this? Is the QCPRD being set to 0?
Best,
Ryan Ma
Here is the example which they use:
ti\c2000\C2000Ware_x_xx_xx_xx\device_support\f2837xs\examples\cpu1\eqep_pos_speed\cpu01\Eqep_pos_speed.c
Hi Angela,
A few questions:
In figure 2, is that when PWM frequency increases or decreases? Is that the only time when QPOSCNT is incorrect? Does it recorrect once it reaches constant speed again?
Best,
Ryan Ma
Hi Ryan,
In figure 2, the PWM frequency does not change. From below figure 3, you can see that QPOSCNT is increasing correctly, it is matched with the motor is rotating in positive direction. The red curve is the capture time, the blue curve is QPOSCNT.
Figure 3:
Does it recorrect once it reaches constant speed again?----The answer is yes. It occurs randomly. Below figure 4 is one of the circumstances.
Hi Angela,
Apologize but I have been without any internet the past couple of days due to Hurricane Beryl.
I plan on being back in the office tomorrow and will be able to update you on this query.
Best,
Ryan Ma
Hi Angela,
Are there any points in the code where the customer may be writing to the QPOSCNT?
Can you check the QEPSTS register to see if there are any flags being set?
Are the connections on the QEP pins stable and secure?
Best,
Ryan Ma
Hi Ryan,
Here is the answer:
Are there any points in the code where the customer may be writing to the QPOSCNT?------No
Can you check the QEPSTS register to see if there are any flags being set?------No
Are the connections on the QEP pins stable and secure?------Yes
Hi Angela,
Let me look into this, apologize for the delay i have been catching up with several requests.
I will respond with an update by end of day.
Best,
Ryan Ma
Hi Angela,
In the QFLG register are any of the bits set like PHE or PCE? How are you able to graph the QPOSCNT?
Best,
Ryan Ma
Hi Ryan,
There are only two area to operate the state register. One is in the initialization code, the other is in below code:
The QPOSCNT is graphed by polling and read the QPOSCNT register value every 62.5us.
Hi Angela,
Is customer using the CCS Graph tool? If so, can they share their settings?
Best,
Ryan Ma
Hi Ryan,
They use cpu timer(62.5us) to obtain the value of QPOSCNT, not use the CCS graph.
Hi Angela,
Can you close this thread now that we were able to conclude the EMS issue occurring?
BEst,
Ryan Ma