Error in 'StepperMotor_fout/PWM Generator/Carrier counter': Failed to evaluate mask initialization commands. Caused by: Operands to the logical AND (&&) and OR (||) operator
1 回表示 (過去 30 日間)
古いコメントを表示
I'm building a closed loop PID controlled stepper motor for speed control in simulink. While execution the following error shows up.
"Error in 'StepperMotor_fout/PWM Generator/Carrier counter': Failed to evaluate mask initialization commands.
Caused by:
Operands to the logical AND (&&) and OR (||) operators must be convertible to logical scalar values. Use the ANY or ALL functions to reduce operands to logical scalar values."
Kindly give ur comments.
2 件のコメント
madhan ravi
2024 年 1 月 5 日
編集済み: madhan ravi
2024 年 1 月 5 日
Without seeing your code nor the model, it’s hard to do any black magic
Walter Roberson
2024 年 1 月 5 日
Most likely, something that is being used in mask initialization is empty instead of being a scalar.
回答 (1 件)
Sabin
2024 年 1 月 23 日
The error message indicates that there is an issue with the mask initialization commands for this block, specifically involving the use of logical AND (&&) or OR (||) operators. The error suggests that the operands used with these logical operators are not scalar values, which is required for these operations.
1 件のコメント
madhan ravi
2024 年 1 月 24 日
編集済み: madhan ravi
2024 年 1 月 24 日
+1, and if it"s a boolean vector signal using any() or all() operation should be used as suggested.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!