The Expression agent can create powerful user-defined calculations.
It functions by gathering data from other agents, or from the plant directly by scanning into slots V01 to V20, and performs a user defined mathematical transformation to calculate an output value.
Below are some basic examples on the functionality of Adroit Expressions, attached with a video:
Example 1: Expression Example for a Simple pulse every second, the value slot should turn on and off based on trigger.
!(v01%2)
(795) Adroit SUI Expression1 1sec Pulse - YouTube
Example 2: Expression Example for a basic comparison
If V01 is equal to 4 and the V02 is greater than or equal to 8 , make the output 1 else it should be 0
(v01==4)&&(v02>=8)?1:0
(795) Adroit SUI Expression2 Comparison Example - YouTube
Example 3: Expression Example - Simple Logic
If V01 is not equal to V02 then make output 0 else 1
(v01!=v02)?0:1
(795) Adroit SUI Expression3 Simple Logic Expression - YouTube
Example 4:Expression Example for Arthmetic calculation
If V01 is equal or less than V02 and V03 is equal to 0 set the Value slot equal to 1 else make it 0
((v01<=v02)&&(v03==0))?1:0
(795) Adroit SUI Expression4 Simple Arithmetic Example - YouTube