a simple question

plc-learner

Member
Join Date
Jul 2009
Location
Thornbury
Posts
3
What instruction do i use? XIC or XIO

When a limit switch is closed, it triggers an instruction ON. The input filed device is a limit switch that stores a 1 in a data table bit when closed?
 
What instruction do i use? XIC or XIO

When a limit switch is closed, it triggers an instruction ON. The input filed device is a limit switch that stores a 1 in a data table bit when closed?

Since you are using the Allen Bradley XIO/XIC terminology, I will assume you are talking about an AB PLC. (Assumptions can be dangerous)
If you are using a Normally Open Limit Switch, and it is closed by an event in the field. It is not triggering any instruction. If there is sufficient voltage at the Input screw to cause the Input to turn on. A one will be placed in the Input Table location associated with that Input on the next I/O Update (Normally this is done at the end of the Program Scan, however, some PLCs update there I/O Tables asynchronously). The PLC has no idea if it a Limit Switch, Photo-Eye, or Push Button, nor does it care. It only knows there is a 1 in that location.
Whether you use an XIC (Examine if Closed) or XIO (Examine if Open) depends on what you want your PLC Code to do. If you want the Limit Switch to trigger an action, you would normally use an XIC (i.e. Turn on a Pilot Light). If you want it to stop an action, you would normally use an XIO (i.e. Stop a Carriage).
That is a decision that has to be made based on knowledge of the machine operation and desired results. i.e. A Normally Closed Limit Switch would be better if you don't want a Carriage to run off it's track. This would impact the use of an XIC or XIO in the program. Of course the arm could fall off the Limit Switch, but we do what we can.;)

Hope that helps.

Stu......
 
Last edited:
If you are familiar with the operation of relays, ths original basis of ladder logic, then it is simple to look at the XIC and XIO as normally open -| |- or normally closed -|\|- contacts. This corresponds to the symbol in the ladder logic.

The PLC input point is treated in ladder logic as if it were a relay coil. When voltage is applied to the input from a filed device then all contacts in the program change state - i.e. normally open contacts close and conduct, normally closed contacts open. This mimics relay operation.
 
Our colleague on this board Ron Beaufort has created some sample lessons on his website that aid in understanding what XIC and XIO do.

Go to http://www.ronbeaufort.com/ and click sample lessons on the left hand side. Lessons 1 and 9 (and probably the others) will cover your question.


A PLC I/O addresses such as I:01/00 is a memory location, not a device. XIC looks to see if the bit at a memory location is a 1. XIO looks to see if the bit at a memory location is 0. The actual value of the bit is dependent on the last operation to write to that bit. That operation could be another program instruction executed earlier or for an IO address it also could be when the processor last copied the status of the physical inputs to the IO image table. When and how IO image table updates happen depends on the model of PLC you are using.
 

Similar Topics

Hello again..trying something on an existing poorly written program and just wanted to double check something system is an A-B MicroLogix 1200 In...
Replies
5
Views
165
Hi all, Writng a FB in ST on Beckhoff TC for a pulser which turns on and off on a cycle, is paused by turning bControlInput to FALSE, but resumes...
Replies
6
Views
248
Hi all, I have a simple question that I have overcomplicated and gotten stuck on. I have a variable, we can call it "light" that I need to stay...
Replies
4
Views
309
Been working with PLCs for a couple of decades, but almost 100% DirectLogic. Have a customer who wanted me to make a couple of simple changes to a...
Replies
3
Views
1,121
Will going online with a modicon controller in Proworx 32 write to the controller? I have a backup of the program open and would like to go...
Replies
5
Views
2,156
Back
Top Bottom