Thanks folks for the advices.
I tried arround with all gains, including the sampling time.
Now i got it in a stabil movement.
What i not understand is, where is the difference between the sampling time Ts and the timer of the loop.
In my system i want to move a piston with a linear motor. My program creates diffent kind of waves (sine, square, triangle).
Each wave is discribed by 180 values and runs with max 10Hz. That means with max frequency, the stapoint frequency is 1.8kHz.
(every 560 usec a new value).
In my opinion the PID loop should run ten times faster. That doesnt work. I cant put this time in the PID module for Ts.
I thik this value is for the calculations for I.Gain and D-Gain!?
But running the loop with that time, the system (50usec) is unstabil....
I am a little bit confuesd.
The picture shows you my response of the system.