-
Notifications
You must be signed in to change notification settings - Fork 2
/
power14_test.m
32 lines (27 loc) · 836 Bytes
/
power14_test.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
% open connection to power
res=MATCED32('cedOpenX',0); % v3+ can specify 1401
if (res < 0)
disp(['1401 not opened, error number ' int2str(res)]);
return;
end %opened OK if we continue
% reset the power thing
res=MATCED32('cedResetX');
if (res < 0)
disp(['could not reset, error number ' int2str(res)]);
return;
end %opened OK if we continue
% needed with latest version of the dll (mex file)
res=MATCED32('cedWorkingSet',400,4000);
if (res > 0)
disp('error with call to cedWorkingSet - try commenting it out');
return
end
% next line needs v3 or later of matced32.dll
MATCED32('cedSendString','DIG,O,1,8;');
%pause(5)
MATCED32('cedSendString','DIG,O,0,8;');
res=MATCED32('cedCloseX');
if (res < 0)
disp(['could not close, error number ' int2str(res)]);
return;
end