A method for controlling an air cylinder such that air is supplied to and
exhausted from pressure chambers of the air cylinder by air servo valves.
Pressures in the pressure chambers are detected by pressure sensors,
signals of the detected pressures are feedback to a controller, and the
degrees of opening of the air servo valves are adjusted by corresponding
PID adjusters of the controller on the basis of the respective
differences between instruction values and detection values. The
displacement of the rod of the air cylinder is detected by a displacement
sensor, and a detection signal of the displacement is fed back to the
controller so that a gain of the PID adjuster is always changed in
accordance with the detection signal of the displacement.