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:
723 bytes
|
Line | |
---|
1 | function tango_setbpmtimeout(varargin) |
---|
2 | % tango_setbpmtimeout - set timeout (10s) for bpm |
---|
3 | % |
---|
4 | |
---|
5 | % |
---|
6 | % Written by Laurent S. Nadolski |
---|
7 | |
---|
8 | checkFlag = 0; |
---|
9 | |
---|
10 | if isempty(varargin) |
---|
11 | timeout = 10000; % ms |
---|
12 | else |
---|
13 | timeout = varargin{1}; |
---|
14 | end |
---|
15 | |
---|
16 | devList = family2tangodev('BPMx'); |
---|
17 | |
---|
18 | for k=1:length(devList), |
---|
19 | tango_set_timeout(devList{k}, timeout); |
---|
20 | if tango_error == 1 |
---|
21 | tango_print_error_stack; |
---|
22 | end |
---|
23 | end |
---|
24 | |
---|
25 | |
---|
26 | % Checking factorys |
---|
27 | if checkFlag |
---|
28 | data= []; |
---|
29 | for k=1:length(devList), |
---|
30 | data(k) = tango_get_timeout(devList{k}); |
---|
31 | if tango_error == 1 |
---|
32 | tango_print_error_stack; |
---|
33 | end |
---|
34 | if mean(data) ~= data(1) |
---|
35 | printf('At least one BPM is not set properly') |
---|
36 | end |
---|
37 | |
---|
38 | end |
---|
39 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.