Syntax
raamboscreen(PORT)
Input Parameter
PORT : | | already opened PORT such as COM1 or /dev/tty.usb11001 |
Examples
%% Unplug and plugin cable to the robot on robot side first
COM1=serialport('/dev/tty.usbmodem21201',230400);
raamboscreen(COM1);
Copyright 2024-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This algorithm facilitates character-based communication with a Raambo®-Robot via a serial link, typically USB. It is designed to function as a terminal interface within Matlab, allowing for interaction with the robot.
Input Parameters
- PORT: This is an already opened serial port object, such as COM1 or /dev/tty.usb11001, which is used to communicate with the robot.
Algorithm Steps
- Display a message indicating how to quit the program from the Matlab side using specific key combinations.
- Initialize variables:
- BLEN: Buffer length set to 3000.
- RECBUF: A character array initialized to zeros, used to store received data.
- cw: Current write position in the buffer, initialized to 0.
- cr: Current read position in the buffer, initialized to 0.
- Enter an infinite loop to continuously read and write data:
- Check the number of bytes available to read from the PORT.
- If bytes are available, read them into the buffer and update the write position.
- Determine the range of new data in the buffer and update the read position.
- If new data is available, process it using the
vt100
function and display it.
- Check for keyboard input; if detected, send it to the PORT.
Sub-function: vt100
This function processes the text received from the robot. If the system is a Mac, it removes carriage return characters from the text.
Algorithm explaination created using ChatGPT on 2025-08-19 08:14. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21