News:

  • October 14, 2025, 11:14:32 AM

Login with username, password and session length

Author Topic: Do-More motion using analog output  (Read 2263 times)

TerryW

  • Newbie
  • *
  • Posts: 2
Do-More motion using analog output
« on: November 18, 2020, 12:47:45 PM »
Hello.  My first time on this forum.  I have an old machine with servo drive that takes an analog +/-10V signal.  Is there an elegant way to use the axis object to create an analog output to follow the axis motion profile? 
Using the axis.targetvelocity seems to work for AXHOME and AXJOG but not AXPOSTRAP.  AXPOSTRAP causes a runaway condition.  axis.targetvelocity goes max positive but axis.currentposition counts in the negative direction at full speed.  Axis is configured with encoder feedback that responds appropriately to motor rotation. 
Seems like analog motion control would be a common request.  I didn't find something in search...

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6126
  • Yes Pinky, Do-more will control the world!
Re: Do-More motion using analog output
« Reply #1 on: November 18, 2020, 04:29:36 PM »
Hello.  My first time on this forum.  I have an old machine with servo drive that takes an analog +/-10V signal.  Is there an elegant way to use the axis object to create an analog output to follow the axis motion profile? 
Using the axis.targetvelocity seems to work for AXHOME and AXJOG but not AXPOSTRAP.  AXPOSTRAP causes a runaway condition.  axis.targetvelocity goes max positive but axis.currentposition counts in the negative direction at full speed.  Axis is configured with encoder feedback that responds appropriately to motor rotation. 
Seems like analog motion control would be a common request.  I didn't find something in search...

I think you would want Axis.CurrentVelocity, not Axis.TargetVelocity.

I might have heard the analog request once before, but it really isn't that common.


"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

DLTimmons

  • Hero Member
  • *****
  • Posts: 232
Re: Do-More motion using analog output
« Reply #2 on: November 19, 2020, 08:27:26 AM »
I done what you trying to do. First done it with a H2-CTRIO . Take Axis.CurrentVelocity multiply it by a scaling value (you have to work that out based on your encoder ) then write that out to an analog out.

RBPLC

  • Hero Member
  • *****
  • Posts: 585
Re: Do-More motion using analog output
« Reply #3 on: November 19, 2020, 10:00:45 AM »
As DLTimmons said, this seems relatively easy to accomplish with some math/scaling functions. I would assume that the limiting factor is the response time of the analog outputs.

TerryW

  • Newbie
  • *
  • Posts: 2
Re: Do-More motion using analog output
« Reply #4 on: November 19, 2020, 02:39:48 PM »
Thanks.  I think I've got it now.  Runaway issue was setting to rotary instead of linear causes inappropriate rollover to max position value.  On some commands target velocity is just magnitude and not signed.  Talked to AD support and they got me straightened out.  He advised keeping axis virtual (no encoder feedback) for my application.  Axis object designed primarily to work with deterministic step motors?  Some issue with whether currentvelocity and targetvelocity represent what I would have liked them to be? 
Now using virtual axis.currentvelocity to primarily set analog output.  Using difference between virtual ideal axis.currentposition and real encoder feedback position with PID to trim analog to keep positions better synced.  Seems to work.  Probably a lot of ways to make it work.