Class property described, but not available for serialPort objects?

15 次查看(过去 30 天)
The MATLAB documentation on the serialPort object found in serialport - Connection to serial port - MATLAB - MathWorks United Kingdom , claims that there is a configurable property for the serial port called 'Tag'. According to the documentation, it is used for finding the port by using the string that is input as the argument following the Tag input. However, when I try to use this input I get an error. For example:
- serialPort = serialport(portID,115200,"Timeout",1000,'Tag','portMercury');
-serialPort = serialport(portID,115200,"Timeout",1000,Tag,'portMercury');
Both return the error: 'Tag' is not a recognized parameter.
When you instantiate the object, it also does not seem to contain any parameters called Tag. Is this a MATLAB 2024 thing? I'm on 2023a. Or is it just an error in the documentation? Or am I doing something wrong here?

采纳的回答

Steven Lord
Steven Lord 2024-11-12,14:46
The Version History section on that documentation page states that there is a "New Tag Property" introduced in release R2024a. So this is "a MATLAB 2024 thing".

更多回答(0 个)

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by