Command Line Parameter - Manual - Monitor - The SIMATIC Monitor. Enables you to monitor global variables on your PLC. - Monitor (mon),tool

Monitor CLI Tool (mon)

Portfolio
SIMATIC AX
Product
Monitor
Software version
1.6.5
Edition
01/2025
Language
English (original)
Package Name
@ax/mon

This section will list usage examples for passing the values for the parameter --symbols. The examples are based on the program above.

Basic type variables

# Monitor the variable myINT continuously. The variable is of the elementary data type INT.
apax mon --targetIP 192.168.0.1 --certificate ./cert.cer --password aSecurePassword --symbols "myINT" --continuously
# Result:
# myINT -> 5694
# Monitor the variables myINT and myLREAL once. The variables are elementary data types.
apax mon --targetIP 192.168.0.1 --certificate ./cert.cer --password aSecurePassword --symbols "myINT myLREAL"
# Result:
# myINT -> 5913
# myLREAL -> 3.14159

Arrays

# Monitor the array index 1 of mySimpleArray. The index represents a variable of the elementary data type BOOL.
apax mon --targetIP 192.168.0.1 --certificate ./cert.cer --password aSecurePassword --symbols "mySimpleArray[1]"
# Result:
# mySimpleArray[1] -> False
# Monitor the array index 1 of mySimpleArray. The index represents a variable of the elementary data type BOOL.
apax mon --targetIP 192.168.0.1 --certificate ./cert.cer --password aSecurePassword --symbols "mySimpleArray"
# Result:
# mySimpleArray:
#    mySimpleArray[0] -> True
#    mySimpleArray[1] -> False
#    mySimpleArray[2] -> True
#    mySimpleArray[3] -> False
#    mySimpleArray[4] -> False
#    mySimpleArray[5] -> False
#    mySimpleArray[6] -> False
#    mySimpleArray[7] -> False

When monitoring an array, the array is shown with all indices available according to the byte-alignment made by the ST Compiler. In the above example you can see that monitoring "mySimpleArray : ARRAY [0..2] OF BOOL" shows results for indices [0..7]. For further information regarding alignment of data-types please see Types and Variables.

# Monitor all array indexes of myArray. Each index represents a variable of the elementary data type INT.
apax mon --targetIP 192.168.0.1 --certificate ./cert.cer --password aSecurePassword --symbols "myArray"
# Result:
# myArray:
#    myArray[0,1] -> 1
#    myArray[0,2] -> 2
#    myArray[1,1] -> 0
#    myArray[1,2] -> 5
# Monitor all array indexes of the two dimensional mySimpleArray that are in line 0. Each index represents a variable of the elementary data type INT. 
apax mon --targetIP 192.168.0.1 --certificate ./cert.cer --password aSecurePassword --symbols "myArray[0,*]"
# Result:
# myArray[0,*]:
#    myArray[0,1] -> 1
#    myArray[0,2] -> 2

STRUCTs

# Monitor the instance MyMotor of the user defined type Motor. Each single field of the STRUCT will be displayed.
apax mon --targetIP 192.168.0.1 --certificate ./cert.cer --password aSecurePassword --symbols "myMotor"
# Result:
# myMotor:
#    myMotor.is_running -> True
#    myMotor.power_consumption -> 10
#    myMotor.hours_operating -> 7220
# Monitor the field 'is_running' of the instance MyMotor which is of the user defined type Motor.
apax mon --targetIP 192.168.0.1 --certificate ./cert.cer --password aSecurePassword --symbols "myMotor.is_running"
# Result:
# myMotor.is_running -> True

CLASSes

# Monitor all variables from the instance myConveyor which is of the type CLASS Conveyor.
# The access modifiers PRIVATE, INTERNAL, PUBLIC are not influencing the monitoring.
apax mon --targetIP 192.168.0.1 --certificate ./cert.cer --password aSecurePassword --symbols "myConveyor"
# Result:
# myConveyor:
#    myConveyor.Motor1.is_running -> False
#    myConveyor.Motor1.power_consumption -> 0
#    myConveyor.Motor1.hours_operating -> 0
#    myConveyor.Motor2.is_running -> False
#    myConveyor.Motor2.power_consumption -> 0
#    myConveyor.Motor2.hours_operating -> 0
#    myConveyor.is_running -> False
# Monitoring the nested STRUCT Motor1 inside the instance myConveyor which is of the type CLASS Conveyor.
apax mon --targetIP 192.168.0.1 --certificate ./cert.cer --password aSecurePassword --symbols "myConveyor.Motor1"
# Result:
# myConveyor.Motor1:
#    myConveyor.Motor1.is_running -> True
#    myConveyor.Motor1.power_consumption -> 0
#    myConveyor.Motor1.hours_operating -> 0
# Monitoring the variable 'hours_operating' which is a field of the nested STRUCT Motor1 inside the instance myConveyor which is of the type CLASS Conveyor.
apax mon --targetIP 192.168.0.1 --certificate ./cert.cer --password aSecurePassword --symbols "myConveyor.Motor1.hours_operating"
# Result:
# myConveyor.Motor1.hours_operating -> 0

Absolute addresses

# Monitorig the input at address 0. Monitor the following 16 Bits. Interpret them as an integer.
apax mon --targetIP 192.168.0.1 --certificate ./cert.cer --password aSecurePassword --symbols "%IW0:int"
# Result:
# %IW0:int -> 0

Static variables

# Monitor the static variable of Program P1 continuously with a static variable myFBWithStatic of type FBWithStaticVariable having a static variable myVarStaticInt. The variable is of the elementary data type INT.
apax mon --targetIP 192.168.0.1 --certificate ./cert.cer --password aSecurePassword --symbols "P1.myFBWithStatic.myVarStaticInt" --continuously
# Result:
# P1.myFBWithStatic.myVarStaticInt -> 42