WISE controller provides Internal Registers; they can be used to hold temporary variables and perform operations such as: to read for IF Condition evaluation or to write on THEN-ELSE Actions. Internal Register value can be used as evaluation criteria for IF condition statement. Select an operator from “=”, “>”, “<”, “≥” or “≤” and compare Internal Register value with the AI channel, other Internal Register or specified values. The Internal Register value can also be used to perform mathematical operations with the value of the other AI /AO Channel, other Internal Register or specified values by operators“=”, “+=”, or “-=”,etc.; the result can be included in the THEN/ELSE Action.It also enables remote SCADA to read/write data via Modbus TCP protocol.
WISE supports math formula editing function after the firmware upgrade version 1.3.0. Users can set I/O channels to be the variables, and use the following operators to edit the formula:
- plus “+”
- minus “-”
- times “*”
- divide “/”
- superscript “^”
- left parenthesis “(” and right parenthesis “)”
Users can edit different formula in each Internal Register. WISE will calculate the results of all formulas repeatedly, and save the results into the corresponding Internal Registers for IF-THEN-ELSE rule checking or data logging.
Internal Register Setting
- WISE-71xx, 72xx, 75xx, 790x
- WISE-580x
- WISE-284x, 52xx, 224x
- Math Formula
The internal register setting page is shown as below:
Follow the following steps:
-
A checkbox appears in front of each Internal Register; check the checkbox to enable the Internal Register. Input a value if you want to set a default value for that Internal Register, and set the nicknames for the Internal Register, this nickname will be displayed on the “Channel Status” page. The range of initial value is between -65535 and 65535.
-
After you finish all Internal Registers selections and settings, click “Save” button to save the settings.
The internal register setting page is shown as below:
Follow the following steps:
-
A checkbox appears in front of each Internal Register; check the checkbox to enable the Internal Register. Input a value if you want to set a default value for the Internal Register, and set the nicknames for the Internal Register, this nickname will be displayed on the “Channel Status” page.
-
After you finish all the Internal Registers selections and settings, click “Save” button to save the settings.
The internal register setting page is shown as below:
Follow the following steps:
-
Select the No of the Internal Register from the dropdown list and input “Name”. If the nickname of the register is not inputted, the name will be automatically set as “Internal Register#” (#is the number of the register).
-
In the “Type” field, select the data type of the Internal Register. There are five options: “16-bits Signed Integer”、“16-bits Unsigned Integer”、“32-bits Signed Long”、“32-bits Unsigned Long” and “32-bits Floating Point”. The default data type is “16-bits Signed Integer”.
-
In the “Initial value” field, assign the initial value of the Internal Register, then click to create a new Internal Register, and add to the list. The default initial value is 0.
-
Repeat steps 1 ~ 3 to complete settings of all Internal Register, click “Save” button to save the changes.
The Internal Registers of No.81 to No.100 provide the “Retain Variable” mechanism. It means that the data inside these Internal Registers will be retained even the WISE is in Power Off status.
The settings are as following steps:
-
Enter “Advanced Setting” → “Internal Register Setting” page, click to create a new Internal Register.
-
Click on the radio button in front of the Internal Register, and then click on “Setting” to modify the settings.
-
Check “Enable” in the Formula Setting section and edit math formula in the “Content of Formula” field. Users can select the “Interface”, “Module” and “Channel” from the dropdown list and click “Insert” to add a channel value encoded string into the formula, and use the operators as “+”, “-”, “*”, “/”, “^”, “(” and “)” to edit the formula.
-
Click the “Verifying” button could check the result of the formula.
-
Click on “OK” to confirm the setting and return to the Internal Register list page.
-
After all Internal Register settings are completed, click “Save” button to save the changes.
-
Click the “Save” button on the right upper of WISE Web page to save all parameter settings to WISE, then WISE will start to calculate the results of all formulas repeatedly.
-
Enter “Channel Status” → “Internal Register” page, the result of the formula is already saved in the Internal Register.
For example, if user edit a formula as below:
1000*$C4M6ro0 + 100*$C4M6ro1 - 20*$C4M6ro2 / 10^$C4M6ro3
In the “View” tab, it would be displayed in the real index format of the channel as:
Please note: Do not modify the channel value encoded string when you are editing the formula. It may cause failures when WISE reads the channel value.
Please note: Before you click the “Verifying” button, please confirm that the I/O module setting is saved to WISE if you use the I/O channels in the formula. Otherwise, the test result would be error because the I/O module is not found.
Internal Register Rule Setting
-
Internal Register Condition:
-
Internal Register Action:
Identify the value of Internal Register to be equal to, greater than, less than, equal to or greater than, equal to or less than the Variable, if the result matches the evaluation criteria, the Action will be executed.
Internal Register | Operator | Variable | Description | Condition Statements |
IR Value of index N | = > < ≥ ≤ |
User-Defined Value | Using a user-defined value to compare with this internal register value. | continue to be TRUE when the status matches the criteria |
Internal Register | Using the internal register value to compare with this internal register value. | |||
AI Channel Value | Using AI channel values of module to compare with this internal register value. | |||
AO Channel Value | Using AO channel values of module to compare with this internal register value. | |||
DI Channel Counter Value | Using DI channel counter values of module to compare with this internal register value.. | |||
DO Channel Counter Value | Using DO channel counter values of module to compare with this internal register value.. | |||
Input Register Value | Using input register values of module to compare with this internal register value. | |||
Holding Register Value | Using holding register values of module to compare with this internal register value. | |||
MQTT Subscribe Topic Message Value | Using MQTT subscribe topic message value to compare with this internal register value. | |||
Amazon Web Services Subscribe Message Value | Using Amazon Web Services subscribe message value to compare with this internal register value. | |||
Microsoft Azure Subscribe Message Value | Using Microsoft Azure subscribe message value to compare with this internal register value. | |||
IBM Bluemix Subscribe Message Value | Using IBM Bluemix subscribe message value to compare with this internal register value. |
Users can modify the Internal Register value in the THEN/ELSE Action statement.
Internal Register | Operator | Variable | Description | Execution Type |
IR Value of index N | = += -= *= /= %= |
User-Defined Value | The value defined by user. | One Time / Repeat |
Internal Register | One of the internal register value of the module. | |||
AI Channel Value | One of the AI channel value of the module. | |||
AO Channel Value | One of the AO channel value of the module. | |||
DI Channel Counter Value | One of the DI channel counter value of the module. | |||
DO Channel Counter Value | One of the DO channel counter value of the module. | |||
Input Register Value | One of the input register value of the module. | |||
Holding Register Value | One of the holding register value of the module. | |||
MQTT Subscribe Topic Message Value | One of the MQTT subscribe topic message value. | |||
Amazon Web Services Subscribe Message Value | One of the Amazon Web Services subscribe message value. | |||
Microsoft Azure Subscribe Message Value | One of the Microsoft Azure subscribe message value. | |||
IBM Bluemix Subscribe Message Value | One of the IBM Bluemix subscribe message value. | |||
Operator Description | ||||
= | Assign the new Internal Register value as the value in "Varibale" field. | |||
+= | Assign the new Internal Register value as the original Internal Register value plus the value in "Varibale" field. | |||
-= | Assign the new Internal Register value as the original Internal Register value minus the value in “Value” field. | |||
*= | Assign the new Internal Register value as the original Internal Register value times the value in “Value” field. | |||
/= | Assign the new Internal Register value as the original Internal Register value is divided by the value in “Value” field. | |||
%= | Assign the new Internal Register value as the original Internal Register value divide the value in “Value” field and return the remainder. |
Internal Register Application Example
Math Formula Document Download
Document Description | Download | ||
WISE-523x Math Formula Editing Function Quick Start Guide |
|