×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

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!
  • Students Click Here

*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

Jobs

Function Block Programming

Function Block Programming

Function Block Programming

(OP)
I'm new with function block programming, I'm an old ladder logic type.

I need to program basically a NOT for an input in a Boolian AND instruction with several NOT's involved.  Typical ladder would be something like the below (without addresses)

xic xic xic xio xio xio ote

Simple logic in ladder but I can't find the method of showing the xic's.  In Triconix, Siemens and Modicon you have a simple circle to indicate a NOT condition.

 

RE: Function Block Programming

(OP)
I've played around with Siemens and Modicon(Quantum) and have found the right icons/tools in those softwares.  The only invert I can find with AB is the BNOT, it works but is a space eater.

I'm getting around but it's slow and probably will be until I get comfortable with the format and instructions.

RE: Function Block Programming

Would it help to apply de Morgan? It usually isn't used in ladder because it was supposed to less reliable in a HW circuit (not fail-safe). But in a PLC, that kind of failure mechanism isn't a problem.

So, if you consider that /A and /B and /C is equal to /(A or B or C) then you need just one NOT instead of one for each signal. "/" stands for NOT.

So, even if the NOT is a space-eater, I think that you could live with a reduced number of them.

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: Function Block Programming

Gunnar just showing you Boolean Algebra.  This was a course in your early Digital circuits classes

Might want to review it.  

The only reason it comes easy for me is that I used to do P&G projects and they required all PLC programs to be drawn in Boolean Algebra format.  I think its burnt a crease in my brain, never get that one back.

RE: Function Block Programming

Gents. I just completed my first Seimens LOGO PLC program using a demo version of their Soft Comfort software. I used
Function Blocks as I do not know ladder logic and because I am a C programmer. Below is the plan I used to develop the logic for a series function blocks used to generate messages dependant on the state of four inputs, I5, I6, I7 and I8. Normally four inputs would resolve to 16 possible combinations. I5 and I6 are the NC and NO contacts of a SPDT microswitch. Ditto for I7 and I8. The SPST switches make for a number of illegal combinations. If you know C syntax you can see how I used this syntax in the plan.
if ((I6 && I8) && (not(I5 || I7))) {
msg line 1: VALVE A OPEN
msg line 2: VALVE B OPEN
priority: 5 }
if ((I6 && I7) && (not(I5 || I8))) {
msg line 1: VALVE A OPEN
msg line 2: VALVE B CLOSED
priority: 2 }
if ((I5 && I8) && (not(I6 || I7))) {
msg line 1: VALVE A CLOSED
msg line 2: VALVE B OPEN
priority: 1 }
if ((I5 && I7) && (not (I6 || I8))) {
msg line 1: VALVE A CLOSED
msg line 2: VALVE B CLOSED
priority: 30 (highest) }
TRUE {
msg line 1: ERROR
msg line 2:
priority 0 (lowest) }
In my FBD (Function Block Diagram) each of the && symbols was replaced with an AND block and each of the || symbols was replaced with an OR block. Each of the NOTs were replaced with a NOT block, available in Soft Comfort. The inputs were connected to the FBs as shown. The outputs of the AND blocks were connected to message blocks programmed to display the text as shown above. The priorities are not really required except to force the ERROR message if none of the other messages are enabled. Regards.  

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!


Resources