Jump to content
OMRON Forums

What is the best method to save and restore motor positions after a reboot?


Recommended Posts

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.PowerOnMode = 6

Motor.pAbsPos = Sys.Ddata.a

Motor.HomeOffset = -Sys.Ddata

Motor.HomePos = 0

Motor.AbsPosFormat = $01002000

#i hmz

where Sys.Ddata contains Motor.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?

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

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.

Link to comment
Share on other sites

  • 2 months later...

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"

Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...