An adjusting method of the optical sensor for an ultrasonic-welding apparatus, which adjusts the location of said optical sensor having light-emitting means, which emits a light to a detecting object, and light-emitting means, which receives the light emitted from said light-emitting mean, wherein an adjusting member which interrupts the part of the light emitted from the light-emitting means is arranged, and forms the light-receiving image affected by said adjusting member using the light which is received at said light-receiving means, the method comprising the step of:
- a first adjusting process, in which the light-emitting means and the light-receiving means are moved around the axis vertical to the light emitting direction, and adjusts the location of the light-emitting means and the light-receiving means based on the light-receiving image which is changed by the movement of the light-emitting means and the light-receiving means;
- a second adjusting process, in which the light-emitting means and the light-receiving means are moved around the axis parallel to the light emitting direction, and adjusts the location of the light-emitting means and the light receiving means based on the light-receiving image which is changed by the movement of the light-emitting means and the light-receiving means.