Learn GE-IFIX with Real Code Examples
Updated Nov 27, 2025
Code Sample Descriptions
1
Hello World Message in iFIX
MsgBox "Hello World from iFIX!"
Show a simple message box in iFIX using VBScript.
2
Increment a Tag Value
Dim val
val = CInt(TagRead("Counter"))
val = val + 1
TagWrite "Counter", val
Increment an integer tag value when a button is pressed.
3
Toggle Boolean Tag
Dim current
current = CBool(TagRead("LightOn"))
TagWrite "LightOn", Not current
Toggle a boolean tag (like a light) from a button click.
4
Display Tag in Label
Dim level
level = TagRead("TankLevel")
SetTextLabel "LevelLabel", CStr(level)
Read a tag and display its value in a text label.
5
Alarm Acknowledge Script
Call AlarmAck("HighLevelAlarm")
A button script to acknowledge active alarms.
6
Set Multiple Tags
TagWrite "MotorStart", True
TagWrite "MotorSpeed", 50
Write multiple tag values at once.
7
Slider Control for Speed
Dim speed
speed = GetSliderValue("SpeedSlider")
TagWrite "MotorSpeed", speed
Bind a slider to update a speed tag.
8
Log Button Clicks
Dim logEntry
logEntry = Now & " Button clicked"
Call WriteToLog("ButtonLog", logEntry)
Append a log entry whenever a button is clicked.
9
Read Multiple Tags into Array
Dim tags(2), values(2)
tags(0) = "TankLevel"
tags(1) = "PumpStatus"
Dim i
For i = 0 To 1
values(i) = TagRead(tags(i))
Next
Read several tags and store their values in an array.
10
Conditional Action Based on Tag
Dim temp
temp = TagRead("TankTemp")
If temp > 80 Then
TagWrite "CoolerOn", True
Else
TagWrite "CoolerOn", False
End If
Perform actions based on a tag value.