ganutenator
Lifetime Supporting Member
I would like to start by saying that I love Allen's CPT example. It will work great the next time I have numerous momentary buttons in an HMI.
I don't understand the "load of waffle" comment.
What is Easy?
I don't think that the flip-flop is easy. It is simpler for me now since I have seen so many different posts on the subject and would immediately recognize a flip flop circuit in ladder logic. If it was so easy, then why does it keep popping up as a topic?
The first time you saw a flip flop circuit in a PLC, I bet you all the money in the world, that you didn't say "Oh, that is easy", and hit the page down button. If you are like most people, you had to stare at it for a little while.
What makes something easy?
- I believe that it is recognition of something that you know.
While coil logic (ladder logic written in N.O., N.C., and coils) has its place and def. makes certain things easier to comprehend by all, it can be at some times the hardest thing in the world to understand, especially if it is not organized. For example, write a FIFO using normally open and closed contacts and coils, who would understand that?
The more things you have to consider, the more complicated it gets. i.e. Is there more than one HMI toggling the pushbutton? If I lose the HMI will the coil's logical state remain the same? If the PLC loses and regains power will I have to run around to every OIT and put all the PID loops back in Auto? Does this particular PLC automatically reset its coils to zero on power up, what if the coil is a word address and not a bit address? Does the HMI reading and writing to this address have a power on state. Can I specify that I don't want a power on state in the HMI software (ex. panel view using any other comunication protocal other than DH+ seems to write either a one or zero on power up -ugh)
The tricky part is making code easy to understand, functional, and easy to troubleshoot.
I believe that instruction list and structured text could have its place along side of ladder logic but not as a replacement. For example, double clicking on the user created function block below, would display the structured text for that function block.
HMI FLIP/FLOP
PB F_in ----------------F_out Auto/Man
-| |--------|Strucuted Text| ------ ( )
----------------
When the electrician/maintenance man viewed the ladder logic online, he could watch the coil turn on and off with the push of the button. He wouldn't have to understand the structured text language in order to troubleshoot. Black Box troubleshooting techniques of "good IN" and "good out" would apply.
Because the "user created function block" is written in text, a book of comments could be written inside the function block. For example.
// This function block toggles the state of the output
// Each "NEW" push of the pushbutton turns the output either on or off
// If the addresss of the output coil is a bit address (ex. B3/0)
then the coil will be autmatically turned off on a power up of the PLC
// If the address of the output coil is an integer bit address
(ex. N7:0/0) then the output will return to its last state on PLC power up
// Any questions please call my cell phone at
My History:
4 years as an Electrician in the Navy
1 year as an operator
1 year as a non union construction electrician
2 years as a factory electrician/maintenance man
1 year as a non degreed engineer at the same factory
6 years a a PLC Programmer/contractor for an electrical engineering firm while going to college on the GI bill.
1 year as a systems analyst (what ever that means)
-It is still difficult, and has been a struggle for me the whole way.
- I don't know everything
- I do not have an above average intelligence (of course, that defunct IQ test cd said I did; If anyone wants a self esteem booster, I'll email you the cd.
- I learn something new every day
- And yes, Rsdoran, I am over paid, hee hee
dang, i think i was smarter 15 years ago.