Last change
on this file since 17 was
17,
checked in by zhangj, 10 years ago
|
To have a stable version on the server.
|
-
Property svn:executable set to
*
|
File size:
932 bytes
|
Line | |
---|
1 | function ErrorFlag = idSetOrbitBump(BPM_Family, BPM_DeviceList, GoalOrbit, CM_Family, CM_IncrementList) |
---|
2 | %Makes an accurate incremental bump, by walking around the problem of eventual |
---|
3 | %saturation of BPMs |
---|
4 | |
---|
5 | BPM_LinearLimitPos = 1; %[mm] max. abs. value of position after which the BMPs start to saturate |
---|
6 | |
---|
7 | numPos = length(GoalOrbit); |
---|
8 | maxAbsPos = 0; |
---|
9 | for i = 1:numPos |
---|
10 | curAbsPos = abs(GoalOrbit(i)); |
---|
11 | if(maxAbsPos < curAbsPos) |
---|
12 | maxAbsPos = curAbsPos; |
---|
13 | end |
---|
14 | end |
---|
15 | |
---|
16 | if(maxAbsPos <= BPM_LinearLimitPos) |
---|
17 | setorbitbump(BPM_Family, BPM_DeviceList, GoalOrbit, CM_Family, CM_IncrementList); |
---|
18 | return; |
---|
19 | end |
---|
20 | |
---|
21 | [OCS, OCS0, V, S, ErrorFlag] = setorbitbump(BPM_Family, BPM_DeviceList, GoalOrbit*(BPM_LinearLimitPos/maxAbsPos), CM_Family, CM_IncrementList, 'NoSetSP'); |
---|
22 | if(ErrorFlag) |
---|
23 | return; |
---|
24 | end |
---|
25 | CM_DeviceList = OCS.CM.DeviceList; |
---|
26 | CM_DeltaSP = OCS.CM.Delta; |
---|
27 | |
---|
28 | stepsp(CM_Family, CM_DeltaSP*(maxAbsPos/BPM_LinearLimitPos), CM_DeviceList); |
---|
Note: See
TracBrowser
for help on using the repository browser.