# Need some PLC programming training



## QMED (Sep 14, 2016)

I need a week or so of intentensive hands on training(no powerpoint) on AB and/or Siemens. My company is paying. CA or WA preferably.

I'm a maintenance guy so I need to be able to log in, find where a packing machine is getting held up, and troubleshoot the sensor or make a small change in the program(just an example).

The Siemens is all FB programming running TIA which is all foreign to me. We have various AB which is running RSlogix (?). All the AB stuff is programmed in LL which is way more in my wheelhouse, and we have a bunch more AB equipment on the way.

My googling is not turning up anything that looks worthwhile? Any recommendations? Advice?


----------



## just the cowboy (Sep 4, 2013)

The AB part should be no problem, contact Rockwell training but be prepared for sticker shock. Go on PLCtalk.net and ask the same question. I know some of the guys on there have companies that do PLC training at half the cost. They can also lead you in the direction for Siemens. The Siemens stuff is not easy to learn it has a steep curve, so if you can stay away from changing it, focus on the AB. +
Good luck and glad to see your company kicking up and doing the right thing. I just had Rockwell come in-house for PAX training for my guys.

Good luck
Cowboy


----------



## gpop (May 14, 2018)

If you have a rockwell tech support package you can do one online training for free. 

The class is better unless your company will lend you a processor/laptop because in the beginning a lot of programming is to do with confidence and to gain that you need hands on practice.


----------



## jcaden (Oct 30, 2016)

Do any of your Community Colleges offer any PLC short courses?


----------



## JRaef (Mar 23, 2009)

North Seattle Community College used to have an Industrial Maintenance program, sponsored by Boeing, that had great PLC classes. Not sure if it's still there or if it is, how COVID has affected it, but worth checking into.


----------



## QMED (Sep 14, 2016)

JRaef said:


> North Seattle Community College used to have an Industrial Maintenance program, sponsored by Boeing, that had great PLC classes. Not sure if it's still there or if it is, how COVID has affected it, but worth checking into.


Looking for something more high energy with a faster pace. I actually have done a decent amount of schooling there and a few other CC's. Honestly I was not impressed, probably worth it for someone with no experience at all and needs credentials.


I'm trying to avoid the whole build a trainer and start teaching myself route... I like my free time. Plus that will take me 5 times longer lol.


----------



## QMED (Sep 14, 2016)

just the cowboy said:


> The AB part should be no problem, contact Rockwell training but be prepared for sticker shock. Go on PLCtalk.net and ask the same question. I know some of the guys on there have companies that do PLC training at half the cost. They can also lead you in the direction for Siemens. The Siemens stuff is not easy to learn it has a steep curve, so if you can stay away from changing it, focus on the AB. +
> Good luck and glad to see your company kicking up and doing the right thing. I just had Rockwell come in-house for PAX training for my guys.
> 
> Good luck
> Cowboy


Ok just posted the same question over there.

I could not agree more about Siemens, if it were up to me I would ban their products from my site.


----------



## just the cowboy (Sep 4, 2013)

QMED said:


> I'm trying to avoid the whole build a trainer and start teaching myself route... I like my free time. Plus that will take me 5 times longer lol.


I think you are wrong with this. You can buy the trainer and learn at your pace with things that are related to what you need. There is enough help out there between here and that other site. A crash course will get you ideas but there is not enough time in the classes to really understand it all. What you don't use you lose. Make time at work to do the learning. I try to do every Thursday afternoon if *nothing is broke down* for my guys to do training. It has to take priority over fill in work.


----------



## BillyMac59 (Sep 12, 2019)

If speed and timing is an issue:
1- Contact your local AB rep. Have him/her in to confirm you have correct software, cables etc to get online to whatever machines you have. Providing him/her with a list of your processors (ie rslogix500 or 5000 platforms) would speed up the process. 
2 - Have a local systems integrator hired to provide equipment specific training.

By the way, if you really believe that a one week course is going to teach you everything about both software platforms, you are either extremely naive about PLCs or overqualified for your job. Time and downtime will tell...good luck


----------



## QMED (Sep 14, 2016)

ValeoBill said:


> If speed and timing is an issue:
> 1- Contact your local AB rep. Have him/her in to confirm you have correct software, cables etc to get online to whatever machines you have. Providing him/her with a list of your processors (ie rslogix500 or 5000 platforms) would speed up the process.
> 2 - Have a local systems integrator hired to provide equipment specific training.
> 
> *By the way, if you really believe that a one week course is going to teach you everything about both software platforms, you are either extremely naive about PLCs or overqualified for your job. Time and downtime will tell...good luck*


You know the first part of your response sounded smart. Did I say I thought a little bit of training was going to teach me everything about PLC's? Stupid comments like that.


----------



## QMED (Sep 14, 2016)

just the cowboy said:


> I think you are wrong with this. You can buy the trainer and learn at your pace with things that are related to what you need. There is enough help out there between here and that other site. A crash course will get you ideas but there is not enough time in the classes to really understand it all. What you don't use you lose. Make time at work to do the learning. I try to do every Thursday afternoon if *nothing is broke down* for my guys to do training. It has to take priority over fill in work.


Well I'm starting to feel that doing it myself is going to be the only way so you might be right. I'm not uber smart so usually I have to learn by doing.

I found out that if I buy a micrologix 1100 I can pair that with RSlogix 500 micro starter lite which is free and RSlinx I guess.


----------



## just the cowboy (Sep 4, 2013)

QMED said:


> Well I'm starting to feel that doing it myself is going to be the only way so you might be right. I'm not uber smart so usually I have to learn by doing.
> 
> I found out that if I buy a micrologix 1100 I can pair that with RSlogix 500 micro starter lite which is free and RSlinx I guess.


Yes. That is your best bet. 
Learn at your own pace, and get help as needed. 

When I taught PLC classes I would tell the students to do logic puzzle games in spare time, that was before internet and they had to use BOOKS. 
Still stands do logic puzzles they make you think in the “ what if this “


----------



## gpop (May 14, 2018)

just the cowboy said:


> Yes. That is your best bet.
> Learn at your own pace, and get help as needed.
> 
> When I taught PLC classes I would tell the students to do logic puzzle games in spare time, that was before internet and they had to use BOOKS.
> Still stands do logic puzzles they make you think in the “ what if this “


Its also a great way of getting experience of having your arse kicked when logix wont play nice with links and windows goes all firewall stupid. 

Something they never teach in class is software, hardware conflicts as they use all the same laptops and plc's so they have already worked out the kinks.


----------



## tates1882 (Sep 3, 2010)

I'm self taught with Siemens, and prefer them to most other now. I know in Boise the local Siemens branch use to provide training years ago but I'm not sure now. I would call the local Siemens branch.


----------



## just the cowboy (Sep 4, 2013)

gpop said:


> Its also a great way of getting experience of having your arse kicked when logix wont play nice with links and windows goes all firewall stupid.
> 
> Something they never teach in class is software, hardware conflicts as they use all the same laptops and plc's so they have already worked out the kinks.


We alway joke that it communications that get you.
Now I throw radios in the mix.


----------



## QMED (Sep 14, 2016)

gpop said:


> Its also a great way of getting experience of having your arse kicked when logix wont play nice with links and windows goes all firewall stupid.
> 
> Something they never teach in class is software, hardware conflicts as they use all the same laptops and plc's so they have already worked out the kinks.


When I did my stint doing testing I would say over 50% of the time we would have connectivity issues with the equipment. 

Even with rental equipment that came with a laptop that supposedly had all of the necessary drivers and software preloaded we had issues. I remember we had one CT analyzer that would sometimes work fine and sometimes you would have to do a ritual of unplugging various cables, cycling power to the unit, and restarting your computer before it would work.


----------



## paulengr (Oct 8, 2017)

QMED said:


> When I did my stint doing testing I would say over 50% of the time we would have connectivity issues with the equipment.
> 
> Even with rental equipment that came with a laptop that supposedly had all of the necessary drivers and software preloaded we had issues. I remember we had one CT analyzer that would sometimes work fine and sometimes you would have to do a ritual of unplugging various cables, cycling power to the unit, and restarting your computer before it would work.



I solved it.

Start with a VM system. I use Virtualbox. Start with a good clean fully patched and crapware scrubbed Windows XP and 7 system. W10 if you have to. 32 bit versions on XP and 7. Win 7-64 has stability issues on VMs for some reason.

Install RSLinx. Install Logix 5, 500, 5000, Studio, and say View SE on separate VMs. Set up RS-Linx with the correct serial and Ethernet drivers then backup the settings. Do NOT put them on the SAME VM.

Don’t bother with shutting down Windows within the VMs. Just close the VM with it still running.

Install licenses on the host VM or on a shared drive using the old disk based system or locked to a USB.

Then you shouldn’t have any more hardware/software problems. You can simply copy or back up the VM. RS-Logix or whatever software you need will just work. I had to backup/copy the HMI data for an old HMI that only runs on Windows 2000. I had no problems installing it and doing everything I needed even though it was running on an 8 thread 4 core I7 laptop running Linux. Windows 2000 had no idea what was going on.

Last thing. I have gender changers (male/male and male/female), null modems, DB-9/25 adapters, and a known good USB UART that does full RS-232 and another doing RS-485. But the most important tool is a small port tester with red/green LEDs that indicate either off, positive, or negative voltage on an RS-232 port. The biggest use aside from checking questionable cables is I can instantly check if a port is DCE or DTE. Just look at terminals 2 and 3 on both sides. One will be lit, one will be off. If they match (say both 2) use a null modem. Once they are different use gender changers as needed to connect them together. That’s it!

Last, don’t expect the auto configure to work unless you know it does with your USB dongle. Again this may take some experimenting. But you should just be able to hit stop on the driver, auto configure, and Whois to verify it works. Then switch to the Logix software. It takes just a couple minutes to access nearly any AB hardware/software with this method without hassles with serial ports.

I buy my serial stuff from Bb-elec.com. I’ve used them for years.


----------



## QMED (Sep 14, 2016)

paulengr said:


> I solved it.
> 
> Start with a VM system. I use Virtualbox. Start with a good clean fully patched and crapware scrubbed Windows XP and 7 system. W10 if you have to. 32 bit versions on XP and 7. Win 7-64 has stability issues on VMs for some reason.
> 
> ...


Ok cool thx I just copy pasted this for later reference. I've had major problems from a bad usb-to-RS232 until I figured out that was the problem.


----------



## Corporate_Big_Shot (Sep 27, 2019)

QMED said:


> I'm a maintenance guy so I need to be able to log in, *find where a packing machine is getting held up, and troubleshoot the sensor or make a small change in the program(just an example).*
> 
> My googling is not turning up anything that looks worthwhile? Any recommendations? Advice?


If the machine worked before, then you may not need to make any changes to the PLC program. Rather, you would need to find the fault and fix it. You can look at the program and see where the fault is created. 

Electricians don't need to assume the role of the engineer or designer and start programming the PLC. Sometimes the problem is as simple as a grounded wire or bad sensor.


----------



## just the cowboy (Sep 4, 2013)

Corporate_Big_Shot said:


> If the machine worked before, then you may not need to make any changes to the PLC program. Rather, you would need to find the fault and fix it. You can look at the program and see where the fault is created.
> 
> Electricians don't need to assume the role of the engineer or designer and start programming the PLC. Sometimes the problem is as simple as a grounded wire or bad sensor.


Don't jump the gun, he said make a change as an example. What if he just needs to add something in the future or change a timer. He did not say " change program to fix something" Does he call an engineer??

Cowboy


----------



## Corporate_Big_Shot (Sep 27, 2019)

just the cowboy said:


> Don't jump the gun, he said make a change as an example. What if he just needs to add something in the future or change a timer. He did not say " change program to fix something" Does he call an engineer??
> 
> Cowboy


In general, if you don't know what you are doing because you don't have PLC programming experience, then you don't have to do the work because it can be unsafe. Nobody can force you to work in unsafe conditions either.

Also, if the machine worked before, then it will likely work again without changes to the PLC program. The problem is that some electricians don't want to troubleshoot because that requires work. Some people are lazy and they don't want to get in the rats nest of wires to look for ground faults. They don't even want to check if the sensor is not aligned properly. But they want to immediately change how the machine works by altering the PLC code.


----------



## gpop (May 14, 2018)

Corporate_Big_Shot said:


> In general, if you don't know what you are doing because you don't have PLC programming experience, then you don't have to do the work because it can be unsafe. Nobody can force you to work in unsafe conditions either.
> 
> Also, if the machine worked before, then it will likely work again without changes to the PLC program. The problem is that some electricians don't want to troubleshoot because that requires work. Some people are lazy and they don't want to get in the rats nest of wires to look for ground faults. They don't even want to check if the sensor is not aligned properly. But they want to immediately change how the machine works by altering the PLC code.


Ive worked with at least 30 programmers and its no surprise to find code that needs to be patched. 
I have never meet a programmer that has truly tested there code in every situation. Just last week i had to toggle a bit simply because the reset on wonderware didn't agree with the tag in the code and that program is over 5 years old (first time we have tripped that motor and the full time programmer fixed it next day).

We have to sign out the program to change the code so everyone gets a alert if you make a change so no one is jumping/AFI a bad sensor unless everyone agrees. Its just easier to fix the sensor then deal with the emails. 

Its getting to a point that electricians really need a laptop as everything is networked. Im not even going to bother trying to mess with a AB powerflex drive HIM when i can simply pull it up on the laptop. (also means i can dial in and see whats going on before leaving home)


----------



## bin95 (Jan 27, 2012)

QMED said:


> I need a week or so of intensive hands-on training(no PowerPoint) on AB and/or Siemens. My company is paying. CA or WA preferably.


BIN95 has been specializing in practical *PLC training* for 25+ years so has exactly the same solution as you seek. Pre-covid there were quarterly open enrolment public 3-day seminars for individuals. (cost much less than AB/Rockwell, and less than all other providers.) Given today's situation, BIN95 only delivers that hands-on real equipment in-person training to companies at their facility and non-hands on via webinars. Also provides many *PLC training topics* via distance learning. Where hands-on is required for the many distance learning solutions, simulators have been integrated into courses. So your best solution is to get your company to bring BIN95 on-site to deliver the in-person training. The alternate plan, use the distance learning certificate courses with simulators included.

Hop this helps


----------



## paulengr (Oct 8, 2017)

gpop said:


> Ive worked with at least 30 programmers and its no surprise to find code that needs to be patched.
> I have never meet a programmer that has truly tested there code in every situation. Just last week i had to toggle a bit simply because the reset on wonderware didn't agree with the tag in the code and that program is over 5 years old (first time we have tripped that motor and the full time programmer fixed it next day).
> 
> We have to sign out the program to change the code so everyone gets a alert if you make a change so no one is jumping/AFI a bad sensor unless everyone agrees. Its just easier to fix the sensor then deal with the emails.
> ...


The issue is not obvious and happens in probably 97% of the code out there. Resetting the bit is the temporary fix but not the issue.

You are seeing the result of logic hazards, race conditions, transition logic and missing transitions, and other similar problems. I learned about these issues in an upper level digital logic class in engineering, never in computer science or ANY PLC class.

It is like taking a class on Microsoft Office. Ever tried to edit a Word document where every header is a slightly different format because they used the font/size buttons instead of using styles? Or worse yet finding out the “text” is actually screen shots pasted into Word? That’s what you are seeing here.

The “standard” way in a PC programming class (and HMIs) for programming buttons is one of four ways. Each button can do something either “on press”, “on release”, “while up”, or “while down”. So a typical PC programmer programs an action on release such as “save file”. Why not “on press”? Because then we can slide off the button with the mouse if we change our minds without triggering the button. But back to the PLC. We can’t really send it a “command”, only data.

This is how they teach you to do things in an HMI class. It’s wrong and it sets you up for failure and why 97% of programmers get stuck buttons. They teach you to program it to send a 1 “on press” and send a 0 “on release”. That seems like the obvious thing to do. And it works in class.

I can usually successfully break this style of code with 100% success with a trivially simple trick. What if someone slides their finger/mouse off the button while pressing so it never fires “on release”? Either on purpose (changed my mind) or because of a quick mouse flick or dirty screen?

Yep...stuck button. This just one of many ways that our simple logic can easily break. You can try to add timers and such to the Windows code but there are similar problems (“optimizations”) built into the way Windows communicates to PLCs. There simply is no handshaking...no way for the PC to recognize the PLC is in the wrong state.

It would seem like while up/while down is the answer but PCs work on events...how do we trigger an event (turn but on/off) here? It just doesn’t work.

When you are in a situation with an arrogant programmer that controls the programming, remember this simple “trap” because once you know it exists you can break their programs at will until they fix it.

The simple fix is this: Windows turns buttons on, PLCs turn them off. So program the button to send a 1 on release only. Then at the PLC we add one rung to do whatever the PLC should do such as start or stop, then one extra rung to toggle the bit back off. No more stuck buttons.

The downside is it seems like a lot of unnecessary code. I mean...why do the extra work adding something that should be built in? I’d agree but PLCs don’t provide any sort of “event triggers” and PC software is notoriously buggy. So this solution works every time.

The one exception is when we WANT to do something only while a button is held down. Fortunately operators are usually doing something where they will notice right away if they get a stuck button, so the “on press”/“on release” logic works.

This is just one example of things you won’t get in ANY PLC/HMI class.

A PLC only example is say you copy an input bit from one bit to another, such as energizing a coil because of a start button. But say you have a lubrication pump and a main pump, both triggered off the same start button. Later in the code you trigger an alarm and shut it down if the main pump is running but not the lube pump. So intermittently this alarm triggers with no actual issue. Why? On modern PLCs IO and program scan happen simultaneously. So the start input bit can change in the middle of a scan so the lube and main pumps can see different data. This is called a race condition. Lots of ways to fix it but the easiest is to copy the start input first and trigger off the copy.

Again...not taught in PLC school.

There are certain patterns or ways of doing programming, not just with PLCs, that are known to be the most efficient or reliable methods for doing things. Good programmers follow them and if you know about these kinds of things what may seem like strange or wasteful programming like anti-stuck button code seems obvious and necessary. But again...not taught in PLC school. There are programming books on “patterns” but unfortunately they are for PC programming, not PLC programming that has its own special situations.


----------



## bin95 (Jan 27, 2012)

paulengr said:


> Why? On modern PLCs IO and program scan happen simultaneously.


Paul: Great advice for computer programming (IE: HMI programming), but most of it is not relevant to PLCs. As PLCs are a single scan cycle. Your HMI computer programming course like most PLC training providers did not teach you the simple fact you should always be aware of first when working with automation control. That "modern PLCs" of which you refer to, is not a PLC, it is a PAC (an *industrial computer emulating a PLC*, therefore having simultaneous scans as any computer can.) 

So with PLCs (90% of all the world's current machine control) which only have a single scan cycle, most of your advice, examples, and extra work is a moot point. It is only applicable to computers (like the PAC or HMI), not PLCs. PLCs were intentionally designed to be simple, so they are more reliable than computer-based control and more user-friendly to electricians. (A lot less downtime due to simplicity, when compared to computers/PACs).

I hope this adds some additional insight.


----------



## gpop (May 14, 2018)

Weird i thought most plc's now scanned and updated there I/O outside of the main program scan.


----------



## bin95 (Jan 27, 2012)

gpop said:


> Weird i thought most plc's now scanned and updated there I/O outside of the main program scan.


PLCs Scan Inputs, then ladder logic, then scan (update) outputs, PAC and computers can scan I/O simultaneously while also scanning PLC program with one of its other processors.

Computers like the PAC, multitask using multiple full processors. PLCs only have a single dedicated microprocessor (a fraction of one processor) and therefore scan sequentially (In, Prog, Out).


----------



## paulengr (Oct 8, 2017)

The PAC/PLC argument has been made simply to differentiate products for sales purposes. But it is simply not that cut and dry. The AB PLC-5 (1980) does IO scans between MCPs if you use that feature. The AB CompactLogix is considered a PAC but only has a single core processor. In fact every “feature” of the so-called PACs has a counter argument where the definition doesn’t work.

The essential value of a PLC is not just simplicity or reliability. It’s the fact that the ladder logic language is very intuitive for expressing logic statements, things which are much more complicated in Algol-style traditional computer languages. Think of giant nests of if/then statements. It is much quicker and easier to read and troubleshoot or debug ladder logic code compared to say Java for typical industrial applications.


----------



## gpop (May 14, 2018)

Nothing like a few instructions in function block wrapped in a function block then added to another function block and rolled in a super function block with every f-ing option that some dumb arse came up with while high as a kite on caffeine. 

Ok that's better ...... sry had to vent.

I like ST for assigning physical I/O to tags as you can edit it online (great if you blow a output). Ladder is simple and easy to troubleshoot. Function block is my nemesis but im learning to play nice with it. But what the hell is Sequential Function Chart and what advantages are there over the other 3.


----------

