ecoc measurements
This commit is contained in:
@@ -32,14 +32,30 @@ classdef Thor_PDFA < handle
|
||||
end
|
||||
end
|
||||
|
||||
obj.getStatus();
|
||||
|
||||
end
|
||||
|
||||
function o = connectSerial(obj)
|
||||
|
||||
% Connect to the PDFA
|
||||
o = serialport(obj.serialport_number, 9600);
|
||||
configureTerminator(o, "CR", "CR"); % Set the terminator to carriage return (CR)
|
||||
flush(o);
|
||||
try
|
||||
% Connect to the PDFA
|
||||
o = serialport(obj.serialport_number, 9600);
|
||||
configureTerminator(o, "CR", "CR"); % Set the terminator to carriage return (CR)
|
||||
flush(o);
|
||||
catch ME
|
||||
disp(['Error connecting to PDFA: ', ME.message]);
|
||||
% List available serial ports
|
||||
availablePorts = serialportlist("available");
|
||||
|
||||
if isempty(availablePorts)
|
||||
disp('No available serial ports found.');
|
||||
else
|
||||
disp('Available serial ports:');
|
||||
disp(availablePorts);
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user