Jump to content
OMRON Forums

Homing on hard limit switch


AnthonyLH

Recommended Posts

Hello,

 

I have an unexpected behavior while doing an homing on a negative hard limit switch.

 

The issue: the bit "LimitStop" (stop due to hard limit) is triggered even if "Motor[x].pLimits" is set to 0, this when the software limits are enables ("Motor[x].MinPos/MaxPos" with correct values).

I don't have the probleme when i set "Motor[x].MinPos=0" and "Motor[x].MaxPos=0"

The bit "SoftLimits" stay at 0.

 

The "hm" move is stopped on the hardswitch. When soft limits are disabled ("Motor[x].MinPos/MaxPos=0"), the second part of the homing (move to my "Motor[x].HomeOffset") is done correctly.

 

I also tried with a soft limit lower the HomeOffset ( Motor[x].MinPos< - Motor[x].HomeOffset ). In this case it works.

 

Do i have to disable the softlimits during "hm"? Or might i have a parameter not correctly configured?

 

Parameters:

Gate1[4].Chan[2].CaptFlagSel=2

Gate1[4].Chan[2].CaptCtrl =2

Gate1[4].Chan[2].GatedIndexSel=0

Motor[3].HomeOffset=10000

Motor[3].HomeVel=-10

Motor[3].pLimits=0

 

Thanks

Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

The software limits are automatically disabled during the pre-trigger portion of the homing, because before you find the home trigger, you have no reference for the soft limit numbers. However, as soon as the trigger is found, the reference is established and the soft limits are enabled. This does NOT wait until the post-trigger move to the home offset is finished.

 

So if you are homing into your hard limit and you have your soft limit set either inside of the hard limit or close outside (within the deceleration distance), you will get this limit fault if your SW limits are active at the time of the homing search move.

 

When I tried this, I did get the "SoftMinusLimit" status bit set.

 

A little more precisely, the "LimitStop" status bit indicates that the limit (HW or SW) was caught at move execution (rather than move calculation time). The HW limits can only be detected at move execution time. The SW limits are almost always caught at move planning time (but not in this case, of course).

Link to comment
Share on other sites

  • 1 year later...

Does anybody know why post-trigger move is not running?

What could be a reason for this?

 

An axis is doing homing on positive direction to a limit.

When the limit is reached, I want the axis go out of the limit.

To do that I am using HomeOffset parameter of motor structure,

but nothing happens, the axis just stops moving.

Link to comment
Share on other sites

In order to home to a limit switch, you must first disable limits by setting Motor[x].pLimits = 0. Then, execute the home move, and set pLimits back to the previous address once the move has completed.

 

Note that it can be helpful to home to an index pulse after homing to the limit, as the index pulse tends to provide a more repeatable position than the typical limit switch.

 

You can use the following structures to configure the homing settings:

 

triggertable.png.61f4d168d158d09182b47a5680dba657.png

Link to comment
Share on other sites

Dear Charles,

 

first of all, thank you for your reply.

 

in the following lines you can find a plc program I am trying to run:

 

//defined in global definitions

Global minPos

Global maxPos

 

 

open plc HomeTest

// --------------------User Code Goes Here------------------------

minPos = motor[1].MinPos

maxPos = motor[1].MaxPos

motor[1].MinPos = 0

motor[1].MaxPos = 0

//Motor[1].pLimits = 0 //disable limits

Motor[1].HomeVel = POSITIVE_HOME_SPEED

Motor[1].JogTa = JOGTA_VALUE

Motor[1].JogTs = JOGTS_VALUE

Motor[1].HomeOffset = HOME_OFFSET_VALUE

Gate3[0].Chan[0].CaptFlagSel = PLUS_LIMIT_FLAG

Gate3[0].Chan[0].CaptCtrl = CAPTURE_FLAG_ON_LOW_SIGNAL

home 1

while(Motor[1].HomeComplete != 1){}// Wait until Home Complete

//Motor[1].pLimits = Gate3[0].Chan[0].Status.a //restore limits

Motor[1].MinPos = minPos

Motor[1].MaxPos = maxPos

close

 

The situation is :

1) If I run with pLimits enabled, axis stops on the limit, post-trigger move does not happen.

2)if I run with pLimits disabled , axis passes the limit and continues running until mechanical stopper.

 

Could you tell me what is wrong?

Link to comment
Share on other sites

Like I mentioned in my previous post, you definitely have to set pLimits = 0 before homing to a limit, otherwise the motor will stop once it hits the limits, as described on page 375 of the Power PMAC User Manual.

 

What is the numerical value you use for "CAPTURE_FLAG_ON_LOW_SIGNAL"?

 

I believe you will want to set Gate3[0].Chan[0].CaptCtrl=2 so that it will capture when your limit flag is triggered. Also set Gate3[0].Chan[0].CaptFlagSel = 1 for the positive limit.

 

Note that in order to change the value of a saved Gate3 structure like this one, you will first need to issue Sys.WpKey=$AAAAAAAA to unlock write protection. You can do that at the start of your PLC and set it back to 0 at the end of the PLC.

 

Make sure you issue a small delay after issuing the "home 1" command in your PLC to make sure the move starts before you start checking Motor[x].HomeComplete in your while loop. I recommend using the Timer subfunction template found in the subprograms folder in the IDE. You can then insert "call Timer(0.01)" (without the quotes) after "home 1" and before the while loop.

 

Make sure to disable your PLC at the end of the program, or else it will run repeatedly, which is not what you want for homing.

 

Lastly, you could make those Globals locals instead and put them inside your program.

 

Please note that these kinds of topics are all covered in the basic Power PMAC training, which is available periodically and I suggest you attend if you can. The training calendar can be found at the following link:

 

http://www.deltatau.com/DT_Training/Trainingcalendar.aspx

 

For further support inquiries, please email support AT deltatau DOT com.

Link to comment
Share on other sites

  • 6 months later...

I have a similar problem which I have not been able to resolve.

 

When I put a switch on the HOME1 screw terminal, I am able to toggle the value of Gate3[0].Chan[0].Homeflag from 1 to 0. Now, when I run the "#1hm" command, the stepper goes forward until I toggle the Homeflag value from 1 to zero, and then instead of stopping, it goes back to the previously set home position.

 

I am new to Delta Tau, and this behavior was completely unexpected.

 

What I am hoping to do is cause the stepper to stop when the Homeflag goes from 1 to zero, then set the home position to zero.

Link to comment
Share on other sites

This behavior is typically the result of the motor’s Motor[x].pCaptPos pointing to the wrong register. There are several registers that must be set to properly use the captured position for homing. Correctly setting the value of Motor[x].pEncStatus and Motor[x].EncType in the Power PMAC Script environment forces the proper values of multiple setup elements that control capture functions.

 

Contact our technical support group and we can help you determine what settings need to be changed. support AT deltatau DOT com or 818-717-5656.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...