How to set the soft limit/ limit switch of a Z axis fitted with B&C axis.

There are two points:

When the spindle is 90 degrees to the Z axis and
When the spindle is vertical in line with the Z axis.

There is a difference in high in both conditions,

How and which point will be considered as the max. Limit?