LogixPro Relay Logic Exercise 1

tpalmer0127

Member
Join Date
Aug 2015
Location
Pennsylvania
Posts
5
I've recently downloaded the trial version of LogixPro simulator and I'm starting to work through the exercises. I have a question on the Relay Logic exercise. Since I only have the trial version, I can't save the .rsl file, but have attached a .jpg screen capture of the rungs.

I think that either switch I:1/2 or I:1/4 should light the Output O:2/2. However, only I:1/4 lights the Output.

Am I missing something ?

Thanks,
Terry

RelayLogicQ.jpg
 
Assuming you have not read posts in this forum that address your problem, you probably should not use the same output address twice.

It results in the last one scanned by the PLC to be the one that wins.

You would use a parallel branch such that EITHER I:1/2 OR I:1/4 can turn on the single O:2/2.

Code:
--[ I:1/4 ]------+----------( O:2/2 )
                 |
--[ I:1/2 ]------+
 
Last edited:
Thanks for the reply. I did search for comments on that exercise and didn't find anything that applied. I appreciate your help. I thought it must be something simple.

Terry
 
Welcome to the forum!

Just to give you some background into why dan's method works and yours doesn't - remember that the PLC runs code one line at a time, and does exactly what each line says. At no point does the PLC encounter some code and say "yeah but something else turned this on before so that's OK". Once the PLC has run it's code all the way to the end, it will then turn on and off it's physical outputs according to the state of the outputs at the end of the scan.
(disclaimer: this is not a 100% hard and fast rule, there are other processors that operate differently, but for your purposes this is how you should look at and understand it)

So in your example, the following scenarios could occur:

- If I:1/2 AND I:1/4 are both ON, rung 000 says "turn on O:2/2". Then rung 001 says "turn on O:2/2". At the end of the scan, O2:2 is on, so the physical output gets turned on.
- If I:1/2 AND I:1/4 are both OFF, rung 000 says "turn off O:2/2". Then rung 001 says "turn off O:2/2". At the end of the scan, O2:2 is off, so the physical output gets turned off.
- If I:1/2 is OFF and I:1/4 is ON, rung 000 says "turn off O:2/2". Then rung 001 says "turn on O:2/2". At the end of the scan, O2:2 is on, so the physical output gets turned on.

You can see where this is going.

- If I:1/2 is ON and I:1/4 is OFF, rung 000 says "turn on O:2/2". Then rung 001 says "turn off O:2/2". At the end of the scan, O2:2 is of, so the physical output gets turned off.

If you did program like this in the real world, it's basically a case of "last rung wins". But it can cause a whole lot of problems if you have other logic in between those rungs examining the state of that output!

As dan says, as a general rule, you should only ever use a destructive instruction on a binary element once.

(destructive: an instruction that can change the state of the bit, like OTE, OTL, OTU, but not XIC, XIO)
 

Similar Topics

SELECTED NEW FILE SELECTED PROCESSOR TYPE SELECTED I/O CONFIGURATIONS IM UNABLE TO CONFIGURE MY I/O’S. I HAVE A PAPER COPY OF A PROGRAM AND I...
Replies
0
Views
81
Good morning, I am currently working on the LogixPro Advanced Batch #2 Multiple Mode of Operation and got stuck very close to completion. Link...
Replies
3
Views
2,234
Hi folks, i'm pretty much new on this topic and i need some help with the dual compressor part 3 and 4, currently working on part 3 i cant make...
Replies
20
Views
5,109
Hi, I'm using LogixPro Simulator, and I'm experimenting with BSL. I know how BSL works, but what I am trying to do is access the value of an...
Replies
3
Views
1,397
Hello Gurus, I am working on the elevator exercise of LogixPro and my output on the subroutine is being energized without its flag being called...
Replies
4
Views
2,204
Back
Top Bottom