PLCTrain learning guide / Simulation examples
XIC vs XIO.
Read the bit, not the name.
Both instructions ask a question about a bit. Neither tells you, by itself, whether a physical switch is open, a sensor is healthy, or a conveyor is moving.
XIC is true when its bit is 1. XIO is true when its bit is 0. Start with that rule, then work out what the tag means.
| Stored bit | XIC --] [-- | XIO --]/[-- |
|---|---|---|
| 0 / OFF | FALSE | TRUE |
| 1 / ON | TRUE | FALSE |
Read the name of the tag
For the Conveyor Rescue tag PE2_Blocked, 1 means the program reports a blocked receiving photoeye. An XIO using that tag asks for the opposite: a reported clear beam.
Say it in plain language
XIO PE2_Blocked
Is PE2_Blocked zero?
If yes, this condition is true. If the tag becomes 1, this condition becomes false.
Now imagine a different program with a tag named PE2_Clear. A 1 could represent the same clear space, but the appropriate test would be different. Read the tag definition and mapping; do not learn a rule that every photoeye needs XIO.
Why can XIO be green when the input is off?
Because zero is the value that makes XIO true. In PLCTrain, green shows instruction truth, not a general message that the equipment is good. XIC can be green for 1; XIO can be green for 0.
A true contact also needs a true path leading to it if it is to contribute to an energized output. A condition elsewhere in a series path can still prevent the rung from driving its output. Rockwell's XIO documentation separates the bit test from rung condition.
The symbol is not the physical wiring
XIC and XIO are program instructions examining stored data. The physical contact arrangement, sensor output mode, wiring, input mapping, and any active force determine what data reaches the program. The same physical device can be examined by different instructions for different purposes.
Try explaining this before touching the controls
The receiving section looks empty, but PE2_Blocked reads 1. The XIO using that tag is false. Is the XIO doing its job?
Show the reasoning
Yes. XIO should be false for a bit value of 1. The unanswered question is why the tag reports blocked: compare the space, physical sensor input, mapping, and any override before changing a correctly behaving instruction.
In the demo, watch the named input and rung while you repeat the same test. Being able to explain the change matters more than memorizing which symbol looks open or closed.
Read the source, too.
The examples above describe PLCTrain. These manufacturer references explain the underlying concepts; they are not endorsements of PLCTrain.