powerwindow_controller_delay.sa 588 B

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