A compact multifunctional CO2 laser is constructed. This laser can work as behaviors of single pulse, repetition frequency or continuous and also realize the coding of pulse frequency and wavelength tuning. The resonator of laser adopts the operate mode of grating as zero-level output and first-order oscillation, which achieve pulsed laser output time from hundreds nanosecond level to sub-millisecond level by using the technology of acousto-optically Q-switched and impulsive discharge. The directional output device of grating tuning is introduced based on optical angle reflector in this laser with theoretical calculation and discussion. This device consists of rotating platform, infrared grating and plane mirror, which realize the directional and positional output of different wavelength. The pulse repetition rate is continuously tuning from 1 Hz to 10kHz and the tuning range of output wavelength is from 9.2μm to 10.8μm. The maximal continuous output power is 8W, the minimal width of pulse is 180ns and the maximal peak power is 4062W. This laser has great applied value in the scientific field of laser interacting with material, especially in the investigation of the mechanism of damage for the effect of laser to material.