Newsgroups: comp.robotics
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!pipex!sunic!sunic.sunet.se!news.funet.fi!news.lut.fi!news
From: qu@lut.fi (qu)
Subject: Re: PC to control servos
Sender: news@lut.fi (Usenet News)
Message-ID: <DA1so2.DIK@lut.fi>
Date: Mon, 12 Jun 1995 06:57:38 GMT
References: <payman.25.2FD8D37C@hookup.net>
Nntp-Posting-Host: laser096.pc.lut.fi
Organization: Lappeenranta University of Technology
X-Newsreader: WinVN 0.92.2
Lines: 343

In article <payman.25.2FD8D37C@hookup.net>, payman@hookup.net (Payman Khalili) says:
>
>
>Hello folks,
>
>I'm wondering if anyone out there has used a PC to control servo motors
>from radio controlled kits. 
>
>If so, is there an off-the-shelf card which I can plug in my PC to do this?
>If not, does anyone know what's required to do this?  
>
>I wanted to build a PC-based robot which would require around 10 servo motors 
>or so.  
>
>Any info would be appreciated!
>
>Cheers,
>
>-Payman
>-----------------------------------------------------------
>Payman Khalili, Ph.D.
>TecnoLink, 3 St. Andres Ct., Thornhill, ON, L3T 2N3, Canada
>Tel:   (905) 731-6727                   Fax: (905) 731-6410
>Email: payman@hookup.net


Adaptive Motion Control of a Laser Welding System


Zhigang Qu
Laser Processing Laboratory
Lappeenranta University of Technology
Laserkatu 6, 53850 Lappeenranta
Tel: 358-53-624 3075
Fax: 358-53-624 3082
EMail qu@lut.fi


KEYWORDS: 
Motion control, vision sensor, adaptive control, programming language, laser 
processing


1 INTRODUCTION
The high welding speed and accuracy of laser welding demand that motion 
control must be implemented automatically. Generally, a CNC unit is used to 
control the motion of laser welding. It is very difficult, however, to place 
work pieces in exactly the same positions such that a numeric position 
control program can be repeatedly executed without the requirement to modify 
programmed positions. Because of the need for expensive positioning 
equipment and time-consuming programming, which results in an increase in 
manufacturing cost, this places a restriction on the industrial application 
of laser welding. The most economic and efficient means of solving the 
problem is seam tracking, by which the programmed path is modified 
adaptively according to the actual seam position obtained by a sensor[1,2].

Research into seam tracking has been carried out in Lappeenranta University 
of Technology (LUT) since 1991. In the initial stage, two additional axes 
controlled by a PC are used to implement the seam tracking function, while 
the welding velocity is controlled by the existing CNC unit[3]. Two 
additional axes are used because the existing CNC does not include adaptive 
functions. By using this solution, laser welding has been applied in a 
number of industrial projects successfully[3,4]. The main disadvantage of 
the method is that two related computer systems are required. 

A PC-based control system for laser processing has been developed at LUT. 
Supported by the hardware developed, an industrial PC with 14 slots can 
fully control all of the principal parameters of laser processing, namely 
position and velocity, laser power, filler wire feed rate and gas flow. A 
programming language has been developed to operate the system, which can 
flexibly use both taught numerical information and sensor information. An 
integrated editor can be used to create and modify a user program. User 
programs created off-line in DOS text format can also be imported.

2 SYSTEM STRUCTURE
The structure of the PC-based control system is shown in Fig. 1. An 
industrial PC Chassis with a 14-slot PC-bus passive backplane and 350 W 
power supply is used as the frame of the control system. An all in one 486DX 
CUP card with 256 KB cache RAM and a VGA card comprise the basic industrial 
PC system. The CPU card has a 66 MHz 486DX2 CPU, a HDD interface, a FDD 
interface, 16 MB RAM, ROM BIOS, a keyboard connector, a printer port and two 
serial RS-232 ports. The industrial PC has a larger resistance to heat, 
corrosion, humidity, vibration, noise, power surges, cold, dust and people 
than a commercial PC.

Three types of card have developed for the system, a PMC (Precision Motion 
Controller) card, a ULANC (Universal Local Area Network Controller) card and 
a DSP (Digital Signal Processing) card. The PMC card has an 8 bit parallel 
input port, an 8 bit parallel output port, three 12 bit D/A ports, and two 
quadrature incremental encoder interfaces. The input port can be used to 
sense 8 events such as the condition of a home switch or a push button. The 
output port can be used to control external equipment, such as to enable the 
amplifier of a motor, or to open and close the shutter of the laser. Two D/A 
ports are used as the output of two PMC processors, whose inputs are the two 
quadrature incremental encoders. The PMC processors can implement PID 
algorithms by hardware to control motor speed through the D/A ports. This 
will be described in detail in the next section. The third D/A port in each 
card can be used to control other process parameters. In the system, two 
cards are currently installed to control four axes, X, Y, Z and R, which is 
a rotating table. The third D/A output port on each of the two cards is used 
to control laser power and filler wire feed rate respectively. The number of 
cards can be increased to meet future requirements.

The ULANC card is based on a COM 20020 ULANC chip, which is a special 
purpose communication controller for networking microcontrollers and 
intelligent peripherals in industrial, automotive and embedded environments, 
using an ARCNET protocol engine. The chip can support up to 255 nodes in a 
net with a data rate up to 5 Mbps. Its media interface can be a traditional 
hybrid for long distances, an RS 485 deferential driver for low cost, low 
power, and high reliability, or a backplane mode for direct connection to 
media over short distances. The cable of the net can be twisted pair, 
coaxial, or fiber-optic. With its built in error detection and flow control, 
the burden of software development can be reduced.  
Fig. 1 System StructureThe ULANC card is used for two purposes in the system 
described. One is to communicate with other computers. For example, the card 
is used to communicate with an ultrasonic information processing system for 
use in a Brite-EuRam project. The ultrasonic sensors provide the information 
on work piece thickness and weld pool size for adaptive process parameter 
control. By accessing the dual-port RAM in the card with C language, the 
sampling rate of the ultrasonic sensors can attain 100 Hz. Another purpose 
is to communicate with a programming unit, which is a pendant developed for 
teaching functions. There is also a COM 20020 ULANC chip in the programming 
unit, which is controlled by an Intel 80c196 processor. The 80c196 processor 
acquires user commands using a 5x5 keyboard, a handwheel, a joystick and 
several option switches, and displays system information using a 240x128 
pixel LCD. The LCD supports either text or graphics mode. The programming 
unit software has been developed using C and ASM languages.

The DSP card is based on an AT&T DSP32C processor with 256 K 0-wait memory. 
The processing speed is 12.5 MIPS. The processor has a 16 bit interface with 
the host PC of the card. The card is planned to be used for kinematics 
calculations when multiple rotating axes are installed.

Supported by the hardware mentioned above, the industrial PC can fully 
control all the principle parameters of laser processing, including position 
and velocity, laser power, filler wire feed rate and gas flow. In addition, 
the PC can communicate with the SPU (Signal Processing Unit) of a scanning 
sensor through an RS-232 interface. By using the sensor information, the 
industrial PC calculates the required correction motion and then, through 
the PMC cards adjusts the lateral position of the beam focus position and 
its distance from the workpiece. More information about the vision sensor 
and the seam tracking algorithm can be found in [2,3]. The system is 
controlled by a program developed using Borland C++ 4.02. The program 
provides a user interface to display system status and to set up system 
parameters. A programming language has been developed to control the system.   

3 MOTION CONTROL
Fig. 2 Application of LM-628Motion control is the most important task of a 
CNC unit or a robot controller. In order to reduce trajectory error, a short 
sampling time is required, of the order of several ms in a modern 
controller. In each sampling cycle, the required speed and position of each 
axis must be calculated according to the programmed trajectory, the measured 
actual position and the speed. Normally, a CUP is assigned to implement the 
task in a multi-processor system, and assembly language is used to develop 
motion control software.  

In our system, motion control of an axis is implemented by an LM-628 PMC, 
which is a dedicated motion control processor. The LM-628 can control both 
DC and AC servo motors, as well as other servomechanisms which provide a 
quadrature incremental feedback signal. The block diagram of the LM-628 is 
shown in Fig.2. As indicated in the figure, LM-628 is a bus peripheral, 
which must be programmed by a host processor. In our system, the host 
processor is the 486 of the industrial PC. LM-628 incorporates in one 
component all of the functions of a sample-data motion controller, such as 
tuning the loop compensation PID filter, and generating standard trapezoidal 
velocity profiles. Therefore, by using the LM-628 the potentially complex 
task of designing a fast, precision motion control system is made easier. In 
our system, the motion control software has been developed using Borland 
C++. In addition, most commands of the LM-628 can be executed "on  the fly", 
which means that system status, actual position and speed can be reported, 
and the parameters of PID filter and trajectory can be updated during 
motion. By using this feature, adaptive control can be implemented easily.

Two boards have been developed for convenient signal conditioning of the PMC 
card, an ST (Screw Terminal) board and an EA (Encoder Amplifier) board, as 
shown in Fig 1. The ST board connects with a PMC card via a flat cable, and 
provides screw connectors for digital I/O and D/A outputs, as well as the 
connector for the EA board. The interface between the ST board and the EA 
board is an RS 485. The cable length can be up to 100 m. The input of the 
encoder amplifier can be either TTL compatible square waveform or 
differential current mode sine waveform. The latter is used in Heidenhein 
encoders.  

4 USER INTERFACE

The user interface contains a popup menu for system operation, which 
contains  6 main items, program, control, setup, option history,  and test 
items. 

Fig. 3 Edit screen 
The program item contains 3 sub-items - file, edit, and teaching. The file 
sub-item is used to load or save a user program file from or to the hard 
disk, to clear user program memory, and to view the instruction set of the 
programming language, which will be described in the next section. The edit 
sub-item is used to create or modify a user program. Modify, insert, append, 
cut, paste and copy functions can be called, as shown in Fig. 3. The 
teaching sub-item has the same functions as the edit sub-item, but it 
provides a means for the user to move laser heads manually, using the 
keyboard, push buttons or the programming unit. The current position can be 
recorded into the edited user program by typing the MOVE keyword of the 
programming language, without giving coordinate parameters, as shown in Fig. 4.

Fig.4 Teaching Screen

The control item contains 5 sub-items: run, motion, laser, gas and wire. The 
run sub-item is used to run a user program continuously or step by step , to 
halt it, and to stop it. The other sub-items are used to control various 
system devices manually, such as to move the laser head to a special 
position, to open and close the shutter of the laser and the gas valve, and 
to start and stop filler wire. 

The setup item contains 6 sub-items: RS-232, motor, TCP, I/O, welding and 
net. The RS-232 sub-item is used to run the test and demo program of 
Seampilot, a vision sensor produced by Oldelft. The program has been 
translated into C++ and integrated with the system control software. The 
program can setup sensor parameters such as the scanning angle and scanning 
rate, and parameters of the template which can describe 10 types of joint 
with data. The motor sub-item is used to start a test program to adjust the 
PID parameters of the LM-628s. The other items are used to set up various 
mechanical and welding process parameters.
   
The option item contains 3 sub-items: simulation, laser and teaching speed. 
The simulation sub-item is used to change the system work mode. In the 
simulation mode, the system does not move when a user program is run, but 
the path of the motion is displayed graphically. The function can be used to 
check a user program without motion. Also, the integrated simulation has 
dramatically reduced the time needed in occupying the laser workstation for 
testing the software developed. The laser sub-item is used to enable and 
disable the laser control function when a user program is run. When the 
laser is disabled, a user program can be run for a cold test without the 
need to disable laser control instructions individually. The teaching speed 
sub-item is used to change the teaching speed of the motion commanded by the 
keyboard and push buttons.     

The history item is used to display statistical information concerning 
motion and the vision sensor. The test item is used to run various transient 
functions for debugging.   

The user interface can display system information graphically in real time, 
as shown in Fig. 5. The information includes the actual positions of three 
axes, actual speed, laser power, filler wire speed, the quantity of sampled 
vision information and matching rate, and the path of the laser head. In 
addition, six colour indicators are used to display the status of the laser, 
motion, scanning and match of the vision sensor, filler wire and gas. By 
using the displayed information, a user can monitor the whole system easily.  

Fig. 5 System display Screen
 
5 PROGRAMMING LANGUAGE
The aim of developing a new programming language was to support off-line 
programming and adaptive control. In comparison with the existing 
programming languages for CNC and industrial robot controllers, the new 
language represents two major improvements.
 
Firstly, new instructions have been added to the control instruction group. 
The new instructions have the following functions:
	- Change the required position tolerance
	- Register various special positions	
	- Enable and disable the seam tracking function
	- Change the templates for seam tracking
	- Change the parameters of the vision sensor
	- Change the PID parameters of motion control.
Naturally, the programming language includes the most important control 
instructions available in other programming languages, which are used to 
	- change coordinates, TCP, and frame 
	- control gases and laser shutter 
	- set laser power and velocity 
	- implement a time delay 
	- call a sub-routine, and jump to a label. 
 
The most important improvement is to implement a flexible motion instruction 
by adding two new parameters - motion type and process type, to the two 
conventional parameters - velocity and coordinates.

In existing CNCs, a conventional motion instruction only features one 
condition for release of system control, namely that the target position has 
been reached with the required accuracy. Neither path of the motion and nor 
any of the process parameters can be changed during execution of the 
instruction. The motion control instruction in the new programming language 
has more options to release system control through its motion type 
parameter, such that the motion control can flexibly use both taught 
numerical information and sensor information alternately. Other 
instructions, such as the enable or disable seam tracking instruction, can 
be executed between two motion control instructions without affecting the 
processing velocity. This is  important for industrial application of a 
vision sensor because it is difficult to control the complete motion by a 
sensor alone. The intelligence level of current sensors is much lower than 
that of an operator. An operator can easily establish when the seam tracking 
function should be disabled, e.g. when  passing a tack weld, a defect caused 
by assembly or a place very close to part of a fixture. However, a mistake 
in sensor information can be introduced easily and cause a position error, 
or even a collision. 

The motion type parameter has 11 options: DEFAULT, CIRCLE, LOCATION, FRAME, 
TIME, DISTANCE, MATCH, MISMATCH, PVTP (Parallel to the Vector of the Taught 
Path), CVMP (Coincident with the Vector of the sensor Modified Path) and 
SLAVE. When the DEFAULT option is chosen by omitting to give a motion type 
parameter in a MOVE instruction, the instruction will be executed exactly in 
the same manner as a conventional motion instruction. CIRCLE is used to 
define a circular path. LOCATION and FRAME are used to change coordinate 
systems for convenient off-line programming. TIME, DISTANCE, MATCH and 
MISMATCH are used to allow a motion instruction to release system control 
before the target position has been reached. PVTP and CVMP are used to 
enable the laser head to pass through the area in which the seam tracking 
function must be and has just been disabled. A more detailed description of 
the options of the motion type parameter and process type parameter will be 
published in another paper[5].

6 CONCLUSIONS
The results obtained at LUT show that it is feasible to use an industrial PC 
to implement adaptive motion control for laser processing. This is a 
solution to the problem of  using sensor information whilst  retaining the 
taught numerical position. This problem has concerned engineers working in 
adaptive motion control for many years, but has not been addressed by CNC 
makers. The system can also be used for other applications in addition to 
laser processing.

ACKNOWLEDGMENTS

The author thanks DI Risto Hedman for his work in developing the hardware 
described in the paper, as well as hardware related testing programs. 
Readers interested in the hardware can call for more information (358-53-624 
3404). The author also thanks Dr John Ion for his review of the paper. 

REFERENCES
[1] F. Garnich and H. Schwarz, "Laserrobotic for 3-D cutting and welding", 
Proceedings of SPIE - Int. Soc. Opt. Eng. (USA), Vol. 1276, pp. 122-129, 1989.
[2] Z. Qu, A. Salminen and T. Moisio, "Seam Tracking for Laser Welding Using 
Vision Sensors",  Proceedings of  the Third International Conference on 
Automation, Robotics and Computer Vision, 8-11 November 1994, Singapore. 
[3] Z. Qu and T. Moisio, "A PC controlled seam tracking system for laser 
welding", Proceedings of the 4th Nordic Laser Materials Processing 
Conference, pp.167-172, Snderborg, Denmark, August, 1993.
[4] Z. Qu, J. Kauppila and T. Moisio, "A Seam Tracking System for Sheet 
Metal Pipe Fabrication by Laser Beam Welding", Proceedings of the 
International Conference on Laser Assisted Net shape Engineering, 12-14 Oct. 
1994, Erlangen, Germany
[5] Z. Qu and T. Moisio, "A PC-Based Control system for laser processing", 
to be published.

 


