source: MML/trunk/machine/SOLEIL/StorageRing/bpm/tango_setbpmtimeout.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: 723 bytes
Line 
1function tango_setbpmtimeout(varargin)
2% tango_setbpmtimeout - set timeout (10s) for bpm
3%
4
5%
6%  Written by Laurent S. Nadolski
7
8checkFlag = 0;
9
10if isempty(varargin)
11    timeout = 10000; % ms
12else
13    timeout = varargin{1};
14end
15
16devList = family2tangodev('BPMx');
17
18for k=1:length(devList),
19    tango_set_timeout(devList{k}, timeout);
20    if tango_error == 1
21        tango_print_error_stack;
22    end
23end
24
25
26% Checking factorys
27if 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
39end
Note: See TracBrowser for help on using the repository browser.