Set Encoder Counter to zero

8 years 3 months ago #29527341 by Geva
Hello,
I am using the SDC2130-S with \"Roboteq v1.2 RCB100 06/03/2012\" firmware.
When on closed loop count position mode and i try to set the encoder counter to 0 with !C or !H command the motor start turning very fast to the current encoder count. I tried to set the desired position to zero with !p command but that didn\'t work. I cant figure out how to zero the encoder counter while keeping the motor still. the only way that worked was to reset the controller with the %RESET command but that is not an option for me.
thank you,
Yam

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

8 years 3 months ago #29527343 by roboteq
Replied by roboteq on topic Re:Set Encoder Counter to zero
You can try changing the configuration on the fly to open loop, reset the counter, reset the destination, then switch to closed loop again.

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

8 years 3 months ago #29527345 by Geva
Replied by Geva on topic Re:Set Encoder Counter to zero
I tried, it didn\'t worked.

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

8 years 3 months ago #29527353 by Geva
Replied by Geva on topic Re:Set Encoder Counter to zero
I\'m not sure if this is related but when switching from closed loop speed mode to closed loop position mode the controller is going crazy driving to motor very fast to the previous encoder count. Also when changing back to speed mode there is a small movement of the motor (maybe because the counter has some initial value).
Any ideas\\solutions?

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

8 years 3 months ago #29527355 by roboteq
Replied by roboteq on topic Re:Set Encoder Counter to zero
we\'ll take a look

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

8 years 1 month ago #29527431 by Geva
Replied by Geva on topic Re:Set Encoder Counter to zero
any news?

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

8 years 1 month ago #29527455 by jwj27
We are having the same problem here, trying to set the counter to zero will result in the motor suddenly spinning at full speed to its original counter value.

One \'solution\' I found is to write a basic script that sets the motor power to 0, counter and desired position to zero, wait for the closed-loop error to become 0, then set the motor power back to 100%. That works if the motor can stop for a second, but in a conveyor belt or lift application that is not always possible. And these are exactly the applications where there\'s a risk of counter overflow.

It seems the SDC2130 has some internal counter which counts to the desired position set by the !P command, taking in account the maximum RPM and acceleration set in the configuration program. The closed loop error is the difference between this internal counter and the actual encoder counter, which is fed through the PID controller, which controls the motor directly. Am I right?

I think it would make more sense if this was done exactly the other way around. The PID error is simply the difference between the current encoder count and the desired position, and the maximum speed/acceleration settings are applied after the PID control. That way, setting the counter and desired position to 0 simultaneously will not change the PID error and will not move the motor. Likewise, any sudden changes in PID error will not make the motor jump backward to correct it, instead it should just follow the maximum speed/acceleration settings.

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

8 years 1 month ago #29527479 by jwj27
Any updates on this problem yet?

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

8 years 1 month ago #29527487 by roboteq
Replied by roboteq on topic Re:Set Encoder Counter to zero
In count position mode, every 1ms the controller computes the counter value that is expected at that time. This way it can build the desired speed/position profile for the entire motion.

Resetting the counter is going to have adverse effect and should done at power up and be left alone for as long as possible.

We advise resetting the counter only while in open loop mode and then switch to closed loop mode.

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

7 years 6 months ago #29528004 by edmodi
I have the same problem as firmware 07/27/2012. Any news?

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

Moderators: tonysantoni
Time to create page: 0.146 seconds