×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Koyo CLICK PLC Ladder Logic Architecture

Koyo CLICK PLC Ladder Logic Architecture

Koyo CLICK PLC Ladder Logic Architecture

(OP)
Hello All:

I am in the preliminary design of a system to control various laser safety tri-color beacons utilizing a Koyo CLICK PLC. I have very little recent PLC experience.

The system will support multiple stations looking at various laser and shutter control signals to decode the proper lamp illumination in addition to controlling AC mains contactors and firing of a laser.
Have a question about the overall ladder logic architecture-

One feature I would like to incorporate is checking for for errors:
If a station interlock is not present (cable between PLC and station unplugged).
If the AC mains contactor auxilary contact shows contactor closed when it is supposed to open (contactor stuck closed).

My thought was the first few rungs would check for these errors. If an error detected set an internal register bit ON and load another register with an integer error code.
If error bit is ON then jump to a subroutine to flash lights in a specific pattern. Specific pattern to flash would be determined by the numeric error code.
Turn the AC mains contactor output OFF.
Return from subroutine.

Thus if there is an error I do not want to update other ouputs based on all the conditional logic specific to them.
Therefore would I just insert the state of my error bit (NC) in the first column of every rung?
This is what I was planning on doing, would this method be typical or can you suggest alternative methods or potential gotchas?

What about the internal SC bits such as SC26 (watchdog timer error) and SC19 (PLC errors)- should I monitor those too to be safe?
Have not yet detrmined what state the PLC outputs could end up in if the PLC errors out.

Thanks

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"It's the questions that drive us"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

RE: Koyo CLICK PLC Ladder Logic Architecture

You generally put the logic and inputs at the top of your programs then at the bottom you put the outputs in one block. Usually separated and commented with some horizontal comment line stating "==OUTPUT=="

Normally you want no logic happening in the output block and each rung has a contact derived from your upper logic area that just repeats the logic result from above down to the output block. Like:

|
| --|PUMP1|---------(PUMP1_OUTP)--|
|

You can put an "error" contact in all the outputs you want inactive/OFF during a fault condition. That can make your logic more readable and maintainable and quickly helps you see why outputs are not active.

|
| --|PUMP1|---|FAULT_A|------(PUMP1_OUTP)--|
|

If you want to include checks on system bits pile them into on fault and add that condition to the outputs needed.


|
| --|PUMP1|---|FAULT_A|---|FAULT_SYS|---(PUMP1_OUTP)--|
|

Keith Cress
kcress - http://www.flaminsystems.com

RE: Koyo CLICK PLC Ladder Logic Architecture

(OP)
Keith:

I like the separation of inputs then outputs for clarity, but I presume mixing that up has no effect of program operation? Processor scans inputs, updates input table, updates output table based on logic , then writes to the physical outputs.

I think I understand your first example, PUMP1 would be an internal register bit derived by logic while PUMP1_OUTP is the physical output of the PLC.
So my intention of using the error bit in-line with the output in the second example looks like the conventional method.

Wonder if I can force the SC error bits in the software to see what happens with outputs.

Thanks

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"It's the questions that drive us"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

RE: Koyo CLICK PLC Ladder Logic Architecture

I think it might actually make a difference where the outputs are. I recall some vexing issues when I started out that were specifically caused by having outputs mixed with the inputs and logic.


Notably if you have, say, an output mixed in with the logic the output doesn't get evaluated until after the logic was already evaluated. This causes things that should've happened on the logic eval to not be updated or correct until the following scan. Any SET/RESET logic or single-pass-only stuff may not work as expected. It might mess up subroutines too.

Try setting any of those system bits and see what happens.


Keith Cress
kcress - http://www.flaminsystems.com

RE: Koyo CLICK PLC Ladder Logic Architecture

Quote (Therefore would I just insert the state of my error bit (NC) in the first column of every rung?)

Not so familiar with CLICK. I would guess it would support a rung function that will enable/disable a range of rungs when a specific input contact is set. If CLICK programming has this, then could be used for logic & sequence control based on error state. This would save you programming & un-clutter your rungs.

TygerDawg
Blue Technik LLC
Virtuoso Robotics Engineering
www.bluetechnik.com

RE: Koyo CLICK PLC Ladder Logic Architecture

(OP)
Keith:

Now I see where you are headed in terms of I/O segregation, mixing could lead to a situation akin to a race condition.
I verified one error status condition thus far, if watchdog timer times out, all outputs are turned off.
I'll tweak some bits next.

TygerDawg:

No condition disables available in the CLICK environment. I'll stick to my original plan.

Thanks

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"It's the questions that drive us"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

RE: Koyo CLICK PLC Ladder Logic Architecture

tygerdawg; Yeah no such feature on these basic PLCs. \

Analog; That's exactly it. You get race conditions that make it work sometimes and not others. Completely mind twisting. Avoid.

You can lump all the system bit tests into one line up in the logic section. Then what I do is add a NORMALLY CLOSED contact called.... |Test| or |DEBUG| or |ALWAYS_CLOSED| into that same system bits test line with a coil called something like -(SYSTEM_FAULT)-

Use the SYSTEM_FAULT to condition all those outputs you need to.

To test it all just whip out the Override window and force that |Test| contact OPEN.

BTW if you password protect the code you always have to be logged in to have the Override Window actually work. You can do everything on the screen but noting ever actually happens. You will contemplate going postal if you find yourself there. It's a bug.

Keith Cress
kcress - http://www.flaminsystems.com

RE: Koyo CLICK PLC Ladder Logic Architecture

(OP)
Keith:

Looks like the SC bits related to errors cannot be overridden, they are read only. I'll see if I can force an error by rearranging or pulling some expansion modules.
I would expect when internal PLC errors are detected it will deactivate the physical outputs like it does for the watchdog timeout.
Nothing mentioned in the Help, I'll probably 'contact' Koyo to confirm.

Thanks for the tip on the override password bug. Since this is internal to our facility I will not be protecting it.
I do protect my macros in Excel that are used by various departments, but I inform all related parties that the passwords are in a sealed envelope in my HR file should I quit or have an untimely demise.

Have a good weekend!

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"It's the questions that drive us"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

RE: Koyo CLICK PLC Ladder Logic Architecture

Hey AK2DM,

Quote (SC bits related to errors cannot be overridden)

This is why I described putting them all on an Error Rung in series with a permanent Debug Contact you can use for testing every time you mod the code.

Cheers!

Keith Cress
kcress - http://www.flaminsystems.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close