AnsweredAssumed Answered

Re2: Suggested modification to the IF THEN ELSE object

Question asked by VRFuser on Aug 14, 1997
Hi guys,
Why use an IF/THEN/ELSE at all?  Use a simple FORMULA box and the
outcome will be 0 or 1 automatically.

Example: If the input pin A=2 and the formula says (A<=3) you get a 1 on
the
outout pin.  If your formula says perhaps (A>=3) you will get a 0.

YOUR test conditions, of course could be a LOT more complex.

Mike Groves
Ericsson Inc.

______________________________ Reply Separator
_________________________________

     Hello Mike,
        It is possible to set the output pins to a value, with 1
limitation.  If
     you write your condition as something like:
        (A==1)*A
     the value of A will be propogated out the THEN pin.  This is
because the
     test statement will evaluate to either 0 or 1 and then that will
multiplied
     by A and that value placed on the THEN output.  The only caveat is
that if
     A is 0, the expression evaluates to 0 so a zero is propogated from
the ELSE
     pin; you can't test for (A==0)*A.  The logic seems to to be that if
the
     statement on the conditional line ultimately evaluates to non-0,
that value
     is placed on the THEN pin.  If the evaluation is 0, the next
condition in
     the object is checked and so on down to ELSE.
       Hope that helps.

     Tom Groleau
     HMSC, Tucson, Arizona


______________________________ Reply Separator
_________________________________
Subject: Vrf:Suggested modification to the IF THEN ELSE object
Author:  "Gustin, Mike" <mgustin@smsmfg.sms.siemens.com> at CCGATE
Date:    8/14/97 1:47 PM


I would like to be able to set the output data of the IF THEN ELSE
object to
a zero or one, other values might be useful too.

I realize that I can put a constant object on the output and trigger the
constant, though I have had instances of the ELSE pin not being an
effective
sequence trigger source.

Being able to set the output to 1 would allow combinatorial objects to
follow off the ELSE pin. Since the decision is already made in the
object
and the appropriate pins are being actuated, it seems redundant to put
out a
0 on the ELSE pin.

I would appreciate comments and feedback. Maybe I am missing something
or
overlooking something obvious.

Mike Gustin
mgustin@smsmfg.sme.siemens.com

Outcomes