Jump to content
OMRON Forums

HOME Command


cmcdonald

Recommended Posts

We have a Motion Program that Homes a X Y Y' gantry. Our PC HMI initiates the homing program (It completes fine)then POLLS the P_HOMING_ROUTINE_COMPLETE bit (P50) to see if the homing is complete. IN PWIN We often get a Buffer is Open message while the machine is homing and we cannot poll for the P_HOMING_ROUTINE_COMPLETE bit. I can manually type CLOSE in the terminal and it will close the buffer.

 

My question is what internally happens inside the controller when a HOME command is used? When I remove the last 'final' home command I do not have this buffer open

[/php]issue.

 

Thanks

 

Chris McDonald

 

 

 

#include

 

 

 

OPEN PROG 101 CLEAR

P_HOMING_ROUTINE_COMPLETE=0

P_MOTOR1_HOME_STATUS = 1

P_MOTOR2_HOME_STATUS = 1

P_MOTOR3_HOME_STATUS = 1

 

IF (ESTOP_Button=1) ; IF ESTOP IS ON DON'T HOME

;mathias #2 home plc

 

 

 

 

 

I325=$78010 ; USE MOTOR 3 LIMITS TO HOME

I126=16000 ;Motor 1 - Home Offset 1mm

dwell10

IF (MLIM1_flag=1) ;motor 1 at home?

dwell10

I123=50 ;reverse homing

I7012=10 ;look for falling edge

HOME1 ;reverse home

dwell10

ENDIF

IF (MLIM2_flag=1) ;MOTOR 2 already at home?

dwell10

I223=50 ;reverse homing

I7022=10 ;look for falling edge

COMMAND"#3k" ;kill motor 3 to prevent lock up

HOME2 ;reverse home

dwell50

COMMAND"#3J/" ;renable motor 3 after home

ENDIF

I325=$78010

IF (MLIM3_flag=1) ;MOTOR 3already at home?

dwell10

I323=50 ;reverse homing

I7032=10 ;look for falling edge

COMMAND"#2K" ;KILL MOTOR 2 TO PREVENT lockup

HOME3 ;reverse home

dwell50

COMMAND"#2J/" ;renable motor 2 after home

ENDIF

 

 

 

I120=200 ;Motor 1 HOME TA

I121=50 ;Motor 1 HOME TS

I123=-100 ;Motor 1 Homing Speed And Direction

I7012=2 ;Servo IC 0 Channel 1 Capture Control

I7013=2 ;Servo IC 0 Channel 1 Capture Select Control

I126=-16000 ;Motor 1 - Home Offset 1mm

;I226=111072 ;Motro 2 - Home Offset 3501 um

I226=-1000 ;(611+2000)*16

 

I220=200 ;Motor 2 HOME TA

I221=50 ;Motor 2 HOME TS

I223=-100 ;Motor 2 Homing Speed And Direction

I7022=2 ;Servo IC 0 Channel 2 Capture Control

I7023=2 ;Servo IC 0 Channel 2 Capture Select Control

 

;I326=109696 ;Motor 3 - Home Offset 6946 um

I326=-16000 ;

 

I320=200 ;Motor 3 HOME TA

I321=50 ;Motor 3 HOME TS

I323=-100 ;Motor 3 Homing Speed And Direction

I7032=2 ;Servo IC 0 Channel 3 Capture Control

I7033=2 ;Servo IC 0 Channel 3 Capture Select Control

 

 

 

 

 

DWEll10

HOME1..3

dwell10

I120=200 ;Motor 1 HOME TA

I121=50 ;Motor 1 HOME TS

I123=10 ;Motor 1 Homing Speed And Direction

I7012=10 ;Servo IC 0 Channel 1 Capture Control

I7013=2 ;Servo IC 0 Channel 1 Capture Select Control

I126=16000 ;Motor 1 - Home Offset 1mm

;I226=111072 ;Motro 2 - Home Offset 3501 um

I226=16000 ;(611+2000)*16

 

I220=200 ;Motor 2 HOME TA

I221=50 ;Motor 2 HOME TS

I223=10 ;Motor 2 Homing Speed And Direction

I7022=10 ;Servo IC 0 Channel 2 Capture Control

I7023=2 ;Servo IC 0 Channel 2 Capture Select Control

 

;I326=109696 ;Motor 3 - Home Offset 6946 um

I326=16848 ;

 

I320=200 ;Motor 3 HOME TA

I321=50 ;Motor 3 HOME TS

I323=10 ;Motor 3 Homing Speed And Direction

I7032=10 ;Servo IC 0 Channel 3 Capture Control

I7033=2 ;Servo IC 0 Channel 3 Capture Select Control

 

 

 

DWEll10

HOME1..3

 

 

 

 

P_MOTOR1_HOME_STATUS = 0

P_MOTOR2_HOME_STATUS = 0

P_MOTOR3_HOME_STATUS = 0

P_HOMING_ROUTINE_COMPLETE=1

 

;SENDP"Homing X, Y End"

 

I124=$8001 ;enable limits for motor1 AND ENABLE AMP FAULT

I224=$8001 ;enable limits for motor2 AND ENABLE AMP FAULT

I324=$8001 ;enable limits for motor3 AND ENABLE AMP FAULT

;I325=$78008 ; USE MOTOR 2 LIMITS

I114=-1 ;Motor 1 - Software Position Limit

I214=-1 ;Motor 2 - Software Position Limit

I314=-1 ;Motor 3 - Software Position Limit

I113=1229566 ;set pos limt 48.4"

I213=945657 ;set pos limt

I313=945657 ;set pos limt

ELSE

P_HOMING_ROUTINE_COMPLETE=0 ; FAIL Homing

ENDIF

 

CLOSE

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You can issue a "HOMEn..." command in a motion program - this is OK. it will home the motor in the same fashion as the motor on-line command.

 

Where do you see the "open buffer" message?

 

Is the Position window. I also see an RTI error in the Global Stats tab.

 

What can cause and RTI error?

 

Chris

Link to comment
Share on other sites

The "Open Buffer" in the position window is caused by "someone" opening a PMAC buffer - probably your HMI opening a ROT BUFF.

 

The RTI "error" is not so much an error as an indication that foreground tasks (tasks in the Real-Time Interrupt - RTI) are taking longer than the set RTI period (I8). PLC0 too long or high speed motion programs running very fast can cause this. Increasing I8 if a PLC0 is causing it may help but this could adversely affect the motion program calculations and cause a run-time error in the C.S. If this occurs setting I8 to zero would be best. A faster CPU would alleviate the RTI bit issue altogether.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...