@
drbitboy
I'm trying to replicate a Schneider FDB program in Rockwell.
I was building a new DI_REMAP in FBD in Rockwell like our technicians are accustomed to see for our Schneider rigs. It's a 16 inputs block where I plug the "wired" (ex: Local:4:I.Data.0) inputs. I place my simulation options there also and a couple other things. Customers likes that, I like that, and it's clean.
Often, we would negate an input because we want to annunciate on a "1" and we want all SCADA alarms to be high on a "1" so we don't have logic to do at SCADA level (like alarm on low), like an Ethernet switch or Power Supply Healthy status. It's fail safe, if the wire breaks we want the alarm driven by the PLC. It is also easier to interlock with a bad 24VDC loop failure (I'll alarm on 24DC fail only and not on all 7 other low alarms because 24DC is dead).
With Unity Pro / Control Expert, the "negate" (BNOT with Rockwell) does not take room in the page (it's a small circle on the input leg). With Rockwell, if I have to negate an input, that BNOT block takes a lot of place (like 3-4 rows), and it often happens that I have 6-7 of them on the same 16 inputs. And I don't want to hide it in a Ladder remap since I know the technician won't have the reflect to follow the tag and I don't want to have an intermediate remap.
If I'm using the BNOT right on the FBD page, this is spaghetti unless I take all the page to place it neatly, which undermines the purpose of clarity of the remap.
So long story short, I added an input on my block that will read something like 2#1000_0000_0000_0011 which means that the first and the last two inputs are negated, this is easy to read and it does not mess up my layout on the page.
My plan was to use a SEL block that would go through a BNOT or not if the mask for that bit was "1", but it only accepts REAL.
Since this did not work with the SEL block for that particular setup, I just wrote this while thinking about it (first is the actual wired input, second one is my "BNOT mask value):
0-0 = 0
0-1 = 1
1-0 = 1
1-1 = 0
...and realized I was just trying to do a XOR.
But your way will come handy soon for more complicated selections, like when the selection is coming from two different logic. But I'll miss this block for sure, I think I'll just build it.
Thanks again.