-
Notifications
You must be signed in to change notification settings - Fork 4
/
pb_OpenCloseUV_Callback.m
42 lines (33 loc) · 1.58 KB
/
pb_OpenCloseUV_Callback.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
42
% --- Executes on button press in pb_openUV.
function pb_OpenCloseUV_Callback(hObject, eventdata, handles)
%% ----- This function is OPEN LOOP CONTROL:
% manually opens/closes UV shutter to control DMD display with following parameters
...global data: DMDimage (DMD bitmap generated by the pushbutton "pb_generateDMDbitmap"
% note: grayscale of the bitmap (255=black=DMD on, 0=white=DMD off)
...UV Iris level between 1 and 95 [%]from the user interface edit box
% note: for Intensity Control: to test the intesntiy effects,
... we may change the bitmap grayscale = 255 (black)
... or change the UV iris level
...handles.hdvp: video display on the monitor (set in "pb_generateDMDbitmap_Callback.m")
global uv
global g_uvStatus
global hdvp
global DMDimage
handles = updateParameters(handles);
%% Open UV
if strcmp(get(handles.pb_OpenCloseUV,'String'), 'Open UV Light')
icm_set_uv_status(1,handles.cp.uvIris);
%% Change button string
set(handles.pb_OpenCloseUV, 'String', 'Close UV Light');
% update the Interferogram Status Bar for info
set(handles.st_InterferogramStatusBar,'String', 'UV shutter opened and DMD bitmap displaying...');
%% Close UV
else
icm_set_uv_status(0,handles.cp.uvIris)
% Change button string
set(handles.pb_OpenCloseUV, 'String', 'Open UV Light');
set(handles.pb_OpenCloseUV, 'Enable', 'off');
% update the Interferogram Status Bar for info
set(handles.st_InterferogramStatusBar,'String','UV shutter closed and lamp disconnected');
end
guidata(hObject, handles);