1 | function AnalyseOrbitAndFixTheGapStep(SESSION,CellName,SSType,UndType,TableName,OrbitMax) |
---|
2 | UndNameAndPath=['/usr/Local/configFiles/InsertionFFTables/' CellName '-' UndType '/' TableName] |
---|
3 | ID_param=importdata(UndNameAndPath); |
---|
4 | param_length=length(ID_param); |
---|
5 | t0=1; % time between points |
---|
6 | |
---|
7 | % ID_param(i,j): |
---|
8 | % ID_param(1,j): line corresponding to the gap for any value of j |
---|
9 | % ID_param(2,j): line corresponding to CHE for any value of j |
---|
10 | % ID_param(3,j): line corresponding to CHS for any value of j |
---|
11 | % ID_param(4,j): line corresponding to CVE for any value of j |
---|
12 | % ID_param(5,j): line corresponding to CVS for any value of j |
---|
13 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
14 | % ATTRIBUTE OF THE INSERTION DEVICE |
---|
15 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
16 | idDevServGap=[CellName '/ei/' SSType '-' UndType '/gap']; |
---|
17 | idDevServDiag=[CellName '/DG/CALC-SD' SSType '-POSITION-ANGLE/positionX'] |
---|
18 | for j=param_length:-1:1 |
---|
19 | Gap(j)=ID_param(1,j) |
---|
20 | % writeattribute(idDevServGap,Gap(j)); |
---|
21 | pause(t0); |
---|
22 | readattribute(idDevServDiag,PosX(j)); |
---|
23 | end |
---|
24 | Gradient=diff(PosX)./diff(Gap); |
---|
25 | end |
---|