MACHINE
A linear slide moves a machined component under an auto-
mated tool that inserts a bearing into the part. The objective
is to ensure the insertion force falls within a specified range.
The actual force required will be recorded for each insertion
with an analog strain gage. If the force required falls outside
the range, the assembly must be rejected. A PC will be used
as the operator station using Visual BasicTM for the man-
machine interface.
Requirements
Force range: 1.00 25.50 lbs (programmable limits)
Accuracy: ±0.0002 inch
Resolution of motion: 40000 counts per inch
(zero backlash ball screw)
Components Selected
DMC-1020: 2-axis controller
AMP-1120: 2-axis power amplifier
Visual Basic Tool Kit from Galil
Visual Basic from Microsoft
Solution
A DMC-1020 is used to control the motion of the system.
One axis is used to position the linear slide under the tool
holding the bearing while the second axis controls the verti-
cal position of the insertion press. Force measurements are
made from a strain gage that outputs an analog voltage. This
voltage will be read by one of the analog inputs of the DMC-
1020 controller and used to monitor the insertion pressure. If
the force exceeds the upper limit at any time during the inser-
tion, the motion will be aborted and the parts rejected.
Likewise, if the insertion depth is reached and the force remains
below the minimum value the parts must be rejected.
Visual Basic is used to produce a user interface that displays
the motion of the system and system status, as well as position
and insertion pressure values. This program communicates to
the controller through VBX/OCX custom controls produced by
Galil Motion Control. A description of portions of the Visual
Basic code follows:
When a form is first loaded, the code within the
FORM_LOAD procedure is automatically executed. In this
case communication is established and the polling windows
are initialized. Finally, the polling interval is set and the
polling is enabled.
Sub Form_Load ()
`sets up the communication
dmcshell1.dmccontroller = 1
dmcshell1.dmcconnect = True
`allows polling of the card for the position and pressure values
dmcpoll1.dmccommand = "TPX"
dmcpoll2.dmccommand = "TPY"
dmcpoll3.dmccommand = "MG @AN[1]"
`sets the time between polls and begins polling
dmcpoll1.dmcpollinterval = 200
dmcpoll1.dmcpollcontroller = True
End sub
Three status variables are polled every 200 milliseconds: X
position, Y position, and the value of analog input #1 and dis-
played in the polling windows.
If the button labeled "START" is pressed commands are sent
to download a DMC program and then execute it within the
control card:
Sub start_button_Click ()
`routine downloads the DMC file "press.dmc" to controller
then executes it
dmcshell1.filename = "press.dmc"
dmcshell1.dmcfileoperation = 1
dmcshell1.dmccommand = "XQ"
End sub
Press Fitting Machine
P R O G R A M M I N G E X A M P L E S
116
Programming Examples
·
Galil Motion Control, Inc.
·
800-377-6329
PRESS FITTING
Visual Basic Screen for Press Fitting Machine