# Basics of SCADA HMI scripting

**URL:** <https://forumautomation.com/t/basics-of-scada-hmi-scripting/380>\
**Category:** Industrial Automation\
**Created:** [March 31, 2015, 10:55pm UTC](https://forumautomation.com/t/basics-of-scada-hmi-scripting/380 "2015-03-31T22:55:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![denizen](https://forumautomation.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@denizen](https://forumautomation.com/u/denizen)\
**Post date:** [March 31, 2015, 10:55pm UTC](https://forumautomation.com/t/basics-of-scada-hmi-scripting/380/1 "2015-03-31T22:55:16Z")

</div>

Basics of SCADA / HMI scripting.

Number of SCADA / HMI devevlopment softwares are available in markert nowadays . The basics of scripting is same irrespective of manufacturer . I would like to give some brief idea about scripting.

Different types of Data types used in SCADA/HMI Scripting

Numeric Data String Arrays Etc…

Arithmetic operators used in SCADA / HMI scripting

^ Exponention

- Negation

- Multiplication / Division % Modulus Division

- Addition

- Subtraction ++ Incrementation – Decrementation

Relational operators used in SCADA/ HMI Scripting

== IS EQUAL TO

> Greater than \< Less than = Greater than or equal to \<= Less than or equal to != Not equal to

Assignement Statement

SET TO

Measn Variable = Expression

Flow Control Statement used in SCADA / HMI Scripting

IF - THEN statement FOR-NEXT Loop WHILE Loop BREAK Statement CONTINUE EXIT

FOR NEXT loop

Used to execute a list of statements a given number of satement

Sysntax for FOR - NEXT Statement

FOR = TO /\* Statement lsit goes here \*/

NEXT []

Example :

FOr x = 1 TO 10 STEP 2 Print X // Print odd numbers NEXT

IF - THEN

Conditional statement

IF statement is true it will execute the expression 1

Else it will execute expression 2.

Example

If A=0

THEN B= C

ELSE B\*C

END IF.

BREAK Statement

Used to get out of a FOR NEXT or WHILE loop immediately

EXIT STATEMENT

Used to stop a script

Share more about SCADA / HMI Scripting

Plese share more information about SCADA scripting
