########################################################################
### Assume PLC has been off for at least 12h: set 12h counter to 12
First Pass
S:1/15 ______________
----] [-----------[MOV ]----
[Source 12]
[Dest ct12h]
--------------
########################################################################
### Modify Rung 0000 from post #0: OR ct12h comparison with T4:50.DN (in blue)
T4:23 I:1 I:0 B3:3 I:0 T4:50 O:0
---] [-----] [----+----] [----+----] [----+---] [---+---+---] [---------------------+-----( )---
DN 1059 | 8 | 10 | 4 | | DN | 0
| | | | | |
| B3:7 | | B3:6 | [COLOR=Blue][B]| I:0 ______________ |[/B][/COLOR]
+----] [----+ +---] [---+ [COLOR=blue][B]+---] [---[LES ]--+[/B][/COLOR]
4 8 [COLOR=Blue][B] 4 [SourceA ct12h][/B][/COLOR]
[COLOR=blue][B][SourceB 12][/B][/COLOR]
[COLOR=blue][B] --------------[/B][/COLOR]
########################################################################
### No change to Rung 0001 from post #0
I:0 ______________
---] [-----------------[TON ]--(EN)--
4 [Timer T4:50]
[Time Base 1.0]--(DN)--
[Preset 120]
--------------
########################################################################
### Start a 1h (=3600s), repeating, self-sealing, timer [TON1h] when
### - ct12h is 0
### AND
### - T4:50 is done
### Repeat until 12h have elapsed
T4:50 ______________ ______________ TON1h ________________
---+----] [-------[EQ ]-------+--[LES ]------]/[------[TON ]--(EN)--
| DN [SourceA ct12h] | [SourceA ct12h] DN [Timer TON1h]
| [SourceB 0] | [SourceB 12] [Time base 1.0]--(DN)--
| -------------- | -------------- [Preset 3600]
| ______________ ______________ | ----------------
+-[GRT ]--[LES ]--+
| [SourceA ct12h] [SourceA ct12h] |
| [SourceB 0] [SourceB 12] |
| -------------- -------------- |
| |
| TON1h |
+----] [------------------------------+
DN
########################################################################
### When [T1h.DN] becomes 1, increment ct12h up to 12
______________ TON1h ______________
----[LES ]----------] [--------[ADD ]--------------
[SourceA ct12h] DN [SourceA ct12h]
[SourceB 12] [SourceB 1]
-------------- [Dest ct12h]
--------------
########################################################################
### Restart 12h counter, from 12, when 2minute delay (T4:50] is done
T4:50 ______________ _____________
--------] [-------[EQ ]----------[MOV ]---
DN [SourceA ct12h] [Source 0]
[SourceB 12] [Dest ct12h]
-------------- -------------
...
########################################################################
### Start a 1h (=3600s), repeating, self-sealing, timer [TON1h] when
### - ct12h is 0
### AND
### - T4:50 is done
### Repeat until 12h have elapsed
T4:50 ______________ ______________ TON1h ________________
---+----] [-------[EQ ]-------+--[LES ]------]/[------[TON ]--(EN)--
| DN [SourceA ct12h] | [SourceA ct12h] DN [Timer TON1h]
| [SourceB 0] | [SourceB 12] [Time base 1.0]--(DN)--
| -------------- | -------------- [Preset 3600]
[B][COLOR=Blue] | ______________ | [/COLOR][/B] ----------------[B][COLOR=Blue]
+-[GRT ]--------------------+
| [SourceA ct12h] |
| [SourceB 0] |
| -------------- |[/COLOR][/B]
| |
| TON1h |
+----] [------------------------------+
TT
...
########################################################################
### Start a 1h (=3600s), repeating, self-sealing, timer [TON1h] when
### - ct12h is 0
### AND
### - T4:50 is done
### Repeat until 12h have elapsed
T4:50 ______________ ______________ TON1h ________________
---+----] [-------[EQ ]-------+--[LES ]------]/[------[TON ]--(EN)--
| DN [SourceA ct12h] | [SourceA ct12h] DN [Timer TON1h]
| [SourceB 0] | [SourceB 12] [Time base 1.0]--(DN)--
| -------------- | -------------- [Preset 3600]
| ______________ ______________ | ----------------
+-[GRT ]--[LES ]--+
| [SourceA ct12h] [SourceA ct12h] |
| [SourceB 0] [SourceB 12] |
| -------------- -------------- |
| |
[COLOR=Blue][B] | TON1h |[/B][/COLOR]
[B][COLOR=Blue] +----] [------------------------------+
TT[/COLOR][/B]
...
########################################################################
### Assume PLC has been off for at least 12h: set 12h counter to 12
### - This should force two-minute delay on next time I:0/4 is 1
### - N.B. can MOV write to counter Control .ACCumulator element?
### - If not, replace this [First Scan] rung with a RESet and a
### loop to increment CTL12.ACC to 12 manually
First Scan
S:1/15 __________________
----] [-----------[MOV ]----
[Source 12]
[Dest CTL12.ACC]
-----------------
########################################################################
### Modify Rung 0000 from post #0:
### - Add OR branch [XIC I:0/4 XIO CTL12.DN] to T4:50.DN
### - This will bypass delay for 12h since last delay rising edge
T4:23 I:1 I:0 B3:3 I:0 T4:50 O:0
---] [-----] [----+----] [----+----] [----+---] [---+---+---] [-----------+-----( )---
DN 1059 | 8 | 10 | 4 | | DN | 0
| | | | | |
| B3:7 | | B3:6 | | I:0 CTL12 |
+----] [----+ +---] [---+ +---] [-----]/[---+
4 8 4 DN
########################################################################
### Two-minute delay of [I:0/4]; no change to Rung 0001 from post #0
I:0 ______________
---] [-----------------[TON ]--(EN)--
4 [Timer T4:50]
[Time Base 1.0]--(DN)--
[Preset 120]
--------------
########################################################################
### Save one-shot rising edge of 2-minute delay done bit
T4:50 _____________________
--------] [-------[OSR ]------
DN [Storage bit B?:?/?]
[Output bit DelayOSR]
---------------------
########################################################################
### Start a 1h (=3600s), repeating, self-sealing, timer [TON1h] on
### - [XIC DelayOSR EQU CTL12.ACC 0] => first delay after CTL12 reset
### - [XIC TON1h.TT] seals-in running timer to complete first 1h cycle
### - [GRT CTL12.ACC 0] start repeat each of next 11 cycles
### - [XIO TON1h.DN] resets timer at end of each cycle
### - [XIO CTL12.DN] stops repeat after 12th cycle
### - TON1h.DN rising edge will increment CTL12.ACC
### - N.B. [EQU CTL12.ACC 0] may not be necessary
DelayOSR __________________ TON1h CTL12 ________________
---+----] [-------[EQU ]---+----]/[---------]/[------[TON ]--(EN)--
| [SourceA CTL12.ACC] | DN DN [Timer TON1h]
| [SourceB 0] | [Time base 1.0]--(DN)--
| ------------------ | [Preset 3600]
| | ----------------
| TON1h |
+----] [------------------------------+
| TT |
| |
| __________________ |
+---[GRT ]--------------+
[SourceA CTL12.ACC]
[SourceB 0]
------------------
########################################################################
### [TON1h.DN] rising edge increments counter up to 12 (CTL12.ACC),
### indicating approximately 12h have passed since last delay OSR
TON1h ______________
------] [--------[CTU ]---(CU)---
DN [Counter CTL12]
[Preset 12]---(DN)---
[Accum 0]
--------------
########################################################################
### Reset CTL12 counter, when complete & delay has rising edge
CTL12 DelayOSR CTL12
--------] [-------] [---------------[RES]------
DN
Assuming you can be off a second or two in you 12 hour time. You could set up a timer that had a preset of 3600 (1 hour) count the done bits and when you get to 12, enable your other logic. Afterwards reset timer and the count.
This. KISS
########################################################################
### Assume PLC has been off for at least 12h: set 12h counter to 12
### - This should force two-minute delay on next time I:0/4 is 1
### - N.B. can MOV write to counter Control .ACCumulator element?
### - If not, replace this [First Scan] rung with a RESet and a
### loop to increment CTL12.ACC to 12 manually
First Scan
S:1/15 __________________
----] [-----------[MOV ]----
[Source 12]
[Dest CTL12.ACC]
-----------------
########################################################################
### Modify Rung 0000 from post #0:
### - Add OR branch [XIC I:0/4 XIO CTL12.DN] to T4:50.DN
### - This will bypass delay for 12h since last delay rising edge
T4:23 I:1 I:0 B3:3 I:0 T4:50 O:0
---] [-----] [----+----] [----+----] [----+---] [---+---+---] [--------------+-----( )---
DN 1059 | 8 | 10 | 4 | | DN | 0
| | | | | |
| B3:7 | | B3:6 | | I:0 CTL12 |
+----] [----+ +---] [---+ +---] [--+---]/[---+-+
4 8 4 | DN |
[COLOR=Blue][B]| |
| O:0 |
+---] [---+
0
[/B][/COLOR]
########################################################################
### Two-minute delay of [I:0/4]; no change to Rung 0001 from post #0
I:0 ______________
---] [-----------------[TON ]--(EN)--
4 [Timer T4:50]
[Time Base 1.0]--(DN)--
[Preset 120]
--------------
########################################################################
### Save one-shot rising edge of 2-minute delay done bit
T4:50 _____________________
--------] [-------[OSR ]------
DN [Storage bit B?:?/?]
[Output bit DelayOSR]
---------------------
########################################################################
### Reset CTL12 counter, when complete & delay has rising edge
CTL12 DelayOSR CTL12
--------] [-------] [---------------[RES]------
DN
########################################################################
### Start a 1h (=3600s), repeating, self-sealing, timer [TON1h]
### - [XIC DelayOSR EQU CTL12.ACC 0] => first delay after CTL12 reset
### - [XIC TON1h.TT] seals-in running timer to complete first 1h cycle
### - [GRT CTL12.ACC 0] start repeat each of next 11 cycles
### - [XIO TON1h.DN] resets timer at end of each cycle
### - [XIO CTL12.DN] stops repeat after 12th cycle
### - TON1h.DN rising edge will increment CTL12.ACC
### - N.B. [EQU CTL12.ACC 0] on first branch may not be necessary
DelayOSR __________________ TON1h CTL12 ________________
---+----] [-------[EQU ]---+----]/[---------]/[------[TON ]--(EN)--
| [SourceA CTL12.ACC] | DN DN [Timer TON1h]
| [SourceB 0] | [Time base 1.0]--(DN)--
| ------------------ | [Preset 3600]
| | ----------------
| TON1h |
+----] [------------------------------+
| TT |
| |
| __________________ |
+---[GRT ]--------------+
[SourceA CTL12.ACC]
[SourceB 0]
------------------
########################################################################
### [TON1h.DN] rising edge increments counter up to 12 (CTL12.ACC),
### indicating approximately 12h have passed since last delay OSR
TON1h ______________
------] [--------[CTU ]---(CU)---
DN [Counter CTL12]
[Preset 12]---(DN)---
[Accum 0]
--------------
########################################################################
### On first scan, unlatch Bypass Delay, which enables two-minute delay
First Scan
S:1/15 BypassDelay
----] [-----------(U)-----------
########################################################################
### Modify Rung 0000 from post #0:
### - Branch [XIC I:0/4 [XIC BypassDelay OR XIC O:0/0] around T4:50.DN
### - This will bypass delay for 12h since last delay rising edge
T4:23 I:1 I:0 B3:3 I:0 T4:50 O:0
---] [-----] [----+----] [----+----] [----+---] [---+---+---] [-----------------+-----( )---
DN 1059 | 8 | 10 | 4 | | DN | 0
| | | | | |
| B3:7 | | B3:6 | | I:0 BypassDelay |
+----] [----+ +---] [---+ +---] [--+----] [---+---+
4 8 4 | |
| O:0 |
+----] [---+
0
########################################################################
### Two-minute delay of [I:0/4]; no change to Rung 0001 from post #0
I:0 ______________
---] [-----------------[TON ]--(EN)--
4 [Timer T4:50]
[Time Base 1.0]--(DN)--
[Preset 120]
--------------
########################################################################
### When BypassDelay is off & delay has rising edge
### - Latch BypassDelay, which will bypass two-minute delay
### - Set the Fin12h value 12h hence, when BypassDelay will be unlatched
### - DlyStore ensures the above occurs on T4:50.DN rising edge only
T4:50 DlyStore BypassDelay BypassDelay
-------] [---+----]/[--------]/[-------+-------------(L)---------------------------+---
DN | | _________________ |
| +---[ADD ]---------------------+
| | [SourceA RTC:0.HR] |
| | [SourceB 12] |
| | [Dest Fin12h] |
| | ----------------- |
| | _______________ _______________ |
| +---[GRT ]---[SUB ]---+
| [SourceA Fin12h] [SourceA Fin12h] |
| [SourceB 23] [SourceB 24] |
| --------------- --------------- |
| |
| DlyStore |
+----( )--------------------------------------------------------------+
########################################################################
### Unlatch BypassDelay when ~12h have passed since last used delay
_________________ BypassDelay
---[EQU ]---------(U)------
[SourceA RTC:0.HR]
[SourceB Fin12h]
-----------------
... I am sure the transmitter is in the logic as an enable but I can't really tell because nothing is tagged in the logic.