-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCreateChannelSetup.m
More file actions
50 lines (37 loc) · 1.97 KB
/
Copy pathCreateChannelSetup.m
File metadata and controls
50 lines (37 loc) · 1.97 KB
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
43
44
45
46
47
48
49
50
function ChannelSetup = CreateChannelSetup(ChannelSetup,SystemFrequencyRange,ChannelInformationTableData)
% 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 populates the channel setup structure that is passed to the
% module as a JSON with user inputs from the interface
for ii = 1:1:length(ChannelSetup.channels)
ChannelSetup.channels(ii).bandwidth = SystemFrequencyRange; % sets the same sample rate on all channels to comply with hardware limitations
ChannelSetup.channels(ii).destinations = {'socket'}; % replaces stream destination from default SD card to socket
if string(ChannelInformationTableData{ii,3}) == "Yes"
ChannelSetup.channels(ii).enabled = true;
else
ChannelSetup.channels(ii).enabled = false;
end
ChannelSetup.channels(ii).filter = ChannelInformationTableData{ii,5};
if string(ChannelInformationTableData{ii,6}) == "Yes"
ChannelSetup.channels(ii).floating = true;
else
ChannelSetup.channels(ii).floating = false;
end
ChannelSetup.channels(ii).name = ChannelInformationTableData{ii,7};
ChannelSetup.channels(ii).transducer.requires200V = false;
if string(ChannelInformationTableData{ii,8}) == "Yes"
ChannelSetup.channels(ii).ccld = true;
ChannelSetup.channels(ii).transducer.requiresCcld = true;
else
ChannelSetup.channels(ii).ccld = false;
ChannelSetup.channels(ii).transducer.requiresCcld = false;
end
ChannelSetup.channels(ii).transducer.sensitivity = ChannelInformationTableData{ii,11};
ChannelSetup.channels(ii).transducer.serialNumber = ChannelInformationTableData{ii,10};
ChannelSetup.channels(ii).transducer.unit = ChannelInformationTableData{ii,12}(3:end);
end
end