How do I connect to a Phasor Measurement Unit (SEL-311C) using it's serial port RS232? I am able to do that using Teraterm but not in Matlab

2 ビュー (過去 30 日間)
I am very new to Matlab. I used Teraterm to communicate with the device (Transmission and protection system SEL-311C). I can send commands and receive the responses in Teraterm but while I try to use Matlab, I cannot get anything. This device is very specific used case device that I am using for my University Project and doesn't have a big screen where I can verify the data transmission. I am stuck as I want to use a Matlab program to receive the phasor data using this device and analyse the data using a Matlab program.

回答 (1 件)

UDAYA PEDDIRAJU
UDAYA PEDDIRAJU 2024 年 5 月 10 日
編集済み: UDAYA PEDDIRAJU 2024 年 5 月 10 日
Hi Sudhir,
Connecting to SEL-311C via Serial Port in MATLAB:
While Teraterm works, replicating it in MATLAB requires the Instrument Control Toolbox (check using ver('instrument')). You'll also need the SEL-311C's communication protocol specifications (user manual).
Steps:
  1. Prerequisites:
  • MATLAB with Instrument Control Toolbox
  • SEL-311C communication protocol details
Communication Object Creation:
s = serial('COM3'); % Replace with your port number
s.BaudRate = 9600; % Adjust based on SEL-311C settings
s.Parity = 'none';
s.DataBits = 8;
s.StopBits = 1;
fopen(s);
Sending Commands and Receiving Data:
% Send a command (replace with specific command)
fwrite(s, 'MEAS:VOLT?'); % Example command
s.Timeout = 10; % Set timeout (adjust as needed)
% Read incoming data (adjust format based on response)
data = fscanf(s, '%f'); % Example: Read a floating-point value
fclose(s);
  1. Data Analysis:Use MATLAB's data analysis tools (e.g., extracting magnitudes, generating plots) on the received data.
Remember:
  • Replace placeholders with your specific values.
  • Implement error handling for robustness.
  • Consider instrument drivers (if available) for simplified communication.
This approach allows you to establish serial communication with the SEL-311C, retrieve phasor data, and leverage MATLAB's analysis capabilities for further exploration.

カテゴリ

Help Center および File ExchangeWaveform Generation についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by