Formulas Mapping¶
EnOS provides a set of formulas to process the collection and control points collected from or sent to the device. Edge then maps the processed points to the predefined measurement points in a model.
Features¶
The list of formulas is given as follows. Measurement points in the list are represented by y, while the collection and control points are represented by x(i), where i represents the order in which the points are collected.
Formula Name |
Description |
Format in Template |
---|---|---|
NO_MAPPING |
Do not map this measurement point to any collection or control point. |
no_mapping |
EQUAL |
The value of the measurement point is equal to the value of the collection or control point, i.e. y=x |
x |
SUM |
Sum up the value of all the collection points to be the measurement point y=x(1)+x(2)+…+x(i) |
sum(X1,X2,…Xn) |
SUBTRACTION |
Substract one collection point from the other. |
subtraction(a,b) |
PRODUCT |
Multiply the value of all the collection points to be the measurement point. You can configure an optional coefficient. y=a * x(1) * x(2) * … * x(i) * |
product(X1,X2,…Xn,Coefficient a) |
CROSS_PRODUCT |
Calculate the inner product of all the collection points to be the measurement point. You can configure an optional coefficient (i.e. “Operand” parameter). Note that the order in which the collection points are collected is very important. y=a(x(1) * x(2)+x(3) * x(4)+…+x(i-1) * x(i) |
cross_product(X1,X2,…Xn, Operator a) |
RATIO |
Calculate the ratio of two collection points to be the measurement point. Note that the order in which the collection points are collected is very important. y=x(1)/x(2) |
ratio(Dividend, devisor) |
LOGICAL_OR |
Calculate multiple DI collection points with logical AND operation. |
logical_or(X1,X2,…Xn) |
LOGICAL_AND |
Calculate multiple DI collection points with XOR operation. |
logical_and(X1,X2,…Xn) |
XOR |
Perform the logical AND calculation for the collection points to be the measurement point. y=(x(1)|x(2)|…|x(i)) |
Xor(X1,X2,…Xn) |
RATIO_AGAINST_SUM |
Perform the following calculation for three collection points to be the measurement point. y=x(1)/(x(2)+x(3)) |
ratio_against_sum(a,b,c) |
BIT_N |
Take a specified bit out of an AI collection point and copy the bit to a measurement point together with an operand parameter indicating the location of the bit. For example, an operand of 0 indicates that the AI collection point taken is located at the first bit, and an operand of 15 indicates that the AI collection point taken is located at the 16th bit. |
bit_n(X, Operator n) |
BITS_M_TO_N |
Consecutive multi-bit assignment formula, i.e. take multiple consecutive bits of an AI collection point and assign them to another measurement point together with 2 parameters: operand M (end bit) and operand N (start bit), M>N. For example, if M=7 and N=0, it means taking the 1st to the 8th bit of the collection point and assigning it to the new model point. |
bits_m_to_n(X, Operator m, Operator n) |
IF_EQUAL |
Involve 3 operands. Operand 1 = a, operand 2 = b, operand 3 = c. The calculation is: if x == a, then y== b, else y==c. |
if_equal(X1,b,c) |
IF_RANGE |
The input measurement point is named value and the four operators are A B C D. The operation logic is: if value >=B then return D; if value>A && value< B then return C. Else, return value. |
if_range(X,a,b,c,d) |
MULTICHANNEL |
Map multiple collection points respectively to each component of an array. That is, y is an array: y={y[1], y[2], …, y[i]}, and y[1]=x(1), y[2]=x(2), …, y[i]=x(i), i<=32 |
Formula not supported |
CONNECT_STATE |
The state of the device, which must be collected. |
connect_state |
MULTIBIT |
y is an int32 array, and y={y[1],y[2]…,y[i]}, where: y[1].bit0=x(1).bit0, y[1].bit1=x(2).bit0, …, y[1].bit31=x(32).bit0, y[2].bit0=x(33).bit0, y[2].bit1=x(34).bit0, …, y[2].bit31=x(64).bit0, …, y[i].bit0=x(32(i-1)+1).bit0, y[i].bit1=x(32(i-1)+2).bit0, …, y[i].bit31=x(32(i-1)+32).bit0, i<=32 |
It is not recommended to import and export configuration through the mapping table. If necessary, you can copy and fill in the export format after a single configuration |
MULTICHANNERL_SHORTTOINT |
Multiple AI collection points of short type is converted to INT32 arrays. |
It is not recommended to import and export configuration through the mapping table. If necessary, you can copy and fill in the export format after a single configuration |
ENUM_N |
Map the collection points according to the ENUM type defined based on the model definition. |
It is not recommended to import and export configuration through the mapping table. If necessary, you can copy and fill in the export format after a single configuration |
REPLACE_N |
Replace collection point values with different model point values, and send them to the cloud |
It is not recommended to import and export configuration through the mapping table. If necessary, you can copy and fill in the export format after a single configuration |
CONTROL_SET_N |
Send control values to the selected control point i.e. y=x |
x |
CONTROL_ENUM_N |
Enum parameters of enum model points are replaced with different control point values, and send them to the cloud |
It is not recommended to import and export configuration through the mapping table. If necessary, you can copy and fill in the export format after a single configuration |
CONTROL_RELACE_N |
Model point values are replaced with different control point values, and send them to the device |
It is not recommended to import and export configuration through the mapping table. If necessary, you can copy and fill in the export format after a single configuration |
CONTROL_BITS_M_TO_N |
The control value is sent to the specified bit interval of the selected control point |
It is not recommended to import and export configuration through the mapping table. If necessary, you can copy and fill in the export format after a single configuration |
Formula Applicable To Non-array Measurement Points¶
NO_MAPPING
INVALID
EQUAL
SUM
PRODUCT
CROSS_PRODUCT
RATIO
LOGICAL_OR
RATION_AGAINST_SUM
BIT_N
BITS_M_TO_N
IF_EQUAL
REPLACE_N
CONTROL_RELACE_N
CONTROL_BITS_M_TO_N
Formula Applicable To Array Measurement Points¶
NO_MAPPING
INVALID
EQUAL
MULTICHANNEL
MULTIBIT
MULTICHANNERL_SHORTTOINT
Formula Applicable To ENUM Measurement Points¶
ENUM_N
CONTROL_ENUM_N