MATLAB Answers

Serial port is not working

3 views (last 30 days)
Stijn Haenen
Stijn Haenen on 30 Sep 2020
Answered: Stijn Haenen on 30 Sep 2020
I am working with the USB-RLY82 from
I have connected this device to the computer and it is available on COM3. But when i make a serial and open the port, it is not responding. I have a C++ program to control the device and this program works, so the device is not broken. But i want to control the device via matlab. How can i fix the serial?
this script is used to open the serial:


Ameer Hamza
Ameer Hamza on 30 Sep 2020
Have you configured the baud rate? Default rate is 9600.
Stijn Haenen
Stijn Haenen on 30 Sep 2020
yes i tried many different baud rates, but without any result

Sign in to comment.

Accepted Answer

Stijn Haenen
Stijn Haenen on 30 Sep 2020
Oh i solved my own problem, i should use int8 commands:
fwrite(s, [hex2dec('64')], 'int8');


Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!