Venu, The timing for this sequence can easily be created in a CALC or even LOGIC block using the DON function. We use similar timing logic to provide variable duty cycle (on/off) for tank agitators. This is a simple "latching" function and can be expanded upon as needed. '; * Timed Cycle Control * 'IN BI02 ; Valve 2 Open 'DON M02 ; Valve 2 Time 'NOT ; 'IN BI01 ; Valve 1 Open 'DON M01 ; Valve 1 Time 'OR BO02 ; Valve 2 Output 'AND 2 ; & /Valve 2 Time 'OUT BO02 ; := Valve 2 Output 'NOT ; 'OUT BO01 ; Valve 1 Output You may also want to provide some Process Interlocking to the actual physical device outputs. That is, use other lower level logic to prevent turning on either valves physical output until the other valve is closed. If you use GDEV blocks for the actual valve device control you can provide feedback from this process interlocking through the DSR_RB input. If both valves are on the same FBM and you use ladder logic this works well for process interlocking with feedback to the DSR_RB via an OFL. Otherwise this same logic could be done in a another (or even the same) LOGIC or CALC block. Tom Badura Plastics Engineering Company tbadura@xxxxxxxxxx -----Original Message----- Hi there wanted to ask you all an easy one, I want to open valve 1 for 30 minutes and make sure that valve 2 is closed during that time and close valve 1 after 30 minutes and open back valve 2 and hold it for 30 minutes and the process repeats , its interlocking + timing . please share your thoughts . Thanks Venu -----Original Message----- From: foxboro-bounce@xxxxxxxxxxxxx [mailto:foxboro-bounce@xxxxxxxxxxxxx] On Behalf Of QUEIROLO OLIVERA, IGNACIO ESTEBAN Sent: Thursday, February 25, 2010 10:19 AM To: foxboro@xxxxxxxxxxxxx Subject: Re: [foxboro] Simple Timer/Counter David, To handle the cross midnight I would add some lines to your code: -CALCA code snippet- STEP01 = IN BI01 ;VALVE TOLD TO OPEN STEP02 = OSP ; STEP03 = BIF 10 ; STEP04 = NOP ;IF WE ARE HERE WE JUST GOT A STEP05 = NOP ;START REQUEST STEP06 = TIM ;GET SECONDS SINCE MIDNIGHT STEP07 = STM M01 ;STORE IT STEP08 = GTO 50 STEP09 = STEP10 = IN BI02 ;VALVE MADE LIMIT STEP11 = OSP ; STEP12 = BIF 50 ; STEP13 = NOP ;IF WE ARE HERE WE JUST MADE THE STEP14 = NOP ;OPEN LIMIT STEP15 = TIM ;GET CURRENT TIME (SECS > MIDNIGH STEP16 = STM M02 ;STORE IT STEP17 = LAC M01 ;START TIME STEP18 = SUB M02 ; STEP19 = BIN 22 ; STEP20 = OUT RO01;TIME TO OPEN STEP21 = GTO 50 ; STEP22 = LAC M03 ;86400 (SECONDS IN ONE DAY) STEP23 = SUB M01 ; STEP24 = ADD M02 ; STEP25 = OUT RO01; -ACCUM params to modify- MEAS C:B1.P -the valve open command boolean should be 1 when we want to time- MTRFAC 0.5 -based on the BPC and the blocks period and phase- CLEAR C:B1.P -the valve open command boolean transition to 1 will clear the previous time- HOLD C:B2.P -the valve limit, a 1 will hold the value. M03 86400 -seconds in one day What do you think? Regards, Ignacio _______________________________________________________________________ This mailing list is neither sponsored nor endorsed by Invensys Process Systems (formerly The Foxboro Company). Use the info you obtain here at your own risks. Read http://www.thecassandraproject.org/disclaimer.html foxboro mailing list: //www.freelists.org/list/foxboro to subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join to unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave __________ Information from ESET NOD32 Antivirus, version of virus signature database 4895 (20100225) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 4896 (20100225) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 4896 (20100225) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com _______________________________________________________________________ This mailing list is neither sponsored nor endorsed by Invensys Process Systems (formerly The Foxboro Company). Use the info you obtain here at your own risks. Read http://www.thecassandraproject.org/disclaimer.html foxboro mailing list: //www.freelists.org/list/foxboro to subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join to unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave _______________________________________________________________________ This mailing list is neither sponsored nor endorsed by Invensys Process Systems (formerly The Foxboro Company). Use the info you obtain here at your own risks. Read http://www.thecassandraproject.org/disclaimer.html foxboro mailing list: //www.freelists.org/list/foxboro to subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join to unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave