Beginner ladder logic question

+1
I have another way using 19 instructions, but it looks a bit clearer, I think?

By my count you have 27 instructions, not counting the output (or SOR, EOR)

Double click on the rung number to open the mnemonic editor and count them. Branching instructions BST, NXB, and BND are instructions that you cannot ignore as they must be executed and involve storage of rung state in memory, so they do take time to execute.

osmanmom's solution is readable and Bubba can readily determine at a glance what the rung is supposed to do. When I was fresh out of college I applied Boolean reduction on my first few programs. Then after about a year and a half I had to go back and look at one of my own programs and had a WTF moment when I realized that what I was doing wasn't even obvious to myself after a short time. Now I focus on making the job obvious. I've even been known to add extra instructions on an output rung, knowing that the output is the first place Bubba is going to go when troubleshooting and if I can make likely culprits obvious then he won't have to dig through the program to find out why some permissive is not met.

Sometimes it is a fun challenge and I myself like to play around with various clever tricks and hacks, but the older I get the more I hate the 3:00 am phone calls. At the end of every wire is a sensor or actuator and the problem is almost always with one of those and almost never with the program, so the more obvious I can make it the fewer phone calls I get.
 
Last edited:
...SLC 5/00 that I am working with right now, with only 1K of program memory. The program that I am modifying already uses 1014 words (out of the available 1024).

Been there, done that. It might be worth your time to replace the 5/00 with a Micrologix. The bummer deal with that conversion is that the top/bottom wiring is reversed and you have to mount the micro upside down (done that too), or rewire, but it might till take less time and time is also money. Sooner or later you'll have to replace the 5/00. Right now might be as good a time as any. Having only ten words of memory left is something the boss can understand. Quote him a micro and see what happens.
 
Last edited:
Sooner or later you'll have to replace the 5/00. Right now might be as good a time as any. Having only ten words of memory left is something the boss can understand. Quote him a micro and see what happens.
Good points. I have made them to the "customer" (our own site member "racear2865"). He owns a shop for automative engine rebuilding, and this SLC 5/00 runs his cylinder honing machine. After I mentioned the future difficulties, he has bought a spare SLC 5/00 and an EEPROM. See this thread:

http://www.plctalk.net/qanda/showthread.php?t=89505

His SLC faulted (lost its program and reverted to the Default program). Now we are trying to recreate the old program from an earlier program revision that he got from another shop. The company that built the machine (Kwik-Way) is still in business, but no longer supports the Model 094 Honing Machine, and apparently doesn't have a copy of the original program.
 
Last edited:
TConnolly said:
By my count you have 27 instructions, not counting the output (or SOR, EOR)

Double click on the rung number to open the mnemonic editor and count them. Branching instructions BST, NXB, and BND are instructions that you cannot ignore as they must be executed and involve storage of rung state in memory, so they do take time to execute.

TConnolly,

Quite right you are, but I feel you are focusing in on things here way beyond the intented level.

Whatever about the "not so obvious" counting of the execution of the rung structure, if we were really counting the true total of executed instructions, do you think that we would have left out the OTE instruction? Perhaps you would? I thought it was quite obvious we were only referring to the number of contact instructions that we had to drop in as part of the "challenge". Not mentioning something does not automatically imply you are ignoring it, or do not know about it.

It was a simple "how to" question. Yes, true for you, there are more executable instructions than mentioned, but we were clearly only focusing on how many contacts we were using. Even when 25 was mentioned, again, clearly only referring to the input instructions, while not counting the OTE. We weren't referring to anything to do with execution times. As we've both now said, a fun challenge, but without getting too deep into things.

But even thinking about the unmentioned total kind of further makes the point. We don't consider it too often while attempting to keep the logic less ambiguous, unless of course you are seriously running out of memory, as is the case of Lancie's client, or a critical scan time is being increased.

I suppose there is a fine line between being an intelligent and efficient programmer and one who just likes to show off for the sake of showing off. The latter not belonging in the serious world of automation, in my opinion.

L,

About the only reason I could think of for your client to purchase a spare fixed SLC instead of migrating up as TConnolly suggests, and besides the cost factor, was if you didn't want to have to convert or re-write the original program. The fact you don't have it, or only have an older revision, would make me even more inclined to port it over to a newer platform and write the code anew, based on the old revision. But I suppose, from the sound of what you are saying, and with them already having bought the spares and a HHT, it's probably too late for that now.

I'd be very interested in seeing what you can hopefully get those 1014 words down too?

Regards,
George
 
About the only reason I could think of for your client to purchase a spare fixed SLC instead of migrating up as TConnolly suggests, and besides the cost factor, was if you didn't want to have to convert or re-write the original program.
That was it exactly. When I said that replacing with a ML would mean removing the old 3-slot rack and rewiring, that option flew out the window on fast wings.

Rewriting the code is going to be a problem, because it has over 500 variables (integer words) stored in the SLC that are used to position and control the hone head. Some of these are set by the Spectrum Operator Panel, and some are calculated in the program. I cannot figure out what most of these do, without a copy of the Spectrum program. So far we have had no success in uploading the Spectrum program. I have not been on-site yet, but probably it is about time to go and see if I can do anything to speed up the process.

Basically without an exact copy of the SLC program, it will come down to re-engineering the machine, a job that probably required several years of work for the original developers.

Somewhere out there in an old abandoned shop or warehouse, there is an exact duplicate Kwik-Way Model 094 Version 8 honing machine rusting away.
 
Lancie,

Something I see all the time with OEMs is that they might not have a real controls person in house so they have a generic controls template that can is basically the same with minor changes across multiple machines. Anyways, it might be possible that even though Kwik-way doesn't have info on this machine there might be another later model that has essentially the same controls. Just a thought, when grasping at straws any straw will do, so it might not hurt to check.
 
Thanks for the tip, Tim. The owner told me that he bugged Kwik-Way so long that they finally told him that they could not help him and to bug off and quit bothering them.

What we have is a program from another automotive shop, Version 7 of the program and we think this machine is a Version 8 of the SLC program. The only reason this copy exists is that the son of the other shop owner took a PLC class, and had the opportunity to take the EEPROM out and put it in the school SLC to make a copy. Of course all the address descriptions and rung comments are missing.

I have been able to make up descriptions for all of the I/O and some of the other N-word addresses based on the logic and knowing how the machine works. But there are still hundreds of missing descriptions. The Version 7 program will not run in the machine. We have determined that the existing machine used both analog Inputs I:2.0 and I:2.1, but the Version 7 program only uses I:2.0 for the Hone Vertical Position. That is a major difference, and probably the reason the V7 program will not run at all. I don't know for sure how the extra analog input is used, but suspect it is to provide extra resolution of the vertical hone position.

Something I see all the time with OEMs is that they might not have a real controls person in house so they have a generic controls template that can is basically the same with minor changes across multiple machines.
This program has many Labels and Jumps, and 4 subroutines, some that may not even be used in this particular model. That makes me think it may be possible to reduce the program size, if we can figure out exactly how it is supposed to work.
 
Last edited:
I'm not sure if you've gotten your hands on these yet, but in case they are of use...

The Operator Panel Manual...

Spectrum SOI-260 Operator Interface Manual

The Operator Panel Programming Software Manual...

Spectrum SOI-SPS Programming Software Manual

The Operating Panel Programming Software (Rev. 3)...

Spectrum SOISPS_REV3.ZIP

I don't know if your client has a manual for the Kwik-Way 094 Hone, but you can purchase one from Kwik-Way for $14.95...

Kwik-Way Model 094 Cylinder Hone Manual

That program is going to be a right challenge by the sound of it, I'm sorry I can't do more for you.

G.
 
Thanks, George. Yes we have copies of all those. Racear is right now trying to connect to the Spectrum using the SOI-SPC Rev 3 software. So far no luck.
 
hello lancie,
i want some simple ladder logic questions with small process and if possible with analog but small process can you help me sir
 
Here is a typical beginners project for a small programmable logic controller. Write a PLC ladder-logic program for the new bottled water Line 5 for the Evergreen Bottled Water Company, using information in the attached spreadsheet.
 
Please, some small program. This is very big.
Okay, here are the 3 steps for a small program:

1. When switch S1 is pressed, Light L1 should be OFF. L2 and L3 should be ON.

2. When switch S2 is pressed, light L2 should be OFF. L1 and L3 should be ON.

3. When switch S3 is pressed, light L3 should be OFF. L1 and L2 should be ON.
 

Similar Topics

Hi I have just started using Siemens S7 PLC for a mechatronics degree. I have used Matushita PLCs before but I am having difficulty with Siemens...
Replies
4
Views
3,672
a/ Input – X0 -> turns Output – y0, y5 Input X1 –turns OFF y5, but y0 stays ON b/ Input X0 -> turns Internal Bit M10 and Output Y0 M10 ->...
Replies
14
Views
3,321
Hi, I am a complete beginner with PLCs - so please forgive my ignorance. System: Siemens S7-313C Programming: Step 7 Ladder Diagram 1. How to you...
Replies
4
Views
8,734
Hi all, Writng a FB in ST on Beckhoff TC for a pulser which turns on and off on a cycle, is paused by turning bControlInput to FALSE, but resumes...
Replies
6
Views
264
So to start off: I have no experience with PLC's, but I'm good at figuring stuff out, but I need some help to know if my PLC is just dead in the...
Replies
2
Views
119
Back
Top Bottom