int i;
int TPOL1,TPOL2,TPOL3,TPOL4,TPOL5,TPOL6;
int joystickInput=0,joystickOutput=0,joystickOutput0=0;
int NotinRange1=0,ControlledOutput1=0,NotinRange2=0,ControlledOutput2=0;
int joystickOutput1=0,joystickOutput2=0,joystickOutput3=0,joystickOutput4=0,joystickOutput5=0;
int joystickOutputTPOL1=0,joystickOutputTPOL2=0,joystickOutputTPOL3=0,joystickOutputTPOL4=0,joystickOutputTPOL5=0,joystickOutputTPOL6=0;
algo(DI1,DI2,DO2,AI2,AO1,AO2)(is this line correct)
We can't tell, you need to tell us how DI1,DI2,DO2,AI2,AO1,AO2 are declared. if they are int arrays then yes the call looks correct, if they are anything else, then no, it looks incorrect.