Can the data type of a Simulink PS converter be boolean instead of double/single?

12 次查看(过去 30 天)
I have a signal. A data type conversion block is being used to convert the data type of the signal to boolean. The signal then goes to Simulink PS converter. Upon doing so the follwoing error pops up.
Request for help to use boolean data type signals with Simulink PS converters.

回答(1 个)

Madheswaran
Madheswaran 2024-8-5
Hi Shivani,
As it is mentioned in the documentation, the only the datatype double is supported as an input datatype for input port in Simulink-PS Converter block. However, you can add a ‘Data Type Conversion’ block to convert the signals of type Boolean to the corresponding double values, i.e., 0 for false and 1 for true.
Please refer to the following documentation for Simulink-PS convertor block:
  1. https://mathworks.com/help/simscape/ref/simulinkpsconverter.html#mw_b1ddb719-e375-4152-a567-9b5e2cf5e013
  2. https://in.mathworks.com/help/simulink/ug/control-signal-data-types.html

类别

Help CenterFile Exchange 中查找有关 Switches and Breakers 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by