Closed Loop Position Mode with SDC2130

9 years 3 months ago #29525669 by rfrancis
I have, in the past, made a very successful control system with an AX3500 (it controls the rotation of an observatory dome and slaves it to the telescope position). I have written both a stand-alone application and a plug-in for a well-known commercial software.

However, now that I am switching to the SDC2130 I am having conceptual problems with the closed-loop position mode. As far as I can tell it seems that the only way of making this work is to use relative positions in the range -1000 to 1000. If this refers to encoder counts then i\'m really scuppered -- my encoder count is about 116500 for a full revolution. This is probably not ideal but it\'s the encoder I had handy, a 256 CPR model (therefore 1024 PPR, see the PS). Even the lowest count model in the range, at 100 CPR, would still give 45500 counts for a full turn (or 182000 pulses).

So this new position mode may have been OK except for this limitation of +/-1000. It\'s a bit hard to say since the documentation is very vague -- although the G command seems straightforward, the description of EHL and ELL make this totally confusing.

Probably the command I want is P, but this one is not yet implemented, I just discovered.

Please let me know how I can achieve closed-loop positioning over a large span of encoder counts.

thanks,
Richard

PS: the description of EPPR on p.131 warns not to confuse PPR and CPR, but I think the description is wrong. The manufacturer of my encoder, US Digital, says PPR is 4x CPR, not the other way round as written here.

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

9 years 3 months ago #29525671 by roboteq
Replied by roboteq on topic Re:Closed Loop Position Mode with SDC2130
You need to go in the encoder configuration tab and enter a min and max count. The min count will be considered at the -1000 position, the max count will be the +1000.

This should work for you if you find the +/-1000 count to provide sufficient resolution for you.

There is another mode that lets you go to a specific count number. It will be released shortly. Let us know if you want to receive a beta version earlier.

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

9 years 3 months ago #29525673 by rfrancis

You need to go in the encoder configuration tab and enter a min and max count. The min count will be considered at the -1000 position, the max count will be the +1000.

Yes, I sort of figured that out after realising that the manual probably had typos, which is what made it confusing.

This should work for you if you find the +/-1000 count to provide sufficient resolution for you.

In fact it does not -- if I had the full dynamic range of +/-1000 available it would still be about 0.2 degrees resolution (not as good as I would like) but in fact I can\'t use this range. My system runs in a complete circle without end stops. Imagine the home position is at 0deg azimuth and I allocate +1000 to be at +180 deg azimuth and -180deg at -1000. Then if I want to move from +179deg to -179deg (only a 2 degree movement) I would have to traverse the entire circle.

No matter how I try to do it I\'ll end up with such discontinuities.

My old AX3500 system, where I handle the encoder values directly, works perfectly, and I want to be able to do that.

Therefore ...

Let us know if you want to receive a beta version earlier.

Yes please!
Especially if it also fixes this: dev.roboteq.com/dev1/online-forum/genera...es/header-on-sdc2130

thanks,
Richard

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

9 years 3 months ago #29525687 by rfrancis
Any update on this?

I\'m at a dead-end until there\'s a proper closed-loop position mode.

cheers,
Richard

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

9 years 3 months ago #29525693 by roboteq
Replied by roboteq on topic Re:Closed Loop Position Mode with SDC2130
Beta firmware is attached.

To do this, we have added a new position mode that will let you move from one counter value to another counter value with a programmable acceleration, steady velocity, and deceleration.

To enter this mode you will first need to configure the encoder so that it is used as feedback for motor1 (and feedback for motor2 on the other encoder).

Then select the Motor Mode 3. This is not a valid menu on the release version of the Roborun PC utility, so you will need to go to this mode from the console with the following command:

^mmod 3 (to change the mode)
%eesav (to save the config in eeprom)

you should also set the default acceleration, decelleration and position mode velocity in the motor menu. You will be able to change these values on the fly if needed.

Then to go to an encoder position value, just use the !p command:

example: !p 1 10000, will get the motor to move to absolute counter position 10000. You will notice the smooth ramp up and down so that the motor gently stops at count 10000

The !pr command is similar except that it gives a count to go to that is relative to the current counter value. So sending !pr1 10000 repeatedly will cause the motor to move an additional 10000 count every time. (beware that this will work until you reach the maximum counter value of +/-2,000,000)

At any time you can change the acceleration and velocity uising the !ac (acceleration in RPM/s*10), !dc and !s. Example !ac 1 10000 = acceleration for channel 1 is 1000 RPM/s

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

9 years 3 months ago #29525695 by roboteq
Replied by roboteq on topic Re:Closed Loop Position Mode with SDC2130
fimware file

Attachment sdc2130_50firmware_v12_050811.zip not found

Attachments:

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

9 years 3 months ago #29525697 by rfrancis
That\'s great -- I look forward to trying this over the weekend.

Now I just have one question and another request:

The question -- could you answer my earlier question:

PS: the description of EPPR on p.131 warns not to confuse PPR and CPR, but I think the description is wrong. The manufacturer of my encoder, US Digital, says PPR is 4x CPR, not the other way round as written here.


The request -- a command to read the encoder value.
In my application I have to know how many encoder counts are in a full revolution. With the AX3500 I had a procedure to find home, note the count, rotate until I found home again, then subtract the two counts. I can\'t do that any more without such a command. Luckily I still know how many counts that was, but if I change anything I will again be stuck.

And it means I can\'t distribute the design.

Thanks,
Richard

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

9 years 2 months ago #29525709 by roboteq
Replied by roboteq on topic Re:Closed Loop Position Mode with SDC2130
PPR is pulses per revolution
CPR is counts per revolution. There are 4 counts per pulses since the counter is incremented at each pulse transition x 2 phases.

The counters can be read using the ?C or ?CR queries.

?C returns the absolute counter values. ?CR returns the number of counts since the last ?CR query

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

Moderators: tonysantoni
Time to create page: 0.130 seconds