sdc2160 How to read the encoder value

4 months 1 day ago #29534998 by sunghoya1993
hi
I will use a motor driver on ROS
I installed Roborun to check if the encoder value is read
I'm using 38 Poles Magnet 38 P/R encoder motor
But I am not sure how to set up this program.

The counter value is not read because the settings are made as in the picture.
ENC1A / B- motor1 encoder
ENC2A / B- motor2 encoder
5v/gnd each connected according to the pin map

Is the setting on the program the same as EMOD and EPPR?

If it is correct, can I set it to ^ EMOD 1 18 ^ EMOD 2 34 in ROS?
I think that it is not necessary to configure in ROS if you configure it on Windows and save it to the controller.
 
It was confirmed that the encoder was operating normally.
Tell me how to set up
Sorry for not being good at English
Attachments:

Please Log in or Create an account to join the conversation.

4 months 1 day ago #29534999 by SeMi
Hi,
I'm not sure if I understand what you try to do, but here some hints:
1. as long as you don't want to run closed loop on the controller you don't have to activate Feedback on the Inputs/Outputs pane.
2. if you want to run closed loop you should only use one input as feedback per channel (Inputs/Outputs pane) and change to closed loop in the Output pane.
3. no matter in what control mode to read encoder you use the querries: C for absolute counts, CR for relative counts, and there are more if you want the calculated speeds or positions. refer to the manual for what you need:  www.roboteq.com/docman-list/motor-contro...user-manual-v17/file
(search for "Read Encoder")

best, Sergio

Please Log in or Create an account to join the conversation.

4 months 1 day ago #29535000 by sunghoya1993
Thank you very much for your reply.

I'm following this step.
You said "you should only use one input as feedback per channel"
There are two motors per phase, a phase and b phase
I'm making a differential-drive vehicle

Motor1 - HALL SENSOR A/B -> ENC1 A/B  vcc->14 gnd->5
Motor2 - HALL SENSOR A/B -> ENC2 A/B vcc->14 gnd->5
This is my current pin connection  
In the program, encoder 1 checked 1 and encoder 2 checked 2 And pulse input is disabled.
Then, in RUN, it seems that the DIN should light up in order, but it does not come out in order.
Attachments:

Please Log in or Create an account to join the conversation.

3 months 4 weeks ago - 3 months 4 weeks ago #29535001 by george_f
Hello sunghoya1993, 
i understand that you are using an SDC2160 controller but i am not sure what type of motor you are using and what type of encoder do you have.
From the last post you had made i can see that your motor has Hall sensors. Is that right? 
Hall sensor are commonly used in Brushless dc motors and not in Brushed DC.
So could you please provide me those information?
If you are using a Brushed DC motor you should connect ENC1A and ENC1B to pins 4 and 8 accordingly and ENC2A and ENC2B to pins 10 and 15 accordingly as per dataheet.
After that you should set in configuration panel the correct value of PPR of your encoder and try to run it in RUN tab using the slider and having selected the following log configuration to monitor (always keep in mind to uncheck "mute" box left of the slider).
Test that first and we will go to the next step after that.  
But i am having a doubt about the motor you are using, maybe it is not  Brushed DC, thats why i consist to send the data of the motor and the sensor in order to help you.
Attachments:
The following user(s) said Thank You: sunghoya1993

Please Log in or Create an account to join the conversation.

3 months 3 weeks ago #29535003 by sunghoya1993
Thank you for your reply
The motor has an encoder, but it was confirmed that the encoder value does not output perfectly.
So, when the encoder was changed, the value was output properly.

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.497 seconds