PLCs and Programming Style

As a maintenance electrician who has had to work with programs designed more as complicated works of art rather then practical simple programs I appreciate the person who keeps it simple so when I have to work on it at 2am no thinking is required the KISS has been implemented
 
I got into the habit of keeping OTL/OTU in pairs, because the first PLCs I used (in the mid '80s) were Omron. You didn't have a choice, because their latching instruction (KEEP) forced you to!... ;)

                              +-------+
----] [----------------------| SET |
| |
| |
----] [----------------------| RESET |
+-------+

The old Siemens S5s had the same thing, although I think they also had separate set and reset coils available.

I admit that I don't ALWAYS keep them in pairs anymore. It really depends on the application.

🍻

-Eric
 
I find that using words like NEVER or ALWAYS when talking about programming can get you into trouble.

Prefer and avoid are better descriptions. I do have a set of rules and guidelines for naming and organization, but if they get in the way of getting the job done efficiently I'll merrily trample all over them. Full description in the comments, of course.

I see a lot of OTUs used in this program I am currently debugging that do not have corresponding OTLs - I'm beginning to suspect that these are for the HMI's benefit? They invariably toggle bit addresses or bits sliced out of integer words.

Quite likely, I do that a lot. Mentioned in the tag description and rung comment so noone thinks they're redundant and messes them up. Also look for contacts with no corresponding coils.
 
...(I see a lot of OTUs used in this program I am currently debugging that do not have corresponding OTLs - I'm beginning to suspect that these are for the HMI's benefit? They invariably toggle bit addresses or bits sliced out of integer words.)

Gotta go... Turkey Day is gonna start early. Gobble, gobble, y'all!

Later ON,
D

In many of my programs, there is an outside system (routing computer or BCR database) that sets a bit when it does something and I reset it in my logic. That way there is only a OTU without a corresponding OTL.

It is also good for letting my know communication status. If I read a barcode and am waiting for a reply, if that bit doesn't get set in a certain period, I know that the routing system is not responding properly - unfortunately, the IT guys usually say it is the PLC, but that same OTL/OTU logic shows that it is waiting on them.
 

Similar Topics

I would like to learn PLC programming. There isn't really a specific reason. Automation and electronics thrill me I suppose. I have all kinds of...
Replies
14
Views
3,958
hello to all!!!! my HMI OP320-A display is in chinese which is already programmed,i contacted with the machine mnufactererer they...
Replies
0
Views
2,470
Hello, I am able to program Mitsubishi FX1N plc using GX-IEC developer with the following default COM params : 9600 bps,Even Parity,7 data bits...
Replies
2
Views
2,977
Hi How are you all doing. Im very confused about a program that im trying to migrate from an old version plc to a new version (tsx p572623) im...
Replies
0
Views
3,033
I was working with a person from Europe and they used Siemens PLCs. I had never used Siemens before, and he mentioned that Siemens had different...
Replies
3
Views
8,694
Back
Top Bottom