How to make a Simulink Switch not momentary?

44 visualizaciones (últimos 30 días)
Shane
Shane el 20 de Nov. de 2024 a las 16:39
Respondida: Hitesh el 21 de Nov. de 2024 a las 10:04
I'm trying to make switch pictured below operate and stay in position. The block help page says that when the PS connection sees a value above the set Threshold (.5) the switch is closed, otherwise the switch is open. I thought using a constant would force the switch to remain in the closed position. From testing the switch is only momentarily triggered open and then reverts to the closed position. Ultimately the goal is to feed a Boolean where the constant is and have that operate the switch.
I've seen others use an OR gate and a memory loop to accomplish this but that seem unnecessarily complicated. How can I make the switch stay in the closed state?
  2 comentarios
Hitesh
Hitesh el 20 de Nov. de 2024 a las 16:46
Could you share the simulink file ?
Shane
Shane el 20 de Nov. de 2024 a las 18:53
I've added the file to the main post.

Iniciar sesión para comentar.

Respuesta aceptada

Hitesh
Hitesh el 21 de Nov. de 2024 a las 10:04
The model you provided was not completing the circuit, which led to the “Switch” block being only momentarily triggered open before reverting to the closed position. Essentially, the model was showing a scenario where one terminal was connected, but the other was not. To allow the “Switch” block to function as intended, you need to add some resistance or load to the circuit. I have revised the model and attached it for your reference.
For more information regarding the "Switch" block, kindly refer to the following MATLAB documentation:

Más respuestas (0)

Categorías

Más información sobre Electrical Sensors en Help Center y File Exchange.

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by