Công thức toán học (Internal Register) WISE

Trang chủ » SCADA - IIoT » Công thức toán học (Internal Register) WISE
16/03/2020 SCADA - IIoT 205 viewed

Internal Register Introduction

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 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.

Internal Register Setting

WISE-71xx, 72xx, 75xx, 790x

The internal register setting page is shown as below:

Follow the following steps:

  1. 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.

  2. After you finish all Internal Registers selections and settings, click “Save” button to save the settings.

WISE-580x

The internal register setting page is shown as below:

Follow the following steps:

  1. 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.

  2. After you finish all the Internal Registers selections and settings, click “Save” button to save the settings.

WISE-52xx, 224x

The internal register setting page is shown as below:

Follow the following steps:

  1. 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).

  2. 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”.

  3. 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.

  4. 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.

Math Formula

The settings are as following steps:

    1. Enter “Advanced Setting” → “Internal Register Setting” page, click to create a new Internal Register.

 

    1. Click on the radio button in front of the Internal Register, and then click on “Setting” to modify the settings.

    1. 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.

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.

    1. Click the “Verifying” button could check the result of the formula.

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.

    1. Click on “OK” to confirm the setting and return to the Internal Register list page.

    1. After all Internal Register settings are completed, click “Save” button to save the changes.

    1. 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.

    1. Enter “Channel Status” → “Internal Register” page, the result of the formula is already saved in the Internal Register.

Internal Register Rule Setting

    • Internal Register Condition:

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.
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.
    • Internal Register Action:

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.
Input Register Value One of the Input Register value of the module.
Holding Register Value One of the Holding Register value of the module.
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 “Varibale” 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

WISE-71xx, 72xx, 75xx, 790x, 580x

Scenario Example Document

In general, Internal Register(IR) mainly provides temporary variable to read/write data when performing IF-THEN-ELSE Rule evaluations and operations on a WISE controller. It also allows users to read/write data from remote SCADA via Modbus_TCP Protocol. Assume there is a WISE controller performing the following operations: when IR1 = 1 and IR2 = 2, then IR3 will be rewritten as 3.

WISE-71xx, 72xx, 75xx, 790x
WISE-580x
Graphic Illustration

Math Formula Document Download

Document Description Download
WISE-523x Math Formula Editing Function Quick Start Guide
WISE-52xx
Chia sẻ:
Tags:
TOP HOME