Benefits of using Function Block vs Ladder?

ryangriggs

Lifetime Supporting Member
Join Date
Jun 2016
Location
USA
Posts
198
Hello, I am dealing with some old L35E controllers with old programs from the early 2000's. I was perusing them and discovered that the original programmer used Function Blocks in some places to make very simple decisions like the following. This leaves me scratching my head to determine ***WHY*** they would use a FBD for this instead of a simple ladder contact. Almost everything else is ladder logic in their program except for some FBD totalizers (which make a bit more sense, but still...)


Any idea why this would have been done? is it a performance enhancement? Definitely NOT better for readability! This is the ONLY item in the entire function block - no extra pages, etc... so they created it specifically to make this one decision.

54fd
 
@nyanpasu I have no idea what they were thinking but it makes my head hurt to look at this.
 
It is pretty dumb use of the block.. Just one input needed to turn on output..
MAYBE.... they thought they would need more than one input and ended up disabling all but one, or at one time, more than 1 was needed.
 
It is pretty dumb use of the block.. Just one input needed to turn on output..
MAYBE.... they thought they would need more than one input and ended up disabling all but one, or at one time, more than 1 was needed.

I agree. It looks like (over the years, perhaps?), some conditions that had originally been required for operation in Manual Mode were disabled, probably one by one.
 
It is pretty dumb use of the block.. Just one input needed to turn on output..
MAYBE.... they thought they would need more than one input and ended up disabling all but one, or at one time, more than 1 was needed.

Hello, I am dealing with some old L35E controllers with old programs from the early 2000's. I was perusing them and discovered that the original programmer used Function Blocks in some places to make very simple decisions like the following. This leaves me scratching my head to determine ***WHY*** they would use a FBD for this instead of a simple ladder contact. Almost everything else is ladder logic in their program except for some FBD totalizers (which make a bit more sense, but still...)


Any idea why this would have been done? is it a performance enhancement? Definitely NOT better for readability! This is the ONLY item in the entire function block - no extra pages, etc... so they created it specifically to make this one decision.

54fd

For starters, some instructions are only available in Function Block... which trips up a bunch of people, me included. If someone came into DCS without PLC programming, FBD is all they'll know and wouldn't surprise me if he couldn't think in ladder terms. The 1's linked this way make me believe there were more conditions originally and were removed and also that the original coder didn't know that he can set the value inside the block and not have to map it.

I don't think it's the case here, but blocks like these can sometimes be used to latch a value in a certain cycle, particularly when you can control the execution order (very common in PCS7 to have XOR blocks to force a value over more than a cycle, for example). I don't think this is the case here though. Just putting it out there as a consideration.
 
I find that function block diagram programming can be very readable when doing a series of manipulations to a signal.

Here's an example where an operator enters a value to control a pressure.
You want to limit the pressure to between 0 and 3000 psi.
You want to ramp the internal value before sending to the analog output so the system doesn't jump in pressure causing shock.
You need to scale the pressure to match the analog output scaling
You need to convert from REAL to WORD before sending to the analog output

The order of operations and calculations are absolutely clear here.

FBD.png
 
I agree 100% that FBD has its place and can create more readable/maintainable routines in some cases.


In this particular case, since it seems this particular FBD doesn't offer a performance boost or other "secret" benefits, I am going to venture that the original vendor copied and pasted (possibly the entire project) from another project, and removed unnecessary features to shoehorn it to fit our requirements (circa 2005).



Sadly, the RSLogix 5000 license they sold us at that time was the "Starter" version, which doesn't permit viewing or editing of FBDs, so these were off-limits to us until we finally upgraded our license a couple years ago. For this reason, the FBD sections have been nothing but trouble, making maintenance of the project more difficult.





I find that function block diagram programming can be very readable when doing a series of manipulations to a signal.

Here's an example where an operator enters a value to control a pressure.
You want to limit the pressure to between 0 and 3000 psi.
You want to ramp the internal value before sending to the analog output so the system doesn't jump in pressure causing shock.
You need to scale the pressure to match the analog output scaling
You need to convert from REAL to WORD before sending to the analog output

The order of operations and calculations are absolutely clear here.
 

Similar Topics

I was just using 3TK safety modules from Siemens or other brands and I had no problem with them. I always recommended my customers to use them...
Replies
7
Views
2,355
Hi all, so I need a little help with knowing the benefits and Limitations of using the Allen Bradley slc 500 system when being used to programme a...
Replies
58
Views
18,578
https://www.governmentjobs.com/careers/townofcary/jobs/1800925/senior-electronics-technician?page=2&pagetype=jobOpportunitiesJobs
Replies
1
Views
2,071
I am new to this company. I am still trying to stabilize my laptop crash . I have 2 Windows XP coming Wednesday. I was digging in some drawers and...
Replies
2
Views
4,081
I was wondering it there are any benefits of swapping out a working SLC503 to a newly found SLC505? More capability? Faster? umm, more learning...
Replies
2
Views
1,618
Back
Top Bottom