Master-Slave 06/2005
Danaher
Motion
116 Rev
E
M-SS-005-03l
Step 1: Allocate Space
Allocate space for the cam with
Common Shared
<var> as Cam
. All cams are global, so this line must
be located in Config.Prg. For example:
Common Shared CAM1 as Cam
Step 2: Load Cam Data
This can be accomplished in two ways. For a static
cam data array which has been calculated and
stored in the MC, use
LOADCAMDATA
:
LoadCamData MyCam.Cam CAM1
or dynamically calculate the cam. This is a two step
process. First, create space for the data array and
then fill that space. For example, for a five element
array, you enter:
CreateCamData 5 CAM1
CAM1.MasterData[1]=10
CAM1.SlaveData[1]=20
CAM1.MasterData[2]=20
CAM1.SlaveData[2]=40
CAM1.MasterData[3]=30
CAM1.SlaveData[3]=60
CAM1.MasterData[4]=40
CAM1.SlaveData[4]=80
CAM1.MasterData[5]=50
CAM1.SlaveData[5]=100
This is similar to building a static cam table. The
difference is that this cam table is never stored to
or loaded from flash.
Step 3: Initialize Other Elements
Initialize other elements of the cam:
CAM1.Next = CAM2
CAM1.Previous = CAM0
CAM1.Cycles = 3
Step 4: Initialize the Axis
Initialize the elements of the axis related to
camming. Set
FIRSTCAM
to the first cam the axis
follows:
A1.FirstCam = CAM1
Set the master position within the cam at the point
where you wish to start. For example, you may
have a cam table where the master position goes
from 0 to 100.00, but the correct starting position
for the cam might be 33.333, so you enter:
A1.FirstCamOffset = 33.333
FIRSTCAMOFFSET
must be within the range of
the master position. Remember that
FIRSTCAMOFFSET
defaults to 0. If the master
range does not include zero, an error is generated
if you do not set
FIRSTCAMOFFSET
.
Set
GEARRATIO
and name the source of the
master signal:
A1.GearRatio = 1.00
A1.MasterSource = A2.PFB
Finally, set
SLAVE
to CAM:
A1.Slave = CAM