2 / 2 6 / 2 0 0 2 2 : 0 6 P M 2 / 2 6 / 2 0 0 2
1 3 8
N M I L - 7 0 5 6 S E R V O M O T O R D R I V E R
C S A M P L E P R O G R A M
initialize()
{
int delay, i;
delay = 120;
for (i=0;i<250;i++) delay = (delay*delay)/delay;
for (i=1; i<26; i++) printf("\n");
motor_off();
get_status();
printf("\nReset Status = %x\n", status);
reset_int();
commnd = RESET; send_cmd(); /* software reset */
commnd = MSKI; send_cmd();
/* mask interrupts */
/*
set
interrupt
mask
*/
dbyte2 = 0x00; dbyte1 = 0x00; send_word();
reset_int();
filter2 = 0x00; filter1 = 0x0F;
/* initialize filter */
kp2 = 0x00; kp1 = 0x0A; ki2 = 0x00; ki1 = 0x0A;
kd2 = 0x00; kd1 = 0x05; il2 = 0x00; il1 = 0X02;
load_filter();
trajec2 = 0x08; trajec1 = 0x2A;
/* initialize trajectory */
accel4 = 0x00; accel3 = 0x05; accel2 = 0x00; accel1 = 0x00;
veloc4 = 0x00; veloc3 = 0x50; veloc2 = 0x00; veloc1 = 0x00;
posit4 = 0x00; posit3 = 0x00; posit2 = 0x00; posit1 = 0x00;
load_traj();
do
/* wait for trajectory to complete */
{
get_status();
}
while ( (status & 0x04) != 0 );
printf("LTRJ Status = %x", status);
reset_int();
motor_off();
}
/* end initialize */
jog_l()
{
posit4 = 0x00; posit3 = 0x00;
posit2 = 0x02; posit1 = 0x00;
commnd = LTRJ; send_cmd();
r_move();
}
/* end jog left */
jog_r()
{
posit4 = 0xFF; posit3 = 0xFF;
posit2 = 0xFE; posit1 = 0x00;
commnd = LTRJ; send_cmd();
r_move();
}
/* end jog right */
Summary of Contents for NMIY-0031
Page 1: ...2 2 6 2 0 0 2 2 0 6 P M 1 NMIY 0031 Single Board Computer Covers NMIY 0031 V1 0 4 22 96 ...
Page 2: ...2 2 6 2 0 0 2 2 0 6 P M 2 ...
Page 6: ...2 2 6 2 0 0 2 2 0 6 P M 6 ...
Page 8: ...2 2 6 2 0 0 2 2 0 6 P M 8 ...
Page 14: ...2 2 6 2 0 0 2 2 0 6 P M 1 4 ...
Page 30: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 3 0 ...
Page 32: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 3 2 ...
Page 50: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 0 ...
Page 52: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 2 ...
Page 54: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 4 ...
Page 56: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 6 ...
Page 58: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 8 ...
Page 60: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 6 0 ...
Page 62: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 6 2 ...
Page 68: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 6 8 ...
Page 70: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 7 0 ...
Page 72: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 7 2 ...
Page 76: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 7 6 ...
Page 82: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 8 2 ...
Page 84: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 8 4 ...
Page 86: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 8 6 ...
Page 88: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 8 8 ...
Page 90: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 9 0 ...
Page 102: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 0 2 ...
Page 108: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 0 8 ...
Page 110: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 1 0 ...
Page 114: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 1 4 ...
Page 118: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 1 8 ...
Page 126: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 2 6 ...
Page 128: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 2 8 ...
Page 134: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 3 4 ...
Page 148: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 4 8 ...
Page 150: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 5 0 ...
Page 152: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 5 2 ...
Page 154: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 5 4 ...
Page 156: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 5 6 ...
Page 168: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 6 8 ...
Page 170: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 7 0 ...
Page 172: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 7 2 ...
Page 174: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 7 4 ...
Page 178: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 7 8 ...