I find MBD_toolbox not having the bolck as follows:
When I use encoder to get position signal, how do I do in MBD_toolbox?
Thanks a lot.
You can now use the eTimer_configuration and eTimer_capture blocks that offers you a high degree of flexibility in choosing what to do.
Hope this helps!
I found that the capture block is not the function I want.
Will there upgrade MBD_toolbox version to add CNTR block in the future?
Beacause the encoder IC sends out absolute position's pulses to MCU when encoder IC is reset, but the capture can't catch the pulses.
The attachment is my Model.
I don't think i'm getting what you are trying to do.
So the encoder IC will have 3 outputs: A, B and INDEX
A and B signal are quadrature signals and can help you identify the direction and number of counts.
The INDEX is a signal generated only one per rotation period to signal a rotation completion. In the software you can use the eTimer CAPTURE to get high-to-low or low-to-high transitions of this signal. Have a look at this video starting with 3.20 minute: Motor Control Class: Hall Sensors Reading Application
Nonetheless, you may or may not chose to use the INDEX in your algorithm. Since the encoder is a relative type of sensors - you will need to start the movement from a well defined position - usually in industry this is done by aligning the motor rotor with phase A: first you force the rotor to align with B phase and then you polarize the A phase and the rotor will be force to be aligned with that.
Then you start to count the relative counts for A/B signals. To know when a rotation is complete (emulate the INDEX) you can do a MODULO with the number of count per revolution given by your encoder.
This way there is no need for the third input INDEX
Anyhow - we will consider your feedback in case we will to an update for the MPC5744P toolbox. This request is logged as AST-648
I hope you can figure it out and resolve the application with the actual support level from the Toolbox.
Thanks your reply.
I'll try to use capture to resolve my problem.
I look forward to seeing the update for the MPC5744P toolbox.
Ok, please keep us posted about your progress.
Unfortunately i do not have an encoder to test it - but i'm pretty sure you could resolve it with the actual toolbox offerings.
Keep in touch!
Retrieving data ...