I want to change the "isInputDataTypeMutableImpl" parameter of the block "Serial Send"
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Stefan Kern
am 7 Feb. 2024
Kommentiert: Stefan Kern
am 12 Feb. 2024
Hello,
I would like to use the block "Serial Send" with varying length of input data (input is a uint8 array). When I try to do this, I get the error "input size for Serial Send is a variable-size signal, but System object "system.SerialSend" indicates that it expects a fixed-size input signal. ... modify the 'isInputSizeMutableImpl' method to allow variable-size input signal.
Can you explain to me how I can modify the 'isInputSizeMutableImpl' method to allow variable-size input signal?
Thank you and best regards,
Stefan
0 Kommentare
Akzeptierte Antwort
Pratik
am 12 Feb. 2024
Hi Stefan,
In my understanding, you are trying to use “Serial Send” block with varying length of input data.
Serial Send block does not currently support inputs with variable size. The input data size is set upon compilation time and will not change during execution.
As a workaround to this, all the command sizes can be set to maximum command size and shorter command can be padded with values which the hardware will ignore.
Please refer to the following question on MATLAB Answers which discusses about the same issue and more workarounds for the same:
I hope this helps!
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Communications Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!