capl初使用

尝试将某信号设置为发送500ms后复位 

/*@!Encoding:936*/
includes
{
  
}
  
variables
{
  msTimer ExteriorLightTimer;
}

on message HU_8
{

  $ExteriorLightSwitchReq = $ExteriorLightSwitchReq;
  setTimer(ExteriorLightTimer,500); 
}
on timer ExteriorLightTimer
{
  write("ExSwitchtest OK");
  $ExteriorLightSwitchReq = 0;
}

  


setTimer(ExteriorLightTimer,500);
}
on timer ExteriorLightTimer
{
write("ExSwitchtest OK");
$ExteriorLightSwitchReq = 0;
}

posted @ 2023-11-22 18:18  韩昊  阅读(36)  评论(1编辑  收藏  举报