Announcement

Collapse
No announcement yet.

I am Brand new to PLC's trying to write a timing loop

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts


  • I am Brand new to PLC's trying to write a timing loop

    Hi Everyone,
    I work at a company with really old equipment they are trying to automate. I have worked a lot with CNC's and very competent with Electro/mechanical repairs. However I have nnever worked with PLC's and someone suggested from eng-tips that Click was a good choice for me, which I agree.

    What I am trying to do is write a simple timing sequence that when I close a contact two solenoids enter in a timing sequence until contact is opened again.
    I.E. X1 contact is closed, 2 seconds passes, solenoid 1 actuates for a 1/2second , another 2 seconds solenoid 2 actuates for a 1/2 second, then sol 1 then 2 etc until x1 is opened. Basically both solenoids are on 4 second cycles staggered evenly form each other. I can get a timer to work once, but how do I loop it.

    it is probably obvious, I will be researching all weekend on programming this.

    Thanks in advance


  • #2
    you need to break the rung the timer is on to reset the timing function

    Comment



    • #3
      Thanks for the quick response Scott, what do you mean break a rung? I have no experience at all with PLC's, this is my very first project. I am reading help section, but so far i can't find this particular function

      Comment



      • #4
        sorry about the terminology, but it's not in the help files.

        think of the rungs in RLL (relay ladder logic) like a set of schematics. Power flows from left to right. In wiring, you use physical contacts to make/break circuits...

        a light switch makes/breaks continuity to the light. In RLL, you would use contacts to turn on an output

        --l l-----------------( )

        making/breaking the logical continuity of the rung would manipulate the output (in this example, turning on the input would turn on the output)

        Comment



        • #5
          Here is one possibility. I interpreted your statement of timing as X1 closes, 2 second pass, then solenoid 1 actuates for 1/2 second, then 2 more seconds pass, then solenoid 2 activates for 1/2 second, then back to the start for as long as X1 is closed. The timing out of T4 resets all the timers to start over.

          This will stop the cycle as soon as X1 opens.
          Attached Files
          Last edited by bcarlton; 04-27-2016, 12:00 PM.
          thePLCguy

          Bernie

          Comment



          • #6
            thanks guys,
            Bernie, that's exactly what I meant. Once I learned the terminology and ladder flow the possibilities should open right up for me. I think it's like learning schematics from Germany vs japan vs USA, once it clicks, it will click.

            Comment



            • #7
              Consider using DS registers for presets in your timers so you can experiment with different timings without needing to make program changes.

              bernie may already have covered this - I don't know, I cannot open ckp files on my phone.

              EDIT:Bernie HAS No, he hasn't
              Last edited by kewakl; 05-05-2016, 04:55 AM.

              Comment



              • #8
                Thanks, this worked very well. You mentioned using DS registers to change timings without making program changes. I read through manual, and do not see a way to change the timer externally. I was originally thinking of using a BCD Thumwheel to set timing, but the Click does not speak BCD. So looking for ideas. I may end up using X1,X2,X3,X4 as individual programs which would give me 4 possible combinations to set. could the analog inputs be used as a timer input?

                Comment



                • #9
                  Do you have an HMI attached? Any external comms devices?
                  Bernie already took care of using a DS register value as the timer preset, all you need is a way to modify the DS register for specific timer(s)
                  What range of presets do you need? What resolution (mSec,Sec,Min,Hour?)
                  Last edited by kewakl; 05-05-2016, 04:56 AM. Reason: EDIT: Bernie did no use DS registers as timer presets.

                  Comment



                  • #10
                    Actually, the program I supplied had fixed times as presets not DS register references. RPosty, at the point in each timer where the preset is stated just type DSxx (a not already used DS register). That will provide the number of units selected. You may as well make all the units milliseconds to allow fine adjustments. Then just use an HMI to modify those chosen DS registers.
                    thePLCguy

                    Bernie

                    Comment



                    • #11
                      Originally posted by bcarlton View Post
                      Actually, the program I supplied had fixed times as presets not DS register references. RPosty, at the point in each timer where the preset is stated just type DSxx (a not already used DS register). That will provide the number of units selected. You may as well make all the units milliseconds to allow fine adjustments. Then just use an HMI to modify those chosen DS registers.
                      I went back and looked again. I don't know what happened when I opened your attachment earlier, but I thought that the timers had DS in the presets.
                      Maybe I mistook TDx as DSx. need stronger glasses?
                      tried to post an :embarrassed: smilie, but killed the site.. (AGAIN!)
                      Last edited by kewakl; 05-05-2016, 04:57 AM.

                      Comment



                      • #12
                        Originally posted by bcarlton View Post
                        Actually, the program I supplied had fixed times as presets not DS register references. RPosty, at the point in each timer where the preset is stated just type DSxx (a not already used DS register). That will provide the number of units selected. You may as well make all the units milliseconds to allow fine adjustments. Then just use an HMI to modify those chosen DS registers.
                        Rposty, for learning: If you do not have HMI or other comms device, use a dataview to change the DS registers.
                        In the Navigation Pane, Program Tab, look for the Monitor branch in the tree. Then find Data View. Right Click .. Add New Data View (CTRL+SHIFT+F3)
                        Rename as desired. In the new dataview Type in the first DS register ADDRESS for your timer preset. Then FillDown (by button click or CTRL+ENTER) if the DS registers are contiguous. CTRL+ENTER will work if you ENTER after the FIRST DS register then go back to THAT entry and CTRL+ENTER.

                        Comment



                        • #13
                          Thanks, I do not have an HMI, I am back today and attempting to figure out how to open and close an output (solenoid) based off a Voltage representation of the current. I have a Yaskawa drive which I was able to get to supply a DC output equivelant to it's Current I.E. at 1.25A I get an output of 1.25vdc. I want it to open and close contacts (Y003) at a .2 sec rate at 1.4V or above. I see in CPU I/O Setup where I can set up AD1V for 0-5vdc, but how do I use that input in Programming? I will search these forums, I may need to find a programming manual at some point, the user manual does not seem to cover programming in detail much.

                          Comment



                          • #14
                            If you have set up the analog input then you have assigned a register where it will place the representation of the input. Using a dataview watch the number in that register as the voltage output from the drive changes. There are compare commands which will let you compare two numbers. Use one of these to test if the input number I greater than the value at 1.4 volts. Let this turn on a bit. U0se the bit to enable a free running timer which cycles on and off. The output from this timer can be directed to your output.
                            thePLCguy

                            Bernie

                            Comment



                            • #15
                              In the hardware config, scaling.
                              Set min/max in and min/max out.
                              Select DFnn register.
                              In code compare --]=>[-- that DFnn register to 1.4.
                              Dont remember if click has 0.2sec sc bit. You may have to build a timer set to do that.

                              SC5 is 100 mS
                              Last edited by kewakl; 05-16-2016, 02:29 PM.

                              Comment

                              Working...
                              X