Welcome, Guest
  • Page:
  • 1
  • 2

TOPIC: Help with Encoder counts calculation

Re: Help with Encoder counts calculation 5 years 11 months ago #1613

Thanks,
My application is using the motor via RS232 commands, in velocity mode.
I was trying to create a soft limit that acted like a "cushion" so instead of using the SLN= XXXX , and then waiting for negative soft limit flag to be set then decelerating the motor to a stop ( using a fixed DT of 500), the motor would of traveled past the desired stop position ( I must decell the motor to complete stop due to the load )
So what I was thinking, was every time I send a new VT=XXX command to the motor, I would calculate how many position clicks it would take to decell from VT=xxx to a VT=0 using the fixed DT of 500. ( decell_clicks )
My software would then monitor the motor position, when the current position + decell_clicks is greater than the set soft-limit position, I would issue a VT=0 command.
I'm aware the motor would not stop exactly on the mark due the delays with polling commands etc but for the application, slowing to a stop is preferred to a crash stop etc.

Maybe there is another way to achieve this?

Thanks
Cameron
The administrator has disabled public write access.

Re: Help with Encoder counts calculation 5 years 11 months ago #1614

  • csearcy
  • csearcy's Avatar
  • OFFLINE
  • Moderator
  • Posts: 464
  • Thank you received: 80
  • Karma: 23
Is this on a linear actuator or something that rotates forever until it's told to stop?
The administrator has disabled public write access.

Re: Help with Encoder counts calculation 5 years 11 months ago #1615

No, it's part of Camera Crane we are developing, the motors operate the boom and slew etc (via gearboxes ). I'm trying to avoid sudden stops to the Camera and Gimbal etc
The administrator has disabled public write access.

Re: Help with Encoder counts calculation 5 years 11 months ago #1616

  • csearcy
  • csearcy's Avatar
  • OFFLINE
  • Moderator
  • Posts: 464
  • Thank you received: 80
  • Karma: 23
Ok. Here's an approach that may apply. This is related to jogging/moving any axis.

The usual approach to jogging something is to use Velocity Mode... which requires an operator to hold a button or control while it's moving... towards some known limit... usually defined as a soft limit or an actual hardware switch. The problem is the programmer doesn't want them to hit the soft limit or the actual hardware switch.

The Workaround...

Jog in Position Mode. Set the target to be just before the soft limit or hardware switch. In the code... allow the move to continue... until the operator releases the button or control... then issue the X command to decal to a stop.
IF... the operator doesn't release the button or control... the Position Mode Decel will kick in anyway... so a nice soft stop happens just before a limit fault occurs.
The administrator has disabled public write access.

Re: Help with Encoder counts calculation 5 years 11 months ago #1617

Ok, will do some testing today and see how I get on.
Thanks
Cameron
The administrator has disabled public write access.

Re: Help with Encoder counts calculation 5 years 11 months ago #1618

  • csearcy
  • csearcy's Avatar
  • OFFLINE
  • Moderator
  • Posts: 464
  • Thank you received: 80
  • Karma: 23
Great. I would be interested to know if that works for you.
Btw.. We also support the DMX protocol now if you run into any applications with lighting controllers, etc.

Cheers,
Chuck
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.518 seconds
Powered by Kunena Forum