02-16-2022 05:18 AM
Hi,
I'm currently using two digilent myRIO motor adaptors to control 4 quadrature motors. 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 plan to use the MSP connector to reach the encoder signals, however I was wondering if the wires could be directly wired to the pin headers of the adaptor? Do I need to attach a power+ground also?
Any help is appreciated.
02-17-2022 12:07 PM
Hi all,
So I get C/ENC1 to wotk with port B and the two seperate motors get two seperate encoder readings etc. However my problem is with C/ENC0. Motor 1 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 4 changes direction.
I'm not to sure what is going wrong as I've doubled checked the connetions. I've attached the code also.
03-04-2022 08:12 AM
Hi ar38160.
How do you guess that it returns the wrong value?
03-04-2022 08:18 AM - edited 03-04-2022 08:22 AM
Hi!
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 1 +4 work 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 a photo to show this.
Basically the behaviour seen on MXP B is not the same on MXP A. Possibly due to the encoder signal or PWM signal. I've connected Motor 1 to A/ENC now and it counts up/down fine on it's own. However, motor 4 is now connected to C/ENC0 and the counter direction still doesn't change unless motor 1 counter direction changes.
03-04-2022 08:26 AM - edited 03-04-2022 08:46 AM
Do you use something like in the attached picture?
03-04-2022 08:30 AM
Sort of, but I have 4 DC Geared Motors and 2 myRIO Motor Adaptors.
MXPA( motor adaptor 1) has Motor 1(A/ENC) and Motor 4(C/ENC0).
MXPB( motor adaptor 2) has Motor 2(B/ENC) and Motor 3(C/ENC1).
I've attached an images to show the layout of the robot.
03-04-2022 08:39 AM
I found the LabVIEW code. Can you try to change this code and write the result?
Digilent Motor Adapter for myRIO Example Code - NI Community
03-04-2022 08:46 AM
One more example of code.
Digilent Motor Adapter for myRIO Stepper Motor Example Code - NI Community
03-04-2022 09:02 AM
I tried the code and the same results happend.
03-06-2022 11:47 PM
Can you try to put every motor in different loops? Whats the result?