Hello all. While looking at some logic I have found someone has used an ACTION function block with several lines of actions.
The instruction manuals state that only "a single-line" assignment expression may used. Yet this block has nearly 20, and they all work.
Am I misunderstanding the instruction manuals? Can more than one assignment be made in an ACTION function block, or am I lucky my current block is working and should change it?
, Jan
According to BOL 11.3 - The Action (ACT) function block evaluates an expression when the input value is True. Mathematical functions, logical operators, and constants can be used in the expression.
The definition of expression is a little loose in this case, but the idea is pretty much whatever you can do in a calc block (there may be some limitations) you can do in action block, with the added feature that the code in the action block will only execute when the IN_D is true.
In reply to Youssef.El-Bahtimy:
The above is correct. I usually test the code in CALC block because i can assign the outputs and check the behavior of the code and then copy the code to ACT block. So in my experience, you are not limited to one line statements.
In reply to marko.dragojevic:
I recall from some earlier version of DeltaV that there were some calc functions that involved "time" which would prevent lines following that line from reliably executing inside of an Action Block. I do not have the details anymore.