Using Timer to switch off a switch in Simulink
显示 更早的评论
Hi Everyone,
Hope everyone is surviving the panademic ok. I need some assitance.
I'm using Simulink for modelling and I require a Matlab function to switch on/off a switch. When the switch is 1 its open and vice versa. For my model, when my voltage drops below 0.5 (input to my Matlab function) I want to disconnect my system (switch =0, output of my function) if the voltage drop lasts longer than 2s. I'm trying to implement this using a timer object. Is this preferred method to do this? So far, I'm getting the following error with my code>? "The 'timer' class does not support code generation".

采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Arduino Hardware 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!