Jump to content

Recommended Posts

Posted
Hi, I am new to the world of electronics and I am a Electrical Engineering Technologies student. This semester we have been introduced to the PLC. Last semester we studied the fundamentals of motor control and we created relay ladder logic diagrams and simulated them on a Amatrol test board. I have the LogixPro 500 CD simulator I understand the basic principles of the logic gates and how they are used with the PLC. What I am having trouble with early on is how to write the code that changes the output bits status on different rungs. I will give an example of a problem I am trying to solve in the lab manual. Stage I It is a push to start/push to stop circuit. A single NO pushbutton (I:1/0) performs the start and stop functions. The first time you press the PB, the instruction B3:0/11 is latched, energizing the light output O:2/0. The second time you press the PB , instruction B3:0/12 unlatches the instruction B3:0/11, de-energizing output 0:2/0. Instruction B3:0/10 prevents interaction between B3:0/12 and B3:0/11. I was successful with the first stage. Stage II The second stage calls for a modification of stage I to control light from four locations using 2 NO PB's (I:1/0 & I:1/1) and 2 NC PB's (1:1/2 & I:1/3) It calls for the light to change state when any one of the four PB's are pressed. I tried every combination of additional internal binary bits and placing different combination of PB's in parallel and in series and I was unsuccessful so I tried to write it with latching/unlatching instructions and was stumped) I received the attached code from the instructor and it did not work either. I am at a bit of a disadvantage because of an auto accident I am unable to attend the lectures or labs but am trying to follow along with listening to the lecture files. If only there were a output de-energize instruction then life would be great. Most of the problems are in a word format, I have tried to build a logics tree and develop Boolean statements. I can create a flowchart but that does not seem to help me write the PLC ladder logic. Some additional questions: 1) Can different rungs conflict with one another? in other words when one rung condition sets an output bit based on either a true or false condition to a 1 or 0 then when the following rung sets and the same output instruction based on its condition to the opposite then which one will the processor follow? 2) When reading through a word problem, what is the best approach to solving? a) build a flowchart, b) build a logic gate diagram, c) write a Boolean expression or c) start creating the ladder logic program and alter as needed? I am attaching both Stages as a picture file and as a LogixPro file. If anyone has an idea on how to solve stage II I would appreciate but even more importantly I am trying to understand how to cycle certain outputs such as motors in forward and reverse or sets of lights responding to various inputs. One of the forums I read stated that it was helpful to him to review other peoples code files and dissect them to see how they work so if anyone is willing to share a ladder logic program that is compatible with LogixPro 500 simulator I would really appreciate it! Thanks, Tru The second image file of stage 2 was to large to send with this forum post, I will reply with the post and attach it then if it will be helpful. 6-21(a).rsl 6-21(b).rsl 6-21b Latch test.rsl 6-21a.bmp 6-21b.bmp

Posted
your two problems are identical, the only difference is that in second you have multiple inputs. all you need to do is create new signal (bit) that is on when any of the 4 switches are pressed, then use that as input to your first stage problem. there is something called scan (one execution of program), but plc keeps on scanning program continuously. this means that there is a possibility of issues such booty race conditions, duplicate coils etc. therefore programmer must be aware of pitfalls and wok around them and - test the code. before you get to a zen level ten and just dive into code writing, you may want to plan things out using block diagrams / flow charts to break down problem in smaller more managable tasks.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...