[17] | 1 | function vfcm2zero(varargin) |
---|
| 2 | %VFCM2ZERO - Set vertical corrector strengths to zero |
---|
| 3 | % |
---|
| 4 | % vfcm2zero(fraction, nstep) |
---|
| 5 | % |
---|
| 6 | % INPUTS |
---|
| 7 | % 1. fract - fraction of corrector strength to put to zero |
---|
| 8 | % {1} means correctors set to zero |
---|
| 9 | % 0.5 means half of the corrector strength set to zero |
---|
| 10 | % 2. nstep - number of step for zeroing correctors {Default: 5} |
---|
| 11 | % 3. Optional - 'Interactive' Wait for user for each step {Default} |
---|
| 12 | % 'NoInteractive' pause 10 s for each step |
---|
| 13 | % |
---|
| 14 | % See Also vhcm2zero |
---|
| 15 | |
---|
| 16 | % |
---|
| 17 | % Written by Gregory J. Portmann |
---|
| 18 | % Adapted by Laurent S. Nadolski |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | % Input Parser |
---|
| 22 | InteractiveFlag = 1; |
---|
| 23 | DefaultNstep = 10; |
---|
| 24 | |
---|
| 25 | for i = length(varargin):-1:1 |
---|
| 26 | if strcmpi(varargin{i},'Interactive') |
---|
| 27 | InteractiveFlag = 1; |
---|
| 28 | varargin(i) = []; |
---|
| 29 | elseif strcmpi(varargin{i},'NoInteractive') |
---|
| 30 | InteractiveFlag = 0; |
---|
| 31 | varargin(i) = []; |
---|
| 32 | end |
---|
| 33 | end |
---|
| 34 | |
---|
| 35 | VCORFamily = 'FVCOR'; |
---|
| 36 | |
---|
| 37 | if length(varargin) < 1 |
---|
| 38 | fract = 1; |
---|
| 39 | else |
---|
| 40 | fract = varargin{1}; |
---|
| 41 | end |
---|
| 42 | |
---|
| 43 | if length(varargin) < 2 |
---|
| 44 | nstep = DefaultNstep; |
---|
| 45 | else |
---|
| 46 | nstep = varargin{2}; |
---|
| 47 | end |
---|
| 48 | |
---|
| 49 | fprintf('1/ Verifier que le FOFB est arrété\n') |
---|
| 50 | fprintf('2/ Mettre les alimentations des steerers en controle local via LabVIEW\n') |
---|
| 51 | fprintf('3/ Verifier que le SOFB tourne\n') |
---|
| 52 | fprintf('Si OK presser la touche Entree\n') |
---|
| 53 | pause |
---|
| 54 | |
---|
| 55 | fprintf('Lecture des courant des steerers\n') |
---|
| 56 | |
---|
| 57 | setpt = fract*getam(VCORFamily); |
---|
| 58 | |
---|
| 59 | for k=1:nstep |
---|
| 60 | if InteractiveFlag |
---|
| 61 | %disp([' Step ' num2str(k) ' of ' num2str(nstep) ' Hit Return key to continue (Ctrl-C to stop)']); |
---|
| 62 | disp([' Etape ' num2str(k) ' sur ' num2str(nstep) ' Presser Enter pour continuer (Ctrl-C to stop)']); |
---|
| 63 | pause; |
---|
| 64 | fprintf('Attendre durant l''application des consignes et vérifier l''orbite ...\n') |
---|
| 65 | setsp(VCORFamily, (1-k/nstep)*setpt, [], -1); |
---|
| 66 | else |
---|
| 67 | setsp(VCORFamily, (1-k/nstep)*setpt, [], -1); |
---|
| 68 | pause(10) |
---|
| 69 | end |
---|
| 70 | end |
---|