Announcement

Collapse
No announcement yet.

Click PLC Input Configuration "immediate" Input selection Explained

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

  • Click PLC Input Configuration "immediate" Input selection Explained

    Wondering if someone can elaborate on this just for a moment. What exactly does the "immediate" selection on an X Input Bit do? I would like a like more of an explanation than what the help button gives. Thanks.

  • #2
    Normally the PLC scan cycle works as follows:

    Physical inputs are scanned and stored in a table
    Logic is processed
    Physical outputs are updated

    If an input occurs after the input scan takes place, it will not be seen by the logic until the next scan cycle. An immediate selection will examine the input at that time the contact is processed.
    Last edited by Adisharr; 01-14-2020, 01:12 PM.

    Comment


    • #3
      'Immediate' forces the CLICK to re-examine the state of the input at the time it is examine in the scan.
      Normally, the CLICK examines the input states at the beginning of the program scan.

      Please understand that if you do use 'immediate' you may notice discrepancies between the input state at the start of a scan and the input state when the 'immediate' instruction re-examines the input.

      With long-enough scan time, the states of C1, C2 and C3 could be different- depending on the state of X001 at the time the 'Immediate' instruction is examined.
      This could possibly be tested with some scan-time-eating FOR LOOPs.

      Code:
      .
      .            X001                                      C1
      .------------]I[---------------------------------------(S)
      .
      .
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      .
      .            X001                                      C2
      .------------]I[---------------------------------------(S)
      .
      .
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      .
      .            X001                                      C3
      .------------]I[---------------------------------------(S)
      .
      .

      Comment


      • #4
        In many cases an immediate doesn't update the image of the inputs. A standard reference later in the scan may not return the same as the immediate.
        thePLCguy

        Bernie

        Comment


        • #5
          Thanks Bernie.
          I removed a statement (before posting) about whether the 'image' was updated or if the instruction only updated its evaluation if the input.
          Maybe, I will have time to devise a test--or someone can confirm how CLICK handles this.

          Comment


          • #6
            Originally posted by bcarlton View Post
            In many cases an immediate doesn't update the image of the inputs. A standard reference later in the scan may not return the same as the immediate.
            Good point, I'll correct my previous post about that thanks!

            Comment


            • #7
              I made a short test for this. (attached images)
              Basically scan-loading the cpu using ForLoops
              Mixed in the loops, I have normal and Immediate NO contacts looking at X1 and a SET out for each test.
              I let the results autoreset after 2 seconds.
              The math in the MATH instruction is simply there to eat CPU time.

              I have seen various states of the C bits - based on striking a wire (attached to X1) across a +24V conductor. I didn't think that my activation of a pushbutton would be fast enough.
              I did not observe a change in the XD0 in dataview. (ref Bernie;'s post)

              Caveat: this may NOT be an complete test for this. It is just what I came up with in a short time.
              Attached Files

              Comment


              • #8
                CEstherDurham Thanks for the great question!


                AD forum wasting 120 seconds of my life so I can make a follow-up post!

                Comment


                • #9
                  Thanks for the responses. Basically I had a switch mounted on an air cylinder, I wanted the switch to turn off a solenoid when the plunger went past it. It was doing it so fast that sometimes it would catch it and other times it would not. I didn't want to spend the money to buy a click with a high speed input as I already had this PLC. I looked at using a different prox switch and a larger target which would work, however, I happened to notice the immediate box when I was changing the program so I checked it and it started picking it up. I guess it might kinda of work like a high speed input, but not exactly.obviously would not work for pulses.

                  Any way, thanks for everything.

                  Comment


                  • #10
                    Originally posted by CEstherDurham View Post
                    Thanks for the responses. Basically I had a switch mounted on an air cylinder, I wanted the switch to turn off a solenoid when the plunger went past it. It was doing it so fast that sometimes it would catch it and other times it would not. I didn't want to spend the money to buy a click with a high speed input as I already had this PLC. I looked at using a different prox switch and a larger target which would work, however, I happened to notice the immediate box when I was changing the program so I checked it and it started picking it up. I guess it might kinda of work like a high speed input, but not exactly.obviously would not work for pulses.

                    Any way, thanks for everything.
                    You may be able to use the CPU-module inputs for a 'high-speed' interrupt input.
                    Depending on your software version, you may use the "Setup->CPU Built-in I/O Setup" or the "Setup-> High Speed Input" to configure the inputs to trigger an interrupt subprogram or even a pulse-catch operation..
                    If you go with the interrupt method, be sure to keep the interrupt subprogram as short as possible.

                    Comment


                    • #11
                      Originally posted by bcarlton View Post
                      In many cases an immediate doesn't update the image of the inputs. A standard reference later in the scan may not return the same as the immediate.
                      Ah, I hadn't considered this before. I imagine this be something that each PLC would/could handle differently with good reason for each.

                      Originally posted by kewakl View Post
                      ...Basically scan-loading the cpu using ForLoops...
                      Tried and true! I think we've been here before, hmm?

                      Comment

                      Working...
                      X