powerwindow_controller_delay.sa 516 B

12345678910111213141516171819202122
  1. import PowerWindowModel
  2. module Controller_SA
  3. semantic adaptation armature_current_sa
  4. for fmu controller
  5. triggered by signal == true
  6. in rules with crossing absolute tolerance = 1e-8 and relative tolerance = 0.0001, no hold {
  7. armature_current >! 5 -> obj_detected := true;
  8. otherwise(armature_current) -> obj_detected := false;
  9. }
  10. semantic adaptation in_out_sa
  11. for fmu controller
  12. out rules with zero order hold {
  13. "up" -> up := 1;
  14. "stop" -> { up := 0; down := 0; };
  15. "down" -> down := 1;
  16. delay at up and down;
  17. }