It is difficult to load a cargo ship automatically at present because there is no reliable, precise and practical method for measuring the status of cargo loading machinery. Therefore, an approach, as well as a device was proposed based on laser scanner, which could measure multiple real-time parameters of the status of cargo loading machinery. Based on the principle of laser range measurement and applying line fitting algorithm to the data gotten from a laser scanner, the method could measure the parameters precisely in real time, such as the position of the chute of a cargo loading machinery relative to the cabin of the ship being loaded as well as the cargo below, the height of cargo in a cabin and the obliquity of a ship. The measuring system has been tested in the process of cargo auto-loading in a cargo terminal. It is proved that the system is precise, reliable and effective.