Simulink Real-Time UDP Send error: "Operands to the || and && operators must be convertible to logical scalar values"

2 views (last 30 days)
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
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.

More Answers (0)

Categories

Find more on Hardware-in-the-Loop Simulation with Simulink Real-Time in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!