forked from hbkworld/open-api-time-data-recorder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRecorderOpen.m
More file actions
18 lines (14 loc) · 787 Bytes
/
Copy pathRecorderOpen.m
File metadata and controls
18 lines (14 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function RecorderOpen(ip,DefaultTimeout,OpenParameters)
% Bruel & Kjaer LAN-XI Open Application Programming Interface
% MATLAB Simple Recorder GUI Version 1.0 (September 15, 2021)
% By Matthew Houtteman and Gert Nyrup
% +1 800-332-2040
% TechnicalSalesSupport.US@hbkworld.com
% Developed in MATLAB R2021a with LAN-XI Firmware 2.10.0.501
% This function opens the recorder on the module using the REST PUT command
% /rest/rec/open. Note that after issuing the REST command it is necessary
% to wait for moduleState to be "RecorderOpened" before further commands
% are issued.
webwrite(strcat(strcat("http://",ip),"/rest/rec/open"),weboptions('RequestMethod','put','Timeout',DefaultTimeout),OpenParameters);
WaitForModuleState(ip,DefaultTimeout,"RecorderOpened");
end