I think you will have to check the state of the bit signals compared to the table (page 16 of your document).
Maybe you should modify duplo.comp (and compile and install again), in "case 0":
Code:
{ case 0: /* stable sur la currentduplonumber attente ... si demande changement state = 1 */
brake = 1 ;
if (toolchange)
{
if (( currentduplonumber != newtoolnumber ) && ( newtoolnumber != 0))
{
toolchanged = 0 ;
brake = 0 ;
state = 1 ;
start = currentduplonumber ;
courseCW = 0 ;
while ( start != newtoolnumber )
{
start += 1 ;
courseCW += 1 ;
if( start == 9) start = 1 ;
}
start = currentduplonumber ;
courseCCW = 0 ;
while ( start != newtoolnumber )
{
start += -1 ;
courseCCW += 1 ;
if( start == 0 ) start = 8 ;
}
if ( courseCW <= courseCCW ) /* le parcour 1 2 3 est le plus court ou équivalent sens CW */
{
sensCW = 1 ;
sensCCW = 0 ;
if ( newtoolnumber == 1 ) beforenewpos = 8 ;
else (beforenewpos = (newtoolnumber - 1)) ;
}
else
{
sensCW = 0 ;
sensCCW = 1 ;
if ( newtoolnumber == 8 ) beforenewpos = 1 ;
else (beforenewpos = (newtoolnumber + 1)) ;
}
}
}
else toolchanged = 0 ;
break;
On my lathe, the contactors for rotating the turret in both directions are too large to be controlled directly by my 7i77. I used small relays which were already in the machine cabinet but initially not used.
Bruno