Hello All,
I'm relatively new to PLC programming, Ladder Logic, Structured Text, SFC, etc. I have roots in Java, C#, PHP and other languages.
I need to do a task that will be calculated exactly the same way potentially hundreds of times in one program. It needs to take some values as input and return a value as output. From a traditional (or traditional to me) standpoint, this is the perfect application for a method or function. It seems the equivalent in RSLogix is Subroutines + Params or Add-on functions.
My plan is this:
Write the SBR or add-on in Structured Text as it seems the easiest and most readable way to complete this function (maybe because I'm used to seeing it.)
Then the other controls guys can reference my SBR or function in their ladder logic.
Is this a good idea or will everyone who may have to debug my code down the road hate me for doing it in Structured Text?
I tend to get that message when researching it.
I'm relatively new to PLC programming, Ladder Logic, Structured Text, SFC, etc. I have roots in Java, C#, PHP and other languages.
I need to do a task that will be calculated exactly the same way potentially hundreds of times in one program. It needs to take some values as input and return a value as output. From a traditional (or traditional to me) standpoint, this is the perfect application for a method or function. It seems the equivalent in RSLogix is Subroutines + Params or Add-on functions.
My plan is this:
Write the SBR or add-on in Structured Text as it seems the easiest and most readable way to complete this function (maybe because I'm used to seeing it.)
Then the other controls guys can reference my SBR or function in their ladder logic.
Is this a good idea or will everyone who may have to debug my code down the road hate me for doing it in Structured Text?
I tend to get that message when researching it.