source: MML/trunk/mml/links/tango/dev2tango.m @ 4

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

Initial import--MML version from SOLEIL@2013

File size: 1.1 KB
Line 
1function [TangoNames, ErrorFlag] = dev2tango(Family, DeviceList, Field)
2%DEV2TANGO - Converts a device list to TANGO names
3% [TangoNames, ErrorFlag] = dev2tango(Family, Field, DeviceList)
4%
5% INPUTS 
6% 1. Family = Family Name
7%             Data Structure
8%             Accelerator Object
9%             Cell Array
10% 2. DeviceList ([Sector Device #] or [element #])
11% 3. Field = Accelerator Object field name ('Monitor', 'Setpoint', etc) {'Monitor'}
12%
13% OUTPUTS
14% 1. TangoNames = Channel name corresponding to the Family, Field, and DeviceList
15%
16% NOTES
17% 1. If Family is a cell array, then DeviceList and Field must also be a cell arrays
18% 2. Returns only status 1 devices -- See StatusFlag
19%
20% EXAMPLES
21% 1. dev2tango('BPMx','Monitor',[1 1])
22% 2. dev2tango({'HCOR','VCOR'},{'Monitor','Monitor'},{[1 1],[1 2]})
23%
24% See also family2tango, tango2family
25
26%
27% Written by Laurent S. Nadolski
28
29if nargin <= 1
30    error('Must have at least two inputs (''Family'', (''devicelist'')!');
31end
32
33if nargin < 3
34    Field = 'Monitor';
35end
36
37[TangoNames, ErrorFlag] = family2tango(Family, Field, DeviceList);
Note: See TracBrowser for help on using the repository browser.