Realterm RS232 comms - serial()-like version

버전 1.3.0.0 (13.8 KB) 작성자: Geoffrey Akien
Use Realterm the way you can using the MATLAB "serial" commands and instrument control toolbox.
다운로드 수: 536
업데이트 날짜: 2013/6/24

라이선스 보기

This is a package of files for using Realterm (via ActiveX) almost exactly like you normally would with serial/fread/fprintf etc etc. from the instrument control toolbox - the MATLAB help files more fully explain some of the input/output arguments. rt has been implemented as an hgsetget class, so the same set()/get() and dot notation applies. Properties can be set with case-insensitive and partial matches.

The most significant limitation is that it does not support software flow control as yet.

rtObject = rt(Port, Property/Value pairs)
Create a Realterm activeX control in the same manner as you would with serial(). Property/Value pairs can be in serial() format.

fopen(rtObject)
Connects

fclose(rtObject)
Closes and cleans up

delete(rtObject)
Deletes the object

output = fread(rtObject)
output = fread(rtObject, bytes)
output = fread(rtObject, bytes, precision)
[output, count, message] = fread(...)
Reads up to the number of bytes, or until it times out.

output = fscanf(rtObject)
output = fscanf(rtObject, format)
output = fscanf(rtObject, format, bytes)
[output, count, message] = fscanf(...)
Reads up to the number of bytes, or the terminator, or until it times out.

output = fgets(rtObject)
[output, count, message] = fgets(...)
Reads one line up to the terminator cf fscanf, including the terminator.

output = fgetl(rtObject)
[output, count, message] = fgetl(...)
Reads one line up the terminator cf fscanf, discarding the terminators.

fwrite(rtObject, data)
fwrite(rtObject, data, precision)
Sends a message to an rtObject - see serial/fread for a fuller description of the precision argument

fprintf(rtObject, input, format)
Sends a message to an rtObject, appending on the terminator.

인용 양식

Geoffrey Akien (2024). Realterm RS232 comms - serial()-like version (https://www.mathworks.com/matlabcentral/fileexchange/42297-realterm-rs232-comms-serial-like-version), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2012b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Instrument Control Toolbox Supported Hardware에 대해 자세히 알아보기
태그 태그 추가

Community Treasure Hunt

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

Start Hunting!

버전 게시됨 릴리스 정보
1.3.0.0

Add disp method for better serial()-like behaviour, and some small changes to the set/get methods.

1.1.0.0

Updated description to reflect issues with software flow control.

1.0.0.0