source: MML/trunk/machine/SOLEIL/LT2/emittance/temporisation_mvt_axis.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 11 years ago

Initial import--MML version from SOLEIL@2013

File size: 866 bytes
Line 
1function err = temporisation_mvt_axis(dev)
2err = 0;
3disp('temporisation_mvt_axis <-')
4while (1)
5    ms = tango_command_inout(dev,'AxisGetMotionStatus');
6    % si erreur tango : sortir avec diagnostic
7    if (tango_error == -1)
8      tango_print_error_stack;
9      err = -1;
10      break;
11    end
12    % tant que le moteur est resté en butée (errorstatus à 22, 4 21 ou 3) ou qu'il n'a pas démarré
13    % (motionstatus à 0) rester dans la boucle
14    if (isequal(ms, 1))
15      break;
16    end
17    disp('temporisation mvt moteur');
18    es = tango_command_inout(dev,'AxisGetErrorStatus');
19    if (tango_error == -1)
20      tango_print_error_stack;
21      err = -1;
22      break;
23    end
24    if ~isequal(es,22)&~isequal(es,4)&~isequal(es,21)&~isequal(es,3)&~isequal(ms,0)
25       disp('probleme')
26       break
27    end
28    pause(0.05);
29end
30disp('temporisation_mvt_axis ->')
31
Note: See TracBrowser for help on using the repository browser.