source: MML/trunk/machine/SOLEIL/StorageRing/bpm/soleilbpms.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.3 KB
Line 
1function [XData,ZData] = soleilbpms
2%SOLEIBPMS - Gets horizontal and vertical orbit read into valid BPMS
3% [x,z] = soleilbpms
4%
5% OUTPUTS
6% 1. x - horizontal beam position
7% 2. z - vertical beam position
8%
9% NOTES
10% To be modified to get X and Z at once
11% To get all bpm at once
12
13%
14% Written by Laurent S. Nadolski
15
16BPMFamily = {gethbpmfamily, getvbpmfamily};
17
18% %read horizontal orbit for status ==1 bpms
19% TangoNames = getfamilydata('BPMx','Monitor','TangoNames');
20% status     = find(getfamilydata('BPMx','Status'));
21% x          = getam(char(TangoNames(status,:)));
22%
23% %read horizontal orbit for status ==1 bpms
24% TangoNames = getfamilydata('BPMz','Monitor','TangoNames');
25% status     = find(getfamilydata('BPMz','Status'));
26% z          = getam(char(TangoNames(status,:)));
27
28GroupID = getfamilydata('BPMx','GroupId');
29R = tango_group_read_attribute(GroupID, 'XPosSA', 0);
30
31if tango_error
32    tango_print_error_stack
33    return;
34end
35
36for k = 1:length(R.replies)
37    XData(k,1) = R.replies(k).value(1);
38end
39Status = getfamilydata(BPMFamily{1},'Status');
40XData = XData(find(Status));
41
42R = tango_group_read_attribute(GroupID, 'ZPosSA', 0);
43
44if tango_error
45    tango_print_error_stack
46    return;
47end
48
49for k = 1:length(R.replies)
50    ZData(k,1) = R.replies(k).value(1);
51end
52
53Status = getfamilydata(BPMFamily{2},'Status');
54ZData = ZData(find(Status));
Note: See TracBrowser for help on using the repository browser.