Tachometer and Encoder Simulink blocks (anything the requires an interrupt) only works in External Mode (Monitor and Tune), the can't be used in Connected I/O Mode
When using a pulses/rotation = 1920 for when the trigger is set to CHANGE, there appears to be aliasing in the calculated speed of the motor when the PWM command rises above 120. i.e PWM=[0:120] -> RPM = [0:100], PWM =[120:200] -> RPM=[0:50]
Therefore, when using Tachometer the trigger will be set to RISING and the pulses/rotation = 960.
Tried using the Encoder block that requires ports of quadrature encoder to be connected to both be connected to interrupt pins. Appears to work.
***It seems that Simulink is unable to maintain communication with the Arduino when it is receiving messages from more than 2 interrupt pins at once.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.