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.

TMDSCNCD28388D: Mech scalar value error

Part Number: TMDSCNCD28388D
Other Parts Discussed in Thread: C2000WARE

Hi E2E,

Good day.

Our customer is encountering an error in using the f2838x examples as follows:

I took example 2(position speed calculation) in the eQEP folder in f2838x related examples from c2000ware. Encoder which I use outputs 3600ppr. So, I changed the mech scalar value to 4660. But then the theta mech value for one complete revolution changes from 0 to 31000(final value is not being constant). I found that the final value after completing a revolution is not being constant, It is fluctuating around 31000 + or - 500. And another change in the code which I did is changing the reset mode to max position instead of index position. Could you please give me the source of the error? Also, mention the methods to fix the error? There is no problem with the encoder.

Thank you for your help.

Regards,
Carlo

  • Hi Carlo,

    Can you please clarify how did you compute mech scalar value to 4660. For 3600ppr, I would assume the mech scalar value to be 3600, since it will generate 3600 pulses per revolution. Am I missing something?

    Best Regards,

    Nirav

  • Hello Nirav,

    According to our customer, when it was 1/3600, mech theta is changed from 0 to 32700 four times in a complete rotation of encoder. The customer changed it to 1/(3600*4) which is equivalent to 4660 in IQ26 form.

    Regards.
    Carlo

  • Hi Carlo,

    The IQmath conversion you did looks correct. Does the mech scalar value accept the value in IQmath? Can you check if you need to convert back to float at some point later?

    NIrav,

    Can you also comment on this?

    -Shantanu