'***************************************************************************
'Galil Motion Control Sample DMC Code
'Filename: ECAM_test.dmc
'***************************************************************************
'Description:
'This code is an example of how to implement Electronic CAMMING (ECAM).
'The Master rotates at a constant speed while the slave hits specific points
'***************************************************************************
#camone
master= 400
slave= 8192
EB 0; 'Disable ECAM Mode
ET[0]= ,0
ET[1]= ,2048
ET[2]= ,4096
ET[3]= ,6144
ET[4]= ,8192
EA A; 'Set Master Axis as X
EM master,slave
EP master/4,0
DP 0,0
SH AB
'NOTE: (EP Value)*(# of Cam Points) must be >= to Master Modulus
JG 100;BG A
EB 1
EG ,0; 'Start ECAM profile
'This is the end of the ECAM program.
'The following code shows how to turn on/off an output based
'on the position of the Master Axis
#a
AP 50
SB 1
MG "ON"{N};MG " - POSITION: "{N};TP A
WT 200
CB 1
MG "OFF"{N};MG " - POSITION: "{N};TP A
AP 399
WT 250
JP #a
EN