Sign in to follow this  
Followers 0
servicer22

Programming Techniques

8 posts in this topic

Hi Gents, Would like opinions from the pros here!! I started working for my current employer 4 months ago. They are 2 years new to PLC type automation. (opposed to pneumatics logic, pfft). They used an outside contractor for servo, devicenet, plc, and HMI. (all AB) After 18 years in field service, I have never seen sequencial logic to write entire machine code. Such as MOVE, EQUAL, GRTHAN, LESSTHAN etc. I mean the ENTIRE code!!! Now, I am a simple service guy. I walk, sometimes stumble, through code. I can run thru simple inputs with ANDs , ORs to an output. Have I been in a cave, or is this contractor the neandertol? TIA Greg

Share this post


Link to post
Share on other sites
Well… If all you were exposed to for the last 18 years, was relay (or Air) logic. Yes, PLC have come a long way baby. With the use of the new HMIs and Networking the higher functions of the PLCs are needed. You do not need to live in a cave to have technology pass you by. Just stand still for a few seconds and bang.

Share this post


Link to post
Share on other sites
I agree with Budman, HMI's are passing me by here but not PLC's. A good source to start reading could be Automationdirect's web site. They have online manuals for there range of PLC's. While there are slight language changes between manufactures, the basics are really similar. Good Luck and welcome to the forum.

Share this post


Link to post
Share on other sites
[color=#FF6666]I started working for my current employer 4 months ago. They are 2 years new to PLC type automation Please read again. I aint new to it, my employer is. I personally can write simple code in RSLogix, Omron, Tele(twido), Modicon, medoc, to name a few. Again, no programmer, just a service guy. Thank you for the welcome!! I hope to be a source of input ( puns?) here at some point. All other comments regarding programming style are welcome. Best Regards Greg

Share this post


Link to post
Share on other sites
There are as many ways to write code as there are programmers. Not right or wrong ways just different ways. The only agreement you will find is documentation. The more the better.

Share this post


Link to post
Share on other sites
Everyone has there own style. I think Dr. Jack Hughes describes the methods pretty clearly in his free PDF book. Download it here: http://forums.mrplc.com/index.php?autocom=downloads&showfile=156 Take a look at the sample code in the downloads section. I use to use the BIT and LATCH method. Where the rung above would latch a condition, and the rung below would unlatch the rung above it. This is how I controlled a sequence of events. As I progressed into HMI's heavily, I liked doing animations and changed to step based with an integer. This is an example of the OLD way I use to program: http://forums.mrplc.com/index.php?autocom=downloads&showfile=351 So I came up with using an integer based sequence, where each sequence or action on the machine has it's own step logic. I increase the number by 10, like step 10,20,30,40. Then at each step, I verify an input before I step to the next output condition. I use this integer to drive my logic downward in sequence by using equals, and also use that same integer to drive animations on the HMI screen, and well as troubleshoot. If a sequence is at step 20, I write a multi state HMI in the panel view, that says, STEP 20, looking for PRX4500 to come on. So maintence can see that input PRX4500 did not come on because it got stuck at step 20. I skip every 10 numbers because if I need to stick a sequence in the middle of 20 and 30, then I create a new step called step 21...it allows for expansion. See screen shot.

Share this post


Link to post
Share on other sites
I like the integer style also. I was told one time that there would be a scan pentality for using it over Latch style but when I tested it I did not see longer scans. Have anyone seen a scan time difference between the 2 styles?

Share this post


Link to post
Share on other sites
chakorules, You nailed it. Thats exactly what I was referring to. First time kinda throws ya back, after taking it in I see it as stepping, oddly enuf by 10's as well. I guess new aint all that bad. (still like the bit n latch tho) hehe

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0