
adccommunitymod (AutomationDirect) asked a question.
Click PLC Input Configuration "immediate" Input selection Explained
Created Date: January 14,2020
Created By: CEstherDurham
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
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.
Created Date: January 14,2020
Created by: CEstherDurham
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.
Created Date: January 14,2020
Created by: Adisharr
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.
Created Date: January 14,2020
Created by: kewakl
'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.
.
. X001 C1
.------------]I
. X001 C2
.------------]I
.
.
~~~~~~~~~~~~~~~~~~~~~~~~~~~
.
. X001 C3
.------------]I
.
.
Created Date: January 14,2020
Created by: bcarlton
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.
Created Date: January 14,2020
Created by: kewakl
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.
Created Date: January 14,2020
Created by: Adisharr
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!
Created Date: January 14,2020
Created by: kewakl
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.
Created Date: January 14,2020
Created by: kewakl
CEstherDurham Thanks for the great question!
AD forum wasting 120 seconds of my life so I can make a follow-up post!:(:confused:
Created Date: January 15,2020
Created by: CEstherDurham
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.
Created Date: January 15,2020
Created by: kewakl
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.