[17] | 1 | function 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 | |
---|
| 11 | if isempty(varargin) |
---|
| 12 | Flag = 'OFF'; |
---|
| 13 | else |
---|
| 14 | Flag = upper(deblank(varargin{1})); |
---|
| 15 | end |
---|
| 16 | |
---|
| 17 | if 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 | |
---|
| 25 | elseif 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]) |
---|
| 32 | else |
---|
| 33 | error('Unknown Option. Action Aborted'); |
---|
| 34 | end |
---|