Hey Tom,
Do I understand you correctly, that your brining in a "feedback" encoder (one for each axis), and when the user pushes the Zero X Encoder (NOT the Zero X axis position, correct?).
also you would need to have passive encoders, (not active ones where your boad keeps the count and is always feeding it to mach, if you have that kind, you would need to send some kind of Zero command to your encoder register of your board.) If you just bringing in a staight encoder to a Breakout board. Then try this:
In your screen Set in each button (I am going to just use the X axis only) the zero x encoder button change its function
in screen designer to "VB script" and put this in the VB window for that button:
NotifyPlugins(10000) (10001 = y, 10002 = z etc.)
In your plugin in the:
void myNotify ( int ID)
{
if (ID == 10000)
{
SynchUpEncoderX = 1;
}
}
Then in your MyUpdate() loop
if (SynchUpEncoderX)
{
Engine->Axis[0].Index = 0;
Engine->Encoders[0].Count[0] = 0;
Engine->Sync = true;
SynchUpEncoderX = 0;
}
//scott