source: MML/trunk/mml/links/opc/setpvonline.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: 893 bytes
Line 
1function ErrorFlag = setpvonline(ChannelNames, NewSP, DataType);
2% ErrorFlag = setpvonline(ChannelNames, NewSP, DataType);
3%
4% Special setpvonline for OPC
5
6
7if nargin < 2
8    error('Must have at least two inputs');
9end
10
11
12% Vectorized put
13
14% There can be multiple channel names due to "ganged" power supplies
15[ChannelNames, i] = unique(ChannelNames, 'rows');
16
17% if size(ChannelNames,1) == size(NewSP,1)
18%     % ChannelNames equals the number of power supplies
19% else
20NewSP = NewSP(i,:);
21% end
22
23
24%if size(ChannelNames,1) ~= size(NewSP,1)
25%    error('Size of NewSP must be equal to the DeviceList, a scalar, or the number of unique channelnames in the family');
26%end
27
28
29% Remove ' ' and fill with NaN latter (' ' should always be the first row)
30if isempty(deblank(ChannelNames(1,:)))
31    ChannelNames(1,:) = [];
32    NewSP(1,:) = [];
33end
34
35
36% Put data
37ErrorFlag = setopc(ChannelNames, NewSP);
38   
Note: See TracBrowser for help on using the repository browser.