Simulink Real-Time UDP Send error: "Operands to the || and && operators must be convertible to logical scalar values"
6 views (last 30 days)
Show older comments
MathWorks Support Team
on 23 Apr 2019
Answered: MathWorks Support Team
on 24 Apr 2019
I have a model with a UDP Send block from the Simulink Real-Time Library. When I update my model I get the following error:
Error evaluating < 'InitFcn'> callback of slrtudpsend block (mask) '< operandsError/UDP Send>'. Callback string is '% Validate model udpvalidatemodel(gcb);'
Caused by:
- ERROR: Operands to the and && operators must be convertible to logical scalar values.
Accepted Answer
MathWorks Support Team
on 23 Apr 2019
This error means that there is an invalid setting for the "Local Port" Parameter of the UDP Send block. This could be because this parameter depends on a variable that is not defined in the workspace. See the attached model which reproduces the error because variable "myVar" does not exist.
0 Comments
More Answers (0)
See Also
Categories
Find more on Hardware-in-the-Loop Simulation with Simulink Real-Time in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!