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.
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
I think AB is the same of course different symbols.
RE: Function Block Programming
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
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
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
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.