Last change
on this file since 4 was
4,
checked in by zhangj, 10 years ago
|
Initial import--MML version from SOLEIL@2013
|
File size:
1.0 KB
|
Line | |
---|
1 | function golden2sim(ZeroCMFlag) |
---|
2 | %GOLDEN2SIM - loads online machine configuration to AT configuration |
---|
3 | % golden2sim(ZeroCMFlag) |
---|
4 | % |
---|
5 | % ZeroCMFlag = 0 set the machine corrector setting to the simulator |
---|
6 | % 1 zero the correctors in the simulator {Default} |
---|
7 | % |
---|
8 | % NOTES |
---|
9 | % 1. The RF frequency of the simulator is not changed |
---|
10 | % 2. Use ZeroCMFlag = 1 when you think the corrector magnets on the |
---|
11 | % online machine are restoring the orbit to the design orbit (or close) |
---|
12 | % |
---|
13 | % See also machine2sim, sim2machine |
---|
14 | % |
---|
15 | % Written by Greg Portmann |
---|
16 | |
---|
17 | |
---|
18 | if nargin < 1 |
---|
19 | ZeroCMFlag = 1; |
---|
20 | end |
---|
21 | |
---|
22 | |
---|
23 | % Get from the golden config |
---|
24 | FileName = getfamilydata('OpsData', 'LatticeFile'); |
---|
25 | DirectoryName = getfamilydata('Directory', 'OpsData'); |
---|
26 | load([DirectoryName FileName]); |
---|
27 | |
---|
28 | |
---|
29 | % Set to the simulator (don't change the simulator RF) |
---|
30 | RFsim = getam('RF','Simulator'); |
---|
31 | setmachineconfig(ConfigSetpoint, 'Simulator'); |
---|
32 | setsp('RF', RFsim, 'Simulator'); |
---|
33 | |
---|
34 | if ZeroCMFlag |
---|
35 | setsp(gethcmfamily, 0, 'Simulator'); |
---|
36 | setsp(getvcmfamily, 0, 'Simulator'); |
---|
37 | end |
---|
38 | |
---|
Note: See
TracBrowser
for help on using the repository browser.