No announcement yet.

DL 06 cycling

  • Filter
  • Time
  • Show
Clear All
new posts

  • DL 06 cycling

    Noob here again...

    I've got my code written, the plc linked to my pc with three analog inputs going into three different PID loops for time proportional control of some elements in a heating system. I'm tracking the value of my elements in the data window and everything looks to be behaving itself but the output contacts lights on the plc all click off together about every 10 seconds. I have some 10 sec timers (3ea) in my time proportion code, could they be causing it? Obviously, I don't want my pumps to be cycling on and off every 10 seconds. Any thoughts on what might be causing this?


  • #2
    Can you zip your files and post the zip file?



    • #3

      think I got that right.


      • #4
        OK, let's use the section controlling Y0 through Y3.

        Every 10 seconds, controlled by T0 in rung 7, you convert the value in V2005, labled as the output of a PID and ranging from 0 - 4095 I guess, into a BCD number ranging from 0 to 1000 in V2275.

        In rung 9 we have Timer T1 with V2275 as a Preset. So it will try to time from 0 to 100 seconds. BUT, every 10 seconds it is being reset by T0.

        In rung 10 the outputs are turned off if the accumulator of T0 is zero, which it will be for 1/10 of a second after being reset.

        So T1 will never get past 10 seconds - even if the math above comes up with 101 - 1000 as a value (10.1 to 100 seconds), it's being reset every 10 seconds.

        The other 3 instances are like this. So, what do you really want to do?

        [Edit - I realize you are trying to set up time proportioned outputs. But exactly what timing are you trying to achieve?]
        Last edited by bcarlton; 11-15-2013, 01:46 PM.



        • #5
          the system I'm trying to control is a geothermal heating system for radiant heat in two concrete slabs (two zones). There is an exterior closed loop circulating water/ethylene glycol out through the ground and another closed loop inside circulating hot water through two slabs and a storage tank. The heat pump/heat exchanger sits between the two loops. I have to control two exterior circulation pumps, two slab circulation pumps (one for each slab/zone), a storage tank circulation pump, and the geothermal heat pump (6 total outputs - all on/off).

          its a very slow system, with reaction times that are measured in minutes, not seconds. I want the slab temp PIDs (loops 2 & 3) to turn on the circulation pumps for their respective slab (zone) and I want the storage tank temp PID (loop 1) to control the two ground loop pumps, the tank circulation pump, and the geothermal heat pump. All of these will be powered by relays controlled by the plc.

          I guess I could set the period to 10 minutes? The TMR coil goes up to 16 minutes (9999 tenths of a second) but with three timers in series won't that keep the loops from reacting correctly to eliminate their respective errors?

          Perhaps I don't understand how the plc processes the RLL - it comes upon a timer and fires it, does it then continue to execute the rest of the rungs until it finds a rung calling on the timer in a true state (timed out)? Or does the plc hang on the rung until the timer is true?



          • #6
            To address your last question first the evaluation of the rungs moves from one to the next as quickly as possible. it doesn't stop and wait for a timer to complete before moving on to the next rung. If, while online and running, you view the 'scan time' you will see how long it takes to evaluate all the rungs and start again. Our processes are usually about 10 milliseconds (100 times per second). For our processes, and definitely for yours, this is fast enough to qualify as 'real time'.

            I can't advise you on the specifics of your application. But if a cycle time (the time from one turn on of pumps etc. to the next) would be appropriate at 100 seconds then you only need to make a few changes.

            In rungs 7, 11 and 15 change the presets of timers T0, T3 and T5 from K100 to K1000.

            This would mean that every 100 seconds the current output of each PID is used to set the ON time for the next 100 second period.

            And rung 18 has errors. I believe you meant to use T6 in this rung but the contact and the comparison are referencing T5. Just change them to T6 and TA6 in the two instructions.

            Good luck.



            • #7
              I've had pretty good luck in slow heating applications just using on/off control instead of PID. the logic You will need to have a long cycle to keep from short-cycling your pump anyway.


              • #8
                As I've played with it, I've found that you're both right. the TMR will go for 999 sec (16.7 min). If I make the period 10 minutes to start, it should work without cycling too much.

                I knew about the rung 18 issue, just hadn't gotten to it yet.

                Thanks for the help - I'll let you know how it comes out.


                • #9
                  Is there a way to step through the code line by line? haven't figured out how to do that yet.


                  • #10
                    Switch the PLC to 'PLC Test' mode. Investigate the various commands available including Start/Stop Scan, Single/Multiple Scans, Single Step, Breakpoint and Break Instructions. I haven't used this. I tend to perform these at my desk using my imagination. It works fairly well.

                    Realize that interrupting the scan will disturb timed sequences.