Hi,
I wanted to test my Powerstage Protection linked to a PWM output of RTBox1 in Simulation. But it didn’t work as expected.
So a made a simple example in the attachement.
I have the system separated into a Controller and a Plant. The Controller and Plant are set to code generation and to normal simulation mode.
Simulation start:
- Enable Input = 0
- Trip Input = 1
——————————- - Power Stage Output = 0
- BUT: PWM is already running
after 5ms
- Enable Input = 0
- set Trip Input = 0
——————————- - Power Stage Output = 0
- BUT: PWM is still running
after 10ms
- set Enable Input = 1
- Trip Input = 0
——————————- - Power Stage Output = 0
- BUT: PWM is still running –> I would expect that the PWM output would start only now after a rising edge on the Enable Input
But the PWM Capture in the Plant sees the PWM starting at Simulation start immediately.
I tried also switching from HIL to RCP and back.
Is there something I messed up in wiring / parameter settings? Can someone help me please?
Powerstage_Protection_SIM.plecs (42.1 KB)