bgtorque
Member
Hi All
There have been a few questions looking through at code for flashing a lamp/buzzer/output at a given frequency. I want to create an ouput that will vary depending on whether in Alarm or in Trip, so basically I have looked at a 4-timer solution to give me an On/Off/On/Off that I can vary the urgency basically. I'm sure that I had this running but have made a mod somewhere along the way and cannot get back to a working condition.
Essentially Timer1On and Timer2On are the times the alarm is ON, Timer1Off and Timer2Off the alarm is off. Here is my Logix code:
My issue seems to be that Timer2Off never completes and even though Timer2Off doesnt complete and so Timer1On RES is never triggered, Timer1On.TT still resumes.
I have tried to to put XIO(Timer2Off.DN) on the first line ahead of Timer1On, but obviously the whole thing never kicks off. Any help on where i'm being thick would be appreciated.
many thanks.
There have been a few questions looking through at code for flashing a lamp/buzzer/output at a given frequency. I want to create an ouput that will vary depending on whether in Alarm or in Trip, so basically I have looked at a 4-timer solution to give me an On/Off/On/Off that I can vary the urgency basically. I'm sure that I had this running but have made a mod somewhere along the way and cannot get back to a working condition.
Essentially Timer1On and Timer2On are the times the alarm is ON, Timer1Off and Timer2Off the alarm is off. Here is my Logix code:
TON(Timer1On,150,0);
XIC(Timer1On.DN)TON(Timer1Off,300,0);
XIC(Timer1Off.DN)TON(Timer2On,150,0);
XIC(Timer2On.DN)TON(Timer2Off,1500,0);
[XIC(Timer1On.TT),XIC(Timer2On.TT)]OTE(Output);
XIC(Timer2Off.DN)RES(Timer1On);
My issue seems to be that Timer2Off never completes and even though Timer2Off doesnt complete and so Timer1On RES is never triggered, Timer1On.TT still resumes.
I have tried to to put XIO(Timer2Off.DN) on the first line ahead of Timer1On, but obviously the whole thing never kicks off. Any help on where i'm being thick would be appreciated.
many thanks.
Last edited: