%% Write ID Query to Device
% Create a connection to a serial port device using serialport. You can also connect to a Bluetooth device using bluetooth or a TCP/IP client using tcpclient.

dev = serialport("COM3",9600);

% Set the ASCII terminator and write an instrument identification query string to the device. The writeline function automatically includes the defined terminator.

configureTerminator(dev,"CR");
writeline(dev,"*IDN?")

% Copyright 2020 The MathWorks, Inc.