Menu

Topic-icon XDC2230 Closed Loop Count Position setup

More
1 year 2 months ago #29534073 by iops425
Hi I have a 256 PPR encoder on an output shaft. I have it hooked to the encoder input 2 (2A and 2B). I have confirmed that the count works. I am getting 4xPPR (1024) as counts per revolution as expected. The count is also increasing with positive RPM and the positive slider on roborun+ Run tab. It all seems to work fine in open loop mode. I have tested the use of the max and min counts in encoder settings by setting the 2.5 turns (+- 2560 counts) needed in each direction as limit switches, and this all works as expected in open loop.

My Problem is when I set the controller up to do closed loop count position mode. It doesn't actually do anything when I move the sliders in the Run Tab (Roborun+). I have played with many P values just to get some movement on the motor 2 channel to no avail. I log the count, the command, motor current or power. My understanding is that the controller maps the min and max counts in the encoder tab to +-1000 and that the slider in Run tab should then be a desired position based on the max min counts. Anyway when I am at the 0 position and I go to +1000 on input slider I get no movement. The log of command shows 1000 but there is no current and no movement. If I manually move wheel a small amount this is definitely seen in the count log.

I have set the encoder for feedback2 for channel 2 encoder. When I log feedback it looks like its RPM not position in counts. The output shaft does a max of 120 RPM and I have set this in the closed loop parameters and I have set it to 5 turns from min to max to match the 2.5 revolutions in each direction. I also disabled the loop error detection just to try and get some movements. I confirmed that the acceleration values were high enough to get a good response in open loop.

I am not sure what I am doing wrong, I checked all the other similar posts which seemed to be resolved by making sure there wasn't a conflict between pulse inputs and Encoder input, the XDC controller has a separate port for the encoder inputs independent of the pulse inputs, and I cant find anything to suggest otherwise in the Data sheet.

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

  • Gabriel_Isko
  • Gabriel_Isko's Avatar
1 year 1 month ago #29534077 by Gabriel_Isko
Replied by Gabriel_Isko on topic XDC2230 Closed Loop Count Position setup
The sliders on our run tab command motor commands, which are not used in Count Position mode. You should be using Position Relative mode to achieve the behavior you are describing.

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

More
1 year 1 month ago #29534089 by iops425
Thanks that definitely worked. Does that mean you can only use the count position mode from scripts?

Thanks

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

  • Gabriel_Isko
  • Gabriel_Isko's Avatar
1 year 1 month ago #29534090 by Gabriel_Isko
Replied by Gabriel_Isko on topic XDC2230 Closed Loop Count Position setup
In Count position mode, you set the desired position of the motor output with !P. The position is in counter ticks. On a brushless motor you get these from your encoder. It is recommended for when you want to accomplish motion profiles without any bounds.

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

Moderators: tonysantoni
Time to create page: 0.084 seconds
Go to top