diff --git a/disturbance-measurement/run_test.m b/disturbance-measurement/run_test.m index dec7dd8..8ce9477 100644 --- a/disturbance-measurement/run_test.m +++ b/disturbance-measurement/run_test.m @@ -1,49 +1,53 @@ +%% +Tsim = 100; % [s] + +%% tg = slrt; %% TODO - Build this application if updated %% if tg.Connected == "Yes" + if tg.Status == "running" + disp('Target is Running, Stopping...'); + tg.stop; + while tg.Status == "running" + pause(1); + end + disp('Target is Stopped'); + end if tg.Status == "stopped" - %% Load the application + disp('Load the Application'); tg.load('disturbance_measurement'); %% Run the application + disp('Starting the Application'); tg.start; - pause(300); + pause(Tsim); tg.stop; - - %% Load the data - f = SimulinkRealTime.openFTP(tg); - cd(f, 'data/disturbance_measurement/'); - mget(f, 'data_001.dat', 'data'); - close(f); end +else + error("The target computer is not connected"); end +%% +f = SimulinkRealTime.openFTP(tg); +cd(f, 'data/disturbance_measurement/'); +mget(f, 'data_001.dat', 'data'); +close(f); + data = SimulinkRealTime.utils.getFileScopeData('data/data_001.dat').data; -size(data) - -t = data(:, end); -x1 = data(:, 1); -x2 = data(:, 2); - -save('mat/data_002.mat', 't', 'x1', 'x2'); - -%% Plot the data -figure; -hold on; -plot(t, x1); -plot(t, x2); -hold off -xlabel('Time [s]'); -ylabel('Voltage [V]'); - %% -figure; -hold on; -plot(t, x1-x2); -hold off -xlabel('Time [s]'); -ylabel('Voltage [V]'); +n = 17; + +while isfile(['mat/data_', num2str(n, '%03d'), '.mat']) + disp('File exists.'); + if input(['Are you sure you want to override the file ', 'mat/data_', ... + num2str(n, '%03d'), '.mat', ' ? [Y/n]']) == 'Y' + break; + end + n = input('What should be the measurement number?'); +end + +save(['mat/data_', num2str(n, '%03d'), '.mat'], 'data'); diff --git a/slip-ring-test/mat/data_018.mat b/slip-ring-test/mat/data_018.mat new file mode 100644 index 0000000..3c3721d Binary files /dev/null and b/slip-ring-test/mat/data_018.mat differ diff --git a/slip-ring-test/readme.org b/slip-ring-test/readme.org index b58c5d7..217d3ca 100644 --- a/slip-ring-test/readme.org +++ b/slip-ring-test/readme.org @@ -68,3 +68,9 @@ Second column: DC - meas14: col-1 = amp1+AC. col-2 = amp2+DC. - meas15: col-1 = amp1+DC. col-2 = amp2+AC. + +* Measurement of the LPF +We are measuring the signal from from Geophone with a BNC T +On part goes to column 1 through the LPF +The other part goes to column 2 without the LPF +- meas18 \ No newline at end of file diff --git a/slip-ring-test/run_test.m b/slip-ring-test/run_test.m index bf2d35d..8cd53fe 100644 --- a/slip-ring-test/run_test.m +++ b/slip-ring-test/run_test.m @@ -40,7 +40,7 @@ close(f); data = SimulinkRealTime.utils.getFileScopeData('data/data_001.dat').data; %% -n = 17; +n = 18; while isfile(['mat/data_', num2str(n, '%03d'), '.mat']) disp('File exists.'); diff --git a/static-measurements/mat/data_013.mat b/static-measurements/mat/data_013.mat new file mode 100644 index 0000000..050427e Binary files /dev/null and b/static-measurements/mat/data_013.mat differ diff --git a/static-measurements/mat/data_014.mat b/static-measurements/mat/data_014.mat new file mode 100644 index 0000000..9b2a6b8 Binary files /dev/null and b/static-measurements/mat/data_014.mat differ diff --git a/static-measurements/mat/data_015.mat b/static-measurements/mat/data_015.mat new file mode 100644 index 0000000..df3fb8f Binary files /dev/null and b/static-measurements/mat/data_015.mat differ diff --git a/static-measurements/mat/data_016.mat b/static-measurements/mat/data_016.mat new file mode 100644 index 0000000..9b04bdc Binary files /dev/null and b/static-measurements/mat/data_016.mat differ diff --git a/static-measurements/mat/data_017.mat b/static-measurements/mat/data_017.mat new file mode 100644 index 0000000..6303b4b Binary files /dev/null and b/static-measurements/mat/data_017.mat differ diff --git a/static-measurements/mat/data_018.mat b/static-measurements/mat/data_018.mat new file mode 100644 index 0000000..940ab27 Binary files /dev/null and b/static-measurements/mat/data_018.mat differ diff --git a/static-measurements/measure_channels.slx b/static-measurements/measure_channels.slx index 66c4197..da1bbaf 100644 Binary files a/static-measurements/measure_channels.slx and b/static-measurements/measure_channels.slx differ diff --git a/static-measurements/readme.org b/static-measurements/readme.org index 8d3f7fc..7b84da5 100644 --- a/static-measurements/readme.org +++ b/static-measurements/readme.org @@ -48,3 +48,22 @@ Channels: | 1 | Ty | | 2 | Ry | | 3 | Time | + + +* New measurements 07/05 + +Low pass Filters at 1kHz are added before the voltage amplifiers + +The voltage amplifiers are: 60db, DC(!) and 1kHz + +Channel 1: marble motion +Channel 2: Sample motion + +- All OFF meas_013.mat +- Ty ON meas_014.mat +- Ry ON meas_015.mat +- SR ON meas_016.mat +- Rz ON meas_017.mat +- Hexa ON meas_018.mat + + diff --git a/static-measurements/run_test.m b/static-measurements/run_test.m new file mode 100644 index 0000000..d684b2d --- /dev/null +++ b/static-measurements/run_test.m @@ -0,0 +1,53 @@ +%% +Tsim = 100; % [s] + +%% +tg = slrt; + +%% TODO - Build this application if updated + +%% +if tg.Connected == "Yes" + if tg.Status == "running" + disp('Target is Running, Stopping...'); + tg.stop; + while tg.Status == "running" + pause(1); + end + disp('Target is Stopped'); + end + if tg.Status == "stopped" + disp('Load the Application'); + tg.load('measure_channels'); + + %% Run the application + disp('Starting the Application'); + tg.start; + pause(Tsim); + tg.stop; + end +else + error("The target computer is not connected"); +end + +%% +f = SimulinkRealTime.openFTP(tg); +cd(f, 'data/measure_channels/'); +mget(f, 'data_001.dat', 'data'); +close(f); + +data = SimulinkRealTime.utils.getFileScopeData('data/data_001.dat').data; + +%% +n = 18; + +while isfile(['mat/data_', num2str(n, '%03d'), '.mat']) + disp('File exists.'); + if input(['Are you sure you want to override the file ', 'mat/data_', ... + num2str(n, '%03d'), '.mat', ' ? [Y/n]']) == 'Y' + break; + end + n = input('What should be the measurement number?'); +end + +save(['mat/data_', num2str(n, '%03d'), '.mat'], 'data');