Difference between mode = ncDIRECT and mode = ncHOME_OFFSET

Hi there,

at the moment I am struggling to understand the difference between the two homing modes “ncDIRECT” and “ncHOME_OFFSET”. From my understanding both modes write the value in “homing.parameter.s” to the actual position value when the homing command is executed. But what exactly is the difference? Maybe I am just missing something.

Thanks in advance.

Dominik

Hi Dominik,

they kind of do the same but are meant for different use cases.

ncDIRECT - the axis position is set to the Position you provide but don’t care about any relation to anything else like a mechanical system. For example a regular conveyor axis you really don’t need any reference of its position to anything else so you set to zero on homing.

Now if you have a indexing/bucket conveyor, a rotating cutting knife or a robot arm they need to have a referenced position and that’s done with the HOME_OFFSET.
During commissioning you move your axis the reference position like the leading edge of the bucket, the knife edge to some mechanical mark and the robot arm to a homing jig.

Then you set it to zero with ncDIRECT and read the current encoder position. That encoder position is now your offset between the axis and your mechanical reference position you now home to.

Because you now have the offset between those two positions no matter where the axis is on PowerUp after homing it set to its absolute position in reference to the mechanical zero.

This encoder offset will remain fixed until something mechanically changes. Like you replace the motor or the chain of the bucket conveyor is replaced, jumps a tooth. In that case you need to redo the finding the encoder offset routine.

Homing Modes

I hope this helps

1 Like

Hi Marcel,

first of all thanks for the detailed explanation. If I set the SW position via ncDIRECT to whatever value, then this also directly results in an offset between HW Position of the Encoder and the chosen SW position. So basically it does the same as ncHOME_OFFSET, doesn’t it?

The ncHOME_OFFSET with homing.parameter.s = 0 reads out the absolute value of an absolute encoder.

If this is not the correct position you want, you can add or subtract with homing.parameter.s this absolute value so that the correct SW position is realized.

This all depends on how the absolute encoder or motor with absolute encoder is mounted on the mechanics.

3 Likes

I understand the mode = ncHOME_OFFSET. It offsets the position of the absolute encoder “HW Position” to the desired position “SW Position”. As long as I don’t touch the mechanics, this offset remains the same. But what exactly does the mode=ncDIRECT do in this context. In my eyes it does the same thing, doesn’t it. It can not change the HW Position directly because it is an absolute Encoder, so in the end it also writes an offset such that the correct SW Position is realized. What am I missing?

With homing mode ncDIRECT, the mode does not care about the absolute position of the encoder and takes the homing.parameter.s directly as the SW position (= actual position).

So there is no relation to the actual absolute position of the encoder at all after this homing.

With mode ncHOME_OFFSET or ncHOME_OFFSET+ncCORRECTION there is relation with the absolute position of the encoder. So if the machine is not powered and the absolute encoder is turned, this will be noticed at the next homing and the actual position changes with the turned amount.

With mode ncDIRECT this would not be the case.

1 Like

Okay, thank you, i think it just clicked :slight_smile: