Save Into vs Target

Certified Associate Developer

Here i queried some detail ,it is in Ac in input tab but not give Save into , in the output tab(img 2) im updating the Ac value and storing in the Target

in this case it is working fine

but in the input tab if i give the Save Into the value is not updating in the output tab

both Save into and Target given only the Save into come out of that Script task or what

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer

    you can't have the input and output tabs both save into the same target PV - there's no guarantee as to what order the saves will execute, and you should assume they'll execute in random order if both are configured.  In your case you will ALWAYS want to ONLY have the save target configuerd in the OUTPUT tab.  I usually don't even configure a value in the input tab, instead doing any required calculation (etc) in the expression of the output itself. You can use local variables to help you, for the case where you're querying stuff.  And if it gets too complex, you can always migrate it to an Expression Rule for easier testing.

    (FWIW, The one case where I make an exception to this is if I need to query / configure a complex evaluation in the input and then use the same value in several different output values - in this case, doing it in the input tab means it isn't done repeatedly in the different outputs.  But all other times, I just configure all the info in the output tab only.)

Reply
  • +1
    Certified Lead Developer

    you can't have the input and output tabs both save into the same target PV - there's no guarantee as to what order the saves will execute, and you should assume they'll execute in random order if both are configured.  In your case you will ALWAYS want to ONLY have the save target configuerd in the OUTPUT tab.  I usually don't even configure a value in the input tab, instead doing any required calculation (etc) in the expression of the output itself. You can use local variables to help you, for the case where you're querying stuff.  And if it gets too complex, you can always migrate it to an Expression Rule for easier testing.

    (FWIW, The one case where I make an exception to this is if I need to query / configure a complex evaluation in the input and then use the same value in several different output values - in this case, doing it in the input tab means it isn't done repeatedly in the different outputs.  But all other times, I just configure all the info in the output tab only.)

Children
No Data