Hi,
So basically, ESS can't handle homing of OB motors if I understood you correctly?
No, that is incorrect. The ESS has real-time facilities for up to six motors. Your coordinated axes XYZA use four,
the spindle is an OB axis as is the carousel motor for six total. Thus the ESS has hardware facilities for homing
of up to six axes.
Note that the spindle is a special case of an OB axis. It does not get homed per se. If you wish it to be homed
then it is appropriate to call it a C axis.
You cannot set the machine coordinates of an axis programmatically.
[url][https://www.machsupport.com/forum/index.php?topic=39309.0/url]
I cant see that your code is going to achieve much.
Consider the first API:
rc = mc.mcAxisSetMachinePos(
number mInst,
number axis,
number val)
and in particular the additional notes:
val The desired axis position to apply a fixture offset.
And the C syntax example:
// Set axis 0 fisxture offset.
int mInst = 0;
mcAxisSetMachinePos(mInst, 0, 0.0 /* set part zero */);
So the API DOES NOT set the machine coordinate, it sets the fixture offset.
The next API you have used is in effect a duplicate:
rc = mc.mcAxisSetPos(
number mInst,
number axisId,
number val);
Description:
Set the Position of an axis by changing the fixture offset
But see the additional notes:
Notes:
Set the position of the axis by changing the current Fixture offset. This is not valid for out of band axes.
But note the description......changing the fixture offset and in the attached notes ....not valid for out of band axes.
And the last AI you have used:
rc = mc.mcAxisGetHomeInPlace(
number mInst,
number axisId,
number homeInPlace)
Description:
Set the axis' Home In Place flag.
Notes:
The core provides a container for the axis home in place flag only. It currently does nothing with it. However, a motion plugin may retrieve the stored flag and implement a means to home the axis and set machine coordinate 0 at its current location.
So you can set the flag programmatically but you cannot cause the machine coordinates to be rest, that is up to
the motion plugin, in your case the ESS.
You have used APIs without carefully reading/considering what they can and cannot do.
Craig