03-02-2022 05:16 AM - edited 03-02-2022 05:24 AM
Hi!
I'm currently working on a robot which uses 4 DC Geared motors with encoders and 2 MyRIO Motor Adaptors, whith either one being connected to MXP A and MXP B of the myRIO. However, I've came to notice an issue with the motor adaptor boards, they do support two DC motors but only provide one encoder reading.
Therefore, I decided to use C/ENC0 and C/ENC1 from the MSP connection of the MyRIO in order to have additional encoder signals. I get C/ENC1 to work with port B and the two seperate motors get two seperate encoder readings etc. However my problem is with C/ENC0. Motor 4 is getting an encoder reading however it's not changing the polarity of the count when the motor changes direction. It only changes polarity when motor 1 changes direction.
I've tried switching the encoder signals around ( C/ENC0 to MXP B and C/ENC1 to MXP A) and when C/ENC1 is connected with MXP A motor 4 works perfectly! But when C/ENC0 is connected MXP B the same behaviour as seen on MXP A is shown in Motor 3 (count direction).
I've attached my VI which shows each connection made and I've also attached images of the connections, showing the C/ENC encoders. I would appreictae any help, I'm hoping this is just a small error I've made!
MXP A - Motor 1(A/ENC)+ Motor 4 (C/ENC0)
MXP B - Motor 2 (B/ENC)+ Motor 3(C/ENC1)
Best wishes.
03-07-2022 02:01 AM
Hello. Can you try to put every encoder in different loops and use it separately?