Closed loop position counting with PWM (RC) signal - winch

2 years 3 months ago #29533834 by specyfick
Dear Community,
I have w SD2130 connected to the motor with encoder. On the motor I have a line. This is some kind of winch.
In closed loop position count mode after !P 1000 command motor is rotating ie. one time.
I want to drive it via RC but proportionally. Means exact number of RC signal gives me exact engine position.
Start position zero, ENC zero.
RC signal from 1000 to 2000.
For example:
RC signal 1000 engine goes position is zero.
RC signal 1500 engine goes position to ENC 1500 x scale factor.
RC signal 2000 engine goes position to ENC 2000 x scale factor.
RC signal again 1000 engine goes position is zero, or comes back until end switch signal is activated. The ENC set to zero.

Could somebody just briefly give a script draft. I will then scale and calculate factors to set it to exact number of turns.
This basic is a very new for me.

Thanks in advance.

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

2 years 3 months ago #29533835 by Gabriel_Isko
You can accomplish this without a script by using Closed Loop Relative Position mode. It is documented in Section 11 of our User Manual .

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

Moderators: tonysantoni
Time to create page: 0.127 seconds