Jump to content
OMRON Forums

Phase and Home a motor from a script PLC


bradp

Recommended Posts

In a script PLC I would like to perform a phase search (#n$) if a motor has not been phased and should be and then home the motor if it has not been homed already. For each step I need to monitor if the command completes properly. This is part of a servo-on function that will run after an E-stop. The E-stop will not usually remove power from PPMAC but is the same routine used at initial startup.
Link to comment
Share on other sites

  • 1 month later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Brad, I have done this code which works for phasing, but you need to add the required features for homing. The following is just for phasing from a Script PLC: Kill 6; If (Motor[6].Status[0]&$1==0) { Motor[6].PhaseFindingStep=1; Do While(Motor[6].PhaseFindingStep<>0); } If (Motor[6].Status[0]&$1==1) { Home 6; Do While((Motor[6].Status[0]&$400000)==0); } else { Disable PLC 1; }
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...