Previous
Contents
Next
14.
Use with Galil Controllers
Integration
with Galil Optima Series, DMC-18x2 and DMC-21x2/3 industrial motion
controllers.
Version 2.1 of the BFF Motion Driver introduces support for
Galil
Optima Series, DMC-18x2, and DMC-21x2/3
motion controllers. These are high specification industrial
motion controllers and can be used for controlling multiple channel
servo systems.
The control scheme
adopted utilises the Position Tracking (PT) motion mode of the above
Galil controllers. In this mode the DMC controller is programmed to
follow on-the-fly position demands sent from the Motion Driver to
the controller through the DMCwin32 Galil Windows API. In this
motion mode the DMC controller handles all the closed loop servo
processing and the scheme can result in high fidelity motion
response to the motion cues exported by the motion driver. It will
be of particular interest to commercial platform builders.
To implement the
scheme a DMC code control program must be written for the
controller. This program is held in a text file and is loaded into
the controller by the motion driver and executed by the driver at
run time under operator instruction. The DMC program will include
the core commands which put the controller into PT mode and which
instruct the controller to read the position demands sent from the
driver and use them as its position targets. The program will also
include appropriate startup encoder calibration, motion parameter
settings such as maximum speeds and accelerations and PID gain
settings and platform parking and error handling functions.
An
example of the DMC program is shown below. Please consult the
Galil controller and DMC programming manuals for full details of the
controller programming facilities. You will need to write the
program to suit you particular drive system and performance
requirements. Comments in blue
are explanatory and would not be included in the program.
Contents of
BFFP1.dmc text file -
#BFFP1
Program start label – must be as shown
KP5,5,5
PID gains – values illustrative
KI0.005,0.005,0.005
KD0.8,0.8,0.8
DP-1080,-1080,-1080
Set absolute position – known when physically parked – values
illustrative
FL1000,1000,1000
Set travel limits – values illustrative
BL-1000,-1000,-1000
SP200,200,200
Set slow speed – all values illustrative
AC67107840,67107840,67107840
Set acceleration (high for PT mode)
DC67107840,67107840,67107840
Set deceleration
SH
PA0,0,0
Send to start/hold position
BG
Begin motion
pos1=0
Set initial PT mode position demands
pos2=0
pos1, pos2 and pos3 are the internal variables that hold the current
position demands
pos3=0
these are updated by the motion driver in real-time
park=0
Set park instruction variable to 0
WT10000
Wait for the platform to settle at hold position
SP30000,30000,30000
Set PT mode working max speed
PT1,1,1
Initiate PT mode in each channel
#LOOP
Start of PT mode internal loop
PApos1,pos2,pos3
Set pos1, pos2 and pos3 as the current position targets (updated in
the background) by the
motion driver
IF(park=1)
Goto #PRK subroutine if park variables goes to 1
JP#PRK
Jump to #PRK subroutine
ENDIF
WT10
Wait 10ms
JP#LOOP
Go back to start of PT loop
#PRK
#PRK Park subroutine
ST
SP200,200,200
Set slow speed
PA-1080,-1080,-1080
Go to park position
BG
AM
WT4000
ST
MO
shut down motors
EN
End
Use
of #BFFP1 and #PRK program labels is mandatory, as is
the use of the variables pos1, pos2, pos3 and
park to hold the position demands and parking instruction.
Communication with
the motion driver requires only that the DMC controller has been
“registered” on the host PC using the Galil software provided for
the controller. The communications mechanism is either TCP/IP or UDP
or by RS232 Serial comms and is specified using the Galil software
provided for use with the controller. Once so registered the motion
driver can communicate with the controller regardless of the
connection mechanism implemented.
Operation
The DMC control
program must be saved in a “BFFP1.dmc” file in the motion driver's
working directory.
The data output mode
of the motion driver should be set to Mode=GAL in the .bff
configuration file. The working range of the actuators and
start/hold positions should also be set in the .bff configuration
file in encoder quadrature counts AS USED BY THE DMC CONTROLLER.
Ensure that a copy
of the DMCwin32.dll is installed on the host PC. This should
automatically be the case if the Galil controller software has
previously been installed and the controller has been registered on
the PC.
On Driver startup
the user will be prompted to confirm loading and execution of the
#BFFP1 DMC program to the controller. If programmed appropriately
the controller will go through the programmed startup calibration
and slow travel to start/hold position routine and then enter
Position Tracking mode. On confirmation from the operator the motion
driver will then commence exporting motion cue position demands to
the controller.
On driver shut-down
the operator will be prompted to confirm execution of the #PRK
parking subroutine in the DMC program which will take the controller
out of PT mode and send it at slow speed to its park position.
NOTE Please consult
the Galil documentation for your controller to establish a suitable
DMC program for your system. The above program is illustrative.
Previous
Contents
Next
|