Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the best method to save and restore motor positions after a reboot?
#1
I'm looking for a way to check if a motor has moved between shutdown and next power up. At the moment I'm checking visually that nothing has moved then restore saved position using these commands in the terminal
Motor[i].PowerOnMode = 6
Motor[i].pAbsPos = Sys.Ddata[i].a
Motor[i].HomeOffset = -Sys.Ddata[i]
Motor[i].HomePos = 0
Motor[i].AbsPosFormat = $01002000
#i hmz
where Sys.Ddata[i] contains Motor[i].ActPos and saved using the custom save function.

I'm planning to implement this in a start up procedure in a plc. What would be the best way to check if the motor hasn't moved and restore the saved position?
Reply
#2
Is this an absolute or incremental encoder?
Reply
#3
All the motors have resolvers for feedback.
Reply
#4
Normally, PMAC does not save any parameters when power off, because the entire work of PMAC is basically carried out in memory.

For recording the motor position, I suggest you use an absolute encoder.
The controller can read the absolute encoder position information after each power-on.
It is very unreliable to record the position of the motor before the power is cut off to the controller, because the motor may still be moved after the power off.
Because the motor may be affected by external forces without a closed loop, resulting in displacement, which will cause deviation.
Reply
#5
I would not suggest recording this position to find the zero position after turning the machine back on. If that is desired, do a homing search more or get an absolute encoder.

You could save the value Motor[x].AbsPos-Motor[x].HomePos (or Motor[x].DesPos-Motor[x].HomePos) so that you can go back there after homing.

If you set Motor[1].ProgJogPos=This value, then you will be able to go to that position with "#1J=*" in the terminal or "Jogret1=*" in programs.

If you add Motor[1].ProgJogPos (or a global variable name) to pp_custom_save.tpl (within the configuration folder), then it can be saved and recovered.
To save: "fsave"
To load: "fload"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)