-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChangeParam.m
41 lines (40 loc) · 1.35 KB
/
ChangeParam.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
33
34
35
36
37
38
39
40
41
function position = ChangeParam(GenObj, measuring_speed,position,param,param_val,testmode,nosource)
if testmode
return
end
switch param
case 'x'
OpenXYZcontroller();
MoveStage(param_val,position(2),position(3),measuring_speed);
CloseXYZcontroller();
position(1) = param_val;
case 'y'
OpenXYZcontroller();
MoveStage(position(1),param_val,position(3),measuring_speed);
CloseXYZcontroller();
position(2) = param_val;
case 'z'
OpenXYZcontroller();
MoveStage(position(1),position(2),param_val,measuring_speed);
CloseXYZcontroller();
position(3) = param_val;
case 'f'
if ~nosource
SetSignal(GenObj,'f', param_val,0,0);
else
disp('Cannot use parameter f, because source is not connected')
end
case 'b'
if ~nosource
SetSignal(GenObj,'b', 0,param_val,0);
else
disp('Cannot use parameter b, because source is not connected')
end
case 'v'
if ~nosource
SetSignal(GenObj,'v', 0,0,param_val);
else
disp('Cannot use parameter v, because source is not connected')
end
end
end