Hello,
I am working with the USB-RLY82 from robot-electronics.co.uk
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:
s=serial('COM3');
fopen(s);
fprintf(s,'100');

댓글 수: 2

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

댓글을 달려면 로그인하십시오.

 채택된 답변

Stijn Haenen
Stijn Haenen 2020년 9월 30일

0 개 추천

Oh i solved my own problem, i should use int8 commands:
fwrite(s, [hex2dec('64')], 'int8');

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

질문:

2020년 9월 30일

답변:

2020년 9월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by