...
...
located in:
Code Block |
---|
/pcds_motion/current/pcds_motionApp/src/ims_bootup_V3.mcode
|
Code Block |
---|
' Program Fragment: MODE_1 (Single shotShot) ' VA restrictions: |
Code Block |
---|
' 1.Program A variable cannot be named after A MCode Instruction, ' Variable or Flag or Keyword ' 2. The first character must be alpha, the second character ' may be alpha-numeric. ' 3. A variable is limited to two characters. ' 4. Limited to 192 variables and labels. 'Jeff additions VA Ve=1 ' Program version VA SE=0 ' Program select S1=16,1,1 ' Setup IO 1 for LED/Fan control VA EN=0 ' Current enable VA Eo=0 ' Last enable VA TG=0 ' Trigger enable 'Ernesto python defaults, 30Hz VA NS=0 VA DT=0 'waiting time VA QN=1 'ratio to divide VA N1=0 'steps to move Cw VA N2=0 'steps to move ccw VA N=0 'steps to move VA CT=0 'trigger counter S13=60,0,0 'set inp 13 for hi speed TC in Fc=0 'filter input none Ms=256 'nb of motor steps/usteps Vi=1000 'initial velocity Vm=768000 'maximum velocity A=1000000 'acceleration D=1000000 'deceleration Ee=0 'disable encoder closed-loop Rc=100 'max run current Hc=5 'minimal hold current PG 1 LB SU ' 30Hz testing inits SE = 0 'O1 = 0 N1=3200 N2=-3200 QN=1 DT=0 CT=0 N=5 Vm=5000000 Vi=100000 A=30000000 D=30000000 H 100 LB ZA ' Main loop BR Z0, SE = 1 BR Z2, SE = 2 BR Z4, SE = 3 BR ZA LB Z0 ' One-shot init 'O1 = 1 Tc = M1 H 500 BR Z1 LB Z1 ' One-shot program BR ZB, TG = 1 BR Z1 LB ZB Te = 4 BR ZG LB ZG BR Z1, TG = 0 BR ZG LB M1 Te = 0 TG = 0 CL ZC, EN = 0 CL ZD, EN = 1 CL ZE, EO = 0 CL ZF, EO = 1 RT LB ZC MR N1 H EO = 0 RT LB ZD MR N2 H EO = 1 RT LB ZE EN = 1 RT LB ZF EN = 0 RT PG E |
Code Block |
---|
' Program Fragment: MODE_2 (Continuous)
' VA restrictions:
' 1. A variable cannot be named after A MCode Instruction,
' Variable or Flag or Keyword
' 2. The first character must be alpha, the second character
' may be alpha-numeric.
' 3. A variable is limited to two characters.
' 4. Limited to 192 variables and labels.
'Jeff additions
VA Ve=1 ' Program version
VA SE=0 ' Program select
S1=16,1,1 ' Setup IO 1 for LED/Fan control
VA EN=0 ' Current enable
VA Eo=0 ' Last enable
VA TG=0 ' Trigger enable
'Ernesto python defaults, 30Hz
VA NS=0
VA DT=0 'waiting time
VA QN=1 'ratio to divide
VA N1=0 'steps to move Cw
VA N2=0 'steps to move ccw
VA N=0 'steps to move
VA CT=0 'trigger counter
S13=60,0,0 'set inp 13 for hi speed TC in
Fc=0 'filter input none
Ms=256 'nb of motor steps/usteps
Vi=1000 'initial velocity
Vm=768000 'maximum velocity
A=1000000 'acceleration
D=1000000 'deceleration
Ee=0 'disable encoder closed-loop
Rc=100 'max run current
Hc=5 'minimal hold current
PG 1
LB SU
' 30Hz testing inits
SE = 0
'O1 = 0
N1=3200
N2=-3200
QN=1
DT=0
CT=0
N=5
Vm=5000000
Vi=100000
A=30000000
D=30000000
H 100
LB ZA ' Main loop
BR Z0, SE = 1
BR Z2, SE = 2
BR Z4, SE = 3
BR ZA
LB ZC
MR N1
H
EO = 0
RT
LB ZD
MR N2
H
EO = 1
RT
LB ZE
EN = 1
RT
LB ZF
EN = 0
RT
LB Z2 ' Flip-flop init
DT=0
H 100
BR Z3
LB Z3 ' Flip-flop program
Tc = M2
Te = 4
BR Z3
LB M2
CL ZC, EN = 0
CL ZD, EN = 1
CL ZE, EO = 0
CL ZF, EO = 1
RT
PG
E
|
Fragment: MODE_2 (Continuous)
|
Code Block |
---|
' Program Fragment: MODE_3 (Burst mode) |
Code Block |
' Program Fragment: MODE_3 (Burst mode)
' VA restrictions:
' 1. A variable cannot be named after A MCode Instruction,
' Variable or Flag or Keyword
' 2. The first character must be alpha, the second character
' may be alpha-numeric.
' 3. A variable is limited to two characters.
' 4. Limited to 192 variables and labels.
'Jeff additions
VA Ve=1 ' Program version
VA SE=0 ' Program select
S1=16,1,1 ' Setup IO 1 for LED/Fan control
VA EN=0 ' Current enable
VA Eo=0 ' Last enable
VA TG=0 ' Trigger enable
'Ernesto python defaults, 30Hz
VA NS=0
VA DT=0 'waiting time
VA QN=1 'ratio to divide
VA N1=0 'steps to move Cw
VA N2=0 'steps to move ccw
VA N=0 'steps to move
VA CT=0 'trigger counter
S13=60,0,0 'set inp 13 for hi speed TC in
Fc=0 'filter input none
Ms=256 'nb of motor steps/usteps
Vi=1000 'initial velocity
Vm=768000 'maximum velocity
A=1000000 'acceleration
D=1000000 'deceleration
Ee=0 'disable encoder closed-loop
Rc=100 'max run current
Hc=5 'minimal hold current
PG 1
LB SU
' 30Hz testing inits
SE = 0
'O1 = 0
N1=3200
N2=-3200
QN=1
DT=0
CT=0
N=5
Vm=5000000
Vi=100000
A=30000000
D=30000000
H 100
LB ZA ' Main loop
BR Z0, SE = 1
BR Z2, SE = 2
BR Z4, SE = 3
BR ZA
LB ZC
MR N1
H
EO = 0
RT
LB ZD
MR N2
H
EO = 1
RT
LB ZE
EN = 1
RT
LB ZF
EN = 0
RT
LB Z4 ' Burst init
R1=0
DT=0
TG=0
R1 = 0
H 100
BR Zy
LB Zy ' Burst trigger enable
BR Zx, TG = 1
BR Zy
LB Zx
MR N1
BR Z5
LB Z5 ' Burst program
Tc = M4
Te = 4
BR ZZ, R1 = N
BR Z5
LB M4
IC R1
RT
LB ZZ
MR N2
R1 = 0
Tg=0
BR Zy
LB SP
M3 = , CT = 0
IC CT
RT , CT < QN
CT = 0
RT
LB M3
MR N1
H DT
MR N2
H DT
RT
PG
E
|
...