User manual

AMD2000 Series - Servo Drive - User Manual
96 DS619-0-00-0019 - Rev 0 ANCA Motion
Equivalent Pseudo Code for Figure 10-5
for i = 0 TO 31
if ( 33350[i] NOT EQUAL 0 ) AND ( *33350[i] IS U16 )
if EtherCAT EQUAL OP
if ( ( *33350[i] BITWISE XOR 33351[i] ) BITWISE AND 33352[i] ) NOT EQUAL 0
33345(bit i) = 1;
else
33345(bit i) = 0;
end
else // eg. SAFEOP, Pre-OP or INIT
if ( ( 33353[i] BITWISE XOR 33351[i] ) BITWISE AND 33352[i] ) NOT EQUAL 0
33345(bit i) = 1;
else
33345(bit i) = 0;
end
end
else
if EtherCAT NOT EQUAL OP // eg. SAFEOP, Pre-OP or INIT
if 33354(bit i) NOT EQUAL 0
33345(bit i) = 1;
else
33345(bit i) = 0;
end
end
end
PHYSICAL DIGITAL OUTPUT(i) = 33345(bit i) XOR 33344(bit i)
end
A note concerning bitwise operations
Truth table:
Input 1
Input 2
Bitwise XOR
Bitwise AND
0
0
0
0
0
1
1
0
1
0
1
0
1
1
0
1
Bitwise XOR example:
Input 1
0101 1101 1000 1111
Input 2
1110 1010 0001 1010
Bitwise XOR
1011 0111 1001 0101
Bitwise AND example:
Input 1
0101 1101 1000 1111
Input 2
1110 1010 0001 1010
Bitwise AND
0100 1000 0000 1010