realtime or not?!

hi everybody
i have a mega2560 and i connect it to simulink and connect a signal generator to arduino and the signal generator produce a 100hz square wave
when i opened the scope in simulink i didn't see the exact 100hz square wave..
is this board realtime or not??
or maybe i must add some other blocks to simulink that it can work real time?
i do all of these works because i have a motor with encoder.i want to give motor a step and measure the encoder data and with those data and matlab find the motor transfer function.
thanks for your helps

no one cant help me?? :~

Not even sure what it is you're trying to do. What's the mega doing in all this?

when i opened the scope in simulink i didn't see the exact 100hz square wave..

You've told us what you don't see.
But what do you see?

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

is there any project or someone do a real time work with arduino?
i mean read the digital data with for example frequency of 500hz and see it in the matlab simulink

The arduino is real time I suspect that it is simulink that is not real time.

read the digital data with for example frequency of 500hz

That depends on how quick you can transfer data from the Arduino into simulink.

If you want any help with code then you have to post it.