Re: [foxboro] help with logical testing

  • From: Corey R Clingo <clingoc@xxxxxxxxxxxxx>
  • To: foxboro@xxxxxxxxxxxxx
  • Date: Tue, 17 Jan 2006 16:50:07 -0600

Maybe I'm missing something, but how about adding them all up, then 
testing if the result is >1, like so:
IN BI01
IN BI02
. . . 
IN BI16
ADD 16
SUB 1.5     <--may have to do this with a memory reg, can't recall right 
now
SSP BO01
CLR BO01


On a side note, some CALC instructions for packing/unpacking bits would be 
nice, especially since they have the logical instructions that work with 
packed integers.  I have had to use PAKIN blocks and such to do this in 
the past.


Corey Clingo
BASF Corp.





brad.s.wilson@xxxxxxxxxxxxxx 
Sent by: foxboro-bounce@xxxxxxxxxxxxx
01/17/2006 04:25 PM
Please respond to
foxboro@xxxxxxxxxxxxx


To
foxboro@xxxxxxxxxxxxx
cc

Subject
[foxboro] help with logical testing






I've been struggling to find an elegant solution to this problem (meaning
one that runs fast).  I would like to monitor several boolean inputs 
(let's
say 16) and generate a boolean FALSE is no inputs are TRUE or if *only* 1
input is TRUE, otherwise generate a boolean TRUE.  The application is a
valve manifold where we want to generate an alarm if 2 or more valves are
open (or not closed).  We used to do this in PLB, but we abandoned that
method (I won't go into the reasons why).  We're currently using an IND
block, but the extensive testing of combination is very slow ... it can
take upwards of 30 seconds to run through all the combinations.

I tried building something using CALC, but I couldn't find an operation
that worked among AND, OR, NOR, NAND, XOR, XNOR, etc.  I looked at MCIN,
but I don't see how that would work (the inputs are on different FBMs).  I
tried to understand how I could manipulate the inputs into a packed
integer, but didn't get very far with that.

Any ideas?

Brad Wilson
ExxonMobil Chemical Co
Edison Synthetics Plant
732-321-6115
732-321-6177 fax
Brad.S.Wilson@xxxxxxxxxxxxxx





 
 
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
 
foxboro mailing list:             //www.freelists.org/list/foxboro
to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
 

Other related posts: