I want to change the "isInputDataTypeMutableImpl" parameter of the block "Serial Send"
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Pratik
il 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!
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!