source: MML/trunk/machine/SOLEIL/StorageRing/insertions/switchHU640Cor.m @ 4

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: 812 bytes
Line 
1function switchHU640Cor(varargin)
2%  SWITCHHU640COR - turn off/on the status of the H640 correctors
3%
4%  INPUTS
5%  1. 'ON', {'OFF'}
6%
7
8%
9% Written by Laurent S. Nadolski
10
11if isempty(varargin)
12    Flag = 'OFF';
13else
14    Flag = upper(deblank(varargin{1}));
15end
16
17if strcmp(Flag,'OFF')
18    % Deactivation of the HU640 correctors
19    setfamilydata(0,'HCOR', 'Status', [5 8])
20    setfamilydata(0,'HCOR', 'Status', [5 9])
21
22    setfamilydata(0,'VCOR', 'Status', [5 8])
23    setfamilydata(0,'VCOR', 'Status', [5 9])
24   
25elseif strcmp(Flag,'ON')
26    % Activation of the HU640 correctors
27    setfamilydata(1,'HCOR', 'Status', [5 8])
28    setfamilydata(1,'HCOR', 'Status', [5 9])
29
30    setfamilydata(1,'VCOR', 'Status', [5 8])
31    setfamilydata(1,'VCOR', 'Status', [5 9])
32else
33    error('Unknown Option. Action Aborted');
34end
Note: See TracBrowser for help on using the repository browser.