News:

  • June 07, 2026, 12:11:18 PM

Login with username, password and session length

Author Topic: Motion sanity check...  (Read 194109 times)

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: Motion sanity check...
« Reply #45 on: April 18, 2016, 12:22:42 PM »
I can and will give you the simplified measurement I described. Resource constraints prevent more.

Right, I understand and wasn't trying to talk you into it.  Just pointing out that dynamically defined motion and scheduled position aren't to me mutually exclusive.

Quote
And for anyone interested, a little bird told me UL recently added a listing for a new PLC product.  ;)

Woo hoo!  Can't wait!   8)
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Motion sanity check...
« Reply #46 on: April 18, 2016, 06:58:41 PM »


AXGEAR then? In cases where you use a raw pulse output, but no encoder feedback, we can treat the pulse output position register just like the counter accumulator, so I would allow them to follow either an encoder or a pulse output position.



 
Electronic gearing in slave mode is usually an encoder mounted to an external shaft. The encoder is wired into the slave drive and follows the movement of that shaft according to the ratios set. It follows position.

You could designate an axis as a follower input on the encoder, which would render that axis as unavailable for motion.

Then designate an axis as a slave to one of the other axis at a given ratio. If you selected an axis that was designated as a follower input, then it would follow an encoder. If you chose another axis that is moving, then it treats that axis as the master.

The raw pulse output part, I am not sure I understand.

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Motion sanity check...
« Reply #47 on: April 18, 2016, 07:00:49 PM »
...and soft travel limits in the axis. Defining min and max allowed position, beyond which the axis sets an error and won't exceed?

Soft travel limits in linear mode (which is another topic) will stop motion in one direction and turn on an error bit, but usually will allow movement in the opposite direction.

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Motion sanity check...
« Reply #48 on: April 18, 2016, 07:06:33 PM »


A couple of other unrelated thoughts:
- Rotary encoder mode?


AB calls this Unwind mode, which is very useful in my area of work.  Typically these are used when driving a cam where you have 0-359 degrees of rotation. There is quite a bit to this and I will send you some information. Basically you designate a number of units for X number of rotations, such as what you have when you use a gearbox. When it hits that unit number, then the position resets to 0 and vice-versa in the other direction. I actually like "rotary mode" for a better description.

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Motion sanity check...
« Reply #49 on: April 18, 2016, 07:07:29 PM »

- Rotary pulse output mode?


Please elaborate.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Motion sanity check...
« Reply #50 on: April 18, 2016, 07:16:38 PM »

- Rotary pulse output mode?


Please elaborate.


Same thing as the rotary encoder mode, but oriented toward the pulse output, basically rotary table stuff.
"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

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Motion sanity check...
« Reply #51 on: April 18, 2016, 07:20:44 PM »

- Soft e-stop or limits on axis travel? One? Two? Normally open? Normally closed?

Typically this is taken care of in the drive. I rarely use soft travel limits, because I don't trust myself. I hard wire the travel limits to the drive, so that no matter what I do, the motor is not going past those limits. Most drives also have E-Stop, Enables and Safety circuits built into the drive. I think you already have suspend, halt and a reset/clear instructions? However some applications can't use hardware over travel limits. Can you have an option for an E-stop or decel to stop for software limits?
 

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Motion sanity check...
« Reply #52 on: April 18, 2016, 07:26:59 PM »
Was thinking of specifying in the axis config, and limits would be global to all instructions...and yes, they would be optional.
"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

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Motion sanity check...
« Reply #53 on: April 20, 2016, 09:20:10 PM »
I've only done a few motion projects. Axis 'gearing' (slaving one axis to another at a specified ratio) was useful (lifting two sides of a common structure with two servos for example). The current command (not final) position from one - the 'master' or 'leader' is used for the same purpose in the 'slave' or 'follower'.

Implemented. Slave axis can track any of the encoder inputs or another pulse output. Configure the secondary axis, point it at the master, set the gear ratio, and let it run. Works great.
"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

Mike Nash

  • Hero Member
  • *****
  • Posts: 652
Re: Motion sanity check...
« Reply #54 on: April 20, 2016, 09:52:55 PM »
Implemented. Slave axis can track any of the encoder inputs or another pulse output. Configure the secondary axis, point it at the master, set the gear ratio, and let it run. Works great.

On the gear ratio, is this a Real, or a numerator/denominator integer style? And, will it keep up with the extra counts it can't resolve on a particular move so there is no progressive loss as moves progress?

Sometimes we need to just get the speeds close and don't desire to maintain positional error control (web handling), but other times we need to keep every last pulse accounted for (which is where Real is not a good choice for gear ratio.)

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Motion sanity check...
« Reply #55 on: April 20, 2016, 10:00:39 PM »
The ratio is a real.

To prevent cumulative error, I store both the master and slave positions at the box enable, and all subsequent positions are computed relative to that absolute starting point. Should be dead nuts on until roll over. Not yet sure what happens at rollover...running that test right now.
"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

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Motion sanity check...
« Reply #56 on: April 21, 2016, 05:21:08 PM »
AXSCRIPT is coming to life and I'm liking it. This one does the following:
1. Sets axis position to 0
2. Starts a velocity ramp to 10000Hz
3. Waits for rising edge of X7
4. Ramps to 7500HZ
5. Runs program MotionPgm
6. Moves to position 0
7. Sets axis to idle mode

Top pane is velocity.

Middle pane is position.

Blue trace on bottom is X7.
The other three traces are outputs in MotionPgm. White is in first stage and green is in last.
« Last Edit: April 21, 2016, 05:25:02 PM by BobO »
"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

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Motion sanity check...
« Reply #57 on: April 21, 2016, 10:18:04 PM »
For it to be really useful, it needed to be a Real number for the Ratio.
What is that command going to look like in the ladder?  Is it pick and choose commands or do you have to type in commands?
« Last Edit: April 21, 2016, 10:29:24 PM by ATU »

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Motion sanity check...
« Reply #58 on: April 21, 2016, 10:44:54 PM »
What is that command going to look like in the ladder?  Is it pick and choose commands or do you have to type in commands?

AXSCRIPT? It's similar to RAMPSOAK, a table of up to 50 commands. The word 'script' may throw people...perhaps 'sequence' is a better word?

Command set still changing, but this should give you a good idea of the capabilities:

MOTION_MODE_STOP
MOTION_MODE_SET_VELOCITY
MOTION_MODE_RAMP_TO_VELOCITY
MOTION_MODE_START_RAMP_TO_VELOCITY
MOTION_MODE_MOVE_ABSOLUTE
MOTION_MODE_MOVE_RELATIVE
MOTION_MODE_START_MOVE_ABSOLUTE
MOTION_MODE_START_MOVE_RELATIVE
MOTION_MODE_MOVE_ROTARY
MOTION_MODE_START_MOVE_ROTARY

MOTION_EVENT_LIMIT
MOTION_EVENT_REG_MATCH
MOTION_EVENT_ATVEL
MOTION_EVENT_ATPOS

MOTION_PROP_POSITION
MOTION_PROP_MINVEL
MOTION_PROP_MAXVEL
MOTION_PROP_ACCEL
MOTION_PROP_DECEL
MOTION_PROP_SCALE_FACTOR
MOTION_PROP_DEADBAND
MOTION_PROP_ROTARY_RANGE

MOTION_SETSTAGE
MOTION_RUNPROGRAM
MOTION_STARTTIMER
MOTION_SETBIT
MOTION_RSTBIT
MOTION_DOPROGRAM
MOTION_DOSTAGE
MOTION_DOTIMER
MOTION_WAITBITON
MOTION_WAITBITOFF
MOTION_WAITTIMER

Top three groups are executed on the ACP (Axis Coprocessor), the bottom group on the PLC.

Any mode that uses the word 'start' means it will start the operation, but not wait for completion.

MOTION_EVENT_xxx block execution until the event occurs. EVENT_LIMIT are states of local inputs...rising edge of X5, etc. EVENT_REG_MATCH is a register compare against encoder or pulse out accumulators, with all relational operators.

In the bottom group, everything from DOPROGRAM down blocks script execution until complete. Above that they are started, but don't block.
"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

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Motion sanity check...
« Reply #59 on: April 21, 2016, 11:09:24 PM »
Is Dotimer a Dwell command?