inSCADA
EN
EN
  • Introduction
  • Getting started
  • User Interface
    • Home
    • Development
      • Projects
      • Connections
      • Devices
      • Animations
        • Get
        • Color
        • Rotate
        • Move
        • Opacity
        • Bar
        • Click
        • Tooltip
      • Alarm Groups
      • Alarms
      • Scripts
      • Expressions
      • Variables
      • Reports
      • Processes
      • Mail
      • Import/Export
    • Wizards
      • Gas Metering
      • HPP Unit
      • Device Library
    • Visiualisation
    • Processes
    • Control Panel
    • Project Map
    • Variable History
    • Alarm History
    • Alarm Monitor
    • Trend Graphics
    • Reports
    • Logs
    • Auth Logs
    • Jobs
    • Users
    • Help
    • About
    • License
  • Mimic Design
  • Communication Protocols
    • MODBUS
      • Modbus TCP
      • Modbus UDP
      • Modbus RTU Over TCP
      • Modbus TCP Server
      • Modbus RTU Slave Over TCP
    • DNP3
      • DNP3 Master
      • DNP3 Outstation
    • PROFINET
    • IEC-104
    • SNMP
    • OPC
      • OPC UA Client
  • Programing
    • APIs
      • Variable Functions
      • Connection Functions
      • Project Functions
      • Alarm Functions
      • Script Functions
      • In-Memory DB Functions
      • System Functions
      • User Functions
      • Date-Time Functions
      • String Functions
      • Notification Functions
      • Confirmation Functions
      • Database Functions
      • Other Functions
  • Database
  • Usefull Features
  • Update Logs
  • Architectures and Applications
  • Development Roadmap
  • Migration to inSCADA
  • Licensing Policies
  • FAQ
  • Screenshots
  • Auxiliary Tools
  • Installations
    • Requirements
    • Installation on Linux
Powered by GitBook
On this page
  • Get-Expression
  • Get-Numeric
  • Get-Text
  1. User Interface
  2. Development
  3. Animations

Get

PreviousAnimationsNextColor

Last updated 5 years ago

With a Get-type animation, you can display the value on the mimic screen.

Get-Expression

As shown in Figure 1, we show a random value that we generate with javascript Math.random () on the selected text object.

With Expression you can use inSCADA APIs. With ins.getVariableValue, you can read any variable and manipulate it.

Example 1 :

Display in mBar if the pressure value is less than 1.

var pressure=ins.getVariableValue("UNIT01_HPU_PRESSURE"); // Unit Of the Value is Bar
var result=""+pressure.value+" Bar";
if (pressure.value<1) result=pressure.value*1000+" mBar"
return result;

Example 2 :

Show LOCAL/MANUAL/AUTO status as text by looking at a value of 'UNIT01_OPERATION_MODE'.

var operation_mode=ins.getVariableValue("UNIT01_OPERATION_MODE"); 
// OPERATION MODES : 0 = LOCAL, 1 = MANUEL, 2 = AUTO
switch (operation_mode.value) {
 case 0:
 return "LOCAL";
 case 1:
 return "MANUEL";
 case 2:
 return "AUTO";
 default :
 return "UNDEFINED";
 } 

Get-Numeric

As shown in Figure 2, we show a variable value on a selected object text object. Get-Numeric allows you to format and display a variable without writing code.

In Figure 2, on the right-hand form;

  • Default Value : The value to be displayed when there is no communication. (e.g. -1)

  • Format : Sets the display format of the changed value. You can set the amount of a decimal number, the decimal separator, the number of grouping of a number, the grouping separator, the prefix, the suffix of a variable.

Variable value is 739374.34656.

Group Size = 3 , Decimal = 2 , Group Seperator = ':' , Decimal Seperator = '@' , Leftpad Size = 10 , Character = 'X' , Rightpad Size = 10 , Character = 'B' , Prefix = 'TEST:' , Suffix = ':GOOD'

Output:

TEST:XXXXXXX739:374@35BBBBBBBB:GOOD

Get-Text

Used to show text on a selected text object as shown in Figure 5.

You should write the equivalent of your text in other languages. In case of changing the language in inSCADA, the corresponding text mimic will be displayed on the screen.

Condition-Value-Return : You can show different values according to the conditions that you specify on the variable value. You can add a condition by pressing the button. In the Condition section, you will be presented with the options you see in Figure 3. Interpretation of the example in Figure 3; Show the value 100 when the variable value is greater than 90.

Figure 1 : Animation Type Get-Expression
Figure 2 : Animation Type Get-Numeric
Figure 3 : Conditions
Figure 4 : Numeric Format
Figure 5 : Get Text