Author Topic: Multiple output for event schedule  (Read 10096 times)

RikiTiki

  • Newbie
  • *
  • Posts: 1
  • I'm a llama!
    • View Profile
Multiple output for event schedule
« on: September 22, 2009, 01:31:04 PM »
The following event schedule works great for output1, however, I'm having difficulties finding a way to have a second output (OUT2) turn on simultaiously but only for 30 seconds.
IF TIME[1]=4 AND TIME[2]=0
     SETIO OUT1
ELSE
     IF TIME[1]=4 AND TIME[2]=30
     CLRIO OUT1
     ENDIF
ENDIF

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:Multiple output for event schedule
« Reply #1 on: September 22, 2009, 06:44:56 PM »
You can use ladder logic to create OUT2 so that it is ON for the first 30 seconds that OUT1 is ON.

You can use a TIMER with a Set Value of 300 (30 seconds) to generate OUT2 from OUT1.

In the following example, Tmr30Sec is a TIMER with a SV of 300:


   Out1                                  Tmr30Sec
----||------------------------------------(TIM)

   Out1   Tmr30Sec                        Out2
----||------|/|---------------------------(OUT)



There is sample code posted on the TRI website that demonstrates how to set/clear many relays based on the current time.  I use this code in all of my PLC projects and it is 100% reliable.

http://www.tri-plc.com/trilogi/RTCAppByGDK.zip

Gary D.