How do I control position using AIN ?
Often the AIN are an easy way to control for example the velocity or position. If it's position a general known problem is noice at the analogue line combined with a low resolution of the analogue input signal and a long distance.
Here is an example of how to reduce the noise.
The application is a motor with a gear with a ratio 100:1 and a MAC800 with 8000 counts/rev and the output shaft should position within 5 revolutions depending of an analogue signal between 0 - 10V
0 - 10VDC : AIN
0 - 2048 : AIN in user units
0 - 4.000.000 : Position ( 5 x 8000 x 100 )
AIOld = (1/FX * AIN) + (((FX-1)/FX) * AIOld)
P_SOLL = AIOld * 1953