• Not Answered

Animating an object

Dear all

Having problems animating the color off an object.

I want the color of an object to change if 2 paramaters are both  true.

It is on a faceplate, want to use it for multiple tags, so i use "@mod@".

Changing the color with one param works fine, but my code does not work for 2.

Please advise, thanks.

Gerrit.

7 Replies

  • Gerrit, a quick test (two new module with two booleans each and new faceplate with 4 coloring objects (one for OR, one for AND and two for the individual parameters) does the job for me. Could you check or show the animation text for the object?
  • In reply to Maarten van der Waal:

    Maarten
    Is my perception off your answer correct.
    You are not changing color off the object, but making the the individual object visible if the parameters are true?
  • In reply to Gerrit de Goeij:

    Gerrit, my test is recoloring (red/green) the 4 rectangles. Could you post the animation text?
  • Couldn't find an example on a standard FP, but did on a custom FP so it should work fine. Also did a quick test to confirm.

    In the datasource field the expression structure is like:
    DVSYS.@MOD@/Parameter1.f_cv = 1 AND DVSYS.@MOD@/Parameter2.f_cv = 1

    Then in the color animation use: data conversion -> table -> exact match
    In the table use 2 entries, 0 & color1 and 1 & color2

    Did you try it like this too?
  • In reply to Robert Rijnders:

    All
    Thank you for solving my problem.
    The solution was the use off exact match instead off an shared table.
  • In reply to Robert Rijnders:

    It works!
    but, if i want to add a third option like 3&color3 it does not work.
    Any way to introduce another option?
    Also, DVSYS.@MOD@/Parameter1.f_cv = 1 AND DVSYS.@MOD@/Parameter2.f_cv = 1 means if both are 1 so the expression results is 1?
  • In reply to Giuseppe Di Tommaso:

    For clearity, use parenthesis where possible to prevent odd parsing!
    Yes,a third boolean expression-part is possible: (boolexpr1) AND (boolexpr2) AND (boolexpr3) results in a boolean result.