I want to change the "isInputDataTypeMutableImpl" parameter of the block "Serial Send"
6 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Pratik
2024-2-12
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!
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!