Learn INDUSOFT-WEB-STUDIO with Real Code Examples
Updated Nov 27, 2025
Code Sample Descriptions
1
Hello World Script
MsgBox "Hello World from InduSoft Web Studio!"
A simple script that displays a message box in InduSoft.
2
Tag Control Script
If StartButton = 1 Then
MotorOutput = 1
Else
MotorOutput = 0
End If
Turns on a motor tag when a start button tag is active.
3
Increment Counter Tag
CounterTag = CounterTag + 1
Increment a counter tag by 1 each time a script is executed.
4
Toggle Boolean Tag
If LightTag = 0 Then
LightTag = 1
Else
LightTag = 0
End If
Toggle a boolean output tag on each execution.
5
Conditional Alarm Trigger
If TempTag > 80 Then
AlarmTag = 1
Else
AlarmTag = 0
End If
Trigger an alarm tag when a temperature tag exceeds 80.
6
Slider Control for Speed Tag
MotorSpeedTag = SpeedSliderTag
Set a motor speed tag based on a slider input tag.
7
Log Event to Tag
LogTag = Now & " - Button Pressed"
Write a timestamped message to a string tag for logging.
8
Read Multiple Tags
TotalFlow = FlowTag1 + FlowTag2
Read two tags and perform a calculation.
9
Conditional Output Based on Multiple Tags
If StartButton = 1 And SafetyOk = 1 Then
MotorOutput = 1
Else
MotorOutput = 0
End If
Set an output tag based on two input conditions.
10
Simple Loop to Initialize Tags
Dim i
For i = 1 To 10
Tag("Output" & i) = 0
Next
Loop through an array of tags and initialize them to 0.