write function edited to retrigger alarm

Alarm[ID].nextTrigger=0;