realtime or not?!

thanks for your answers
i want to have encoder data for estimating the motor transfer function
i connect encoder output to arduino and plot it in the scope then collect the data of scope
when i connect signal generator with 100hz square wave i saw a wave form with wrong frequency and duty cycle