Skip to content

Command Functions List

Command Functions Table

Note: USBs must be formatted in exFAT or FAT32 to be used with the eXT, nXT, and eXT2 series.

Note: when using Storage.Local as a storage location, the Xpanel refers to the path $DATA_PARTITION/home/user while the simulator refers to the path C:\Users\<user>.

Alarm

ItemDescriptionScript Usage Example
Save Alarm CSVSaves all alarm events for the specified label as a CSV file in the specified storage location.
If no label is specified, saves events for all labels.
Disclaimer: CIMON recommends exclusively using a USB or SD card for storage types.
alarm.createAllCsv(Storage.Local)

alarm.createCsv("Group::A", Storage.Local)

Data Log

ItemDescriptionScript Usage Example
Add Row to Data LogAdds a new row to a data log model using the current tag values.datalog.addRow("Model")
Save Data Log CSVSaves a CSV file of data log entries for the specified model and time range.datalog.createCsv("Model", Storage.Local)

datalog.createCsvForRange("Model", past, current, Storage.Local)
Start/Stop Data LogChanges the start/stop status for the specified data log model.datalog.start("Model")

datalog.stop("Model")

FTP

ItemDescriptionScript Usage Example
FTP DownloadDownloads a file from the source path on an FTP server to the target path on the HMI.
The target path is relative to the specified storage location on the HMI.
system.ftp.download({"server: "192.168.1.100", "port": 21, "username": "user", "password": "pass"}, Storage.Local, "remote_path", "path")
FTP UploadUploads a file from the source path on the HMI to the target path on an FTP server.
The source path is relative to the specified storage location on the HMI.
system.ftp.upload({"server": "192.168.1.100", "port": 21, "username": "user", "password": "pass"}, Storage.Local, "path", "remote_path")
Start/Stop FTP ServerEnables or disables the FTP server on the HMI
Note that the write access and location access are configured separately in the settings app on the HMI.
system.ftp.startServer()

system.ftp.stopServer()

IAM (Security)

ItemDescriptionScript Usage Example
Logout UserLogs out the current IAM user.system.logout()
Open Login WindowOpens the built-in login window for IAM users.system.openLoginWindow()

Multimedia

ItemDescriptionScript Usage Example
Open PDFOpens the specified PDF file in a separate view application.system.file.openPdf(Storage.Project, "Folder/error_codes.pdf")
Play Library AudioPlays the specified audio file once using the built-in audio port.
Previously sold CM-eXT07 and CM-nXT07 devices produced before November of 2024 do not support this feature.
system.audio.playFile(Storage.Project, "Folder/buzzer.mp4", true)
Play VideoPlays the specified video file in a separate viewing application.
Only available on eXT2 devices.
system.video.playFile(Storage.Project, "Folder/training.wav")
Stop Library AudioStops the specified audio file if it is currently being played asynchronously.system.audio.stopFile(Storage.Project, "Folder/buzzer.mp4")

Page

ItemDescriptionScript Usage Example
Close PageCloses the specified page.page.close("Home")

page.closeIndex(0)

page.closePopupIndex(3)
Open PageOpens a page.
Note: when opening a base page, the current base page will automatically be closed.
page.open("Safety")

page.openIndex(4)

page.openPopupIndex(2)
Open Previous PageOpens the previously opened base page.page.openPrevious()

Recipe

ItemDescriptionScript Usage Example
Export Recipe CSVSaves the recipe data for the specified model to a CSV file.recipe.exportCsv("Mixtures", Storage.Usb, system.file.saveDialog(Storage.Usb, "Mixtures.csv"))
Import Recipe CSVOverwrites the current recipe data for the specified model using a CSV file.recipe.importCsv("Mixtures", Storage.Usb, system.file.openDialog(Storage.Local))
Open Recipe ConfigOpens the built-in recipe config window.recipe.openConfig()
Receive Recipe RecordOverwrites the specified record data using the current parameter tag values.recipe.receiveRecord("Mixtures", tag.read("Index"))
Send Recipe RecordWrites the values from the specified recipe record to the parameter tags.recipe.sendRecord("Mixtures", tag.read("Index"))

Schedule

ItemDescriptionScript Usage Example
Enable/Disable ScheduleEnables or disables a schedule.
When disabled, a schedule will not perform its set action.
schedule.setEnable("Dump", true)

Script

ItemDescriptionScript Usage Example
Call ScriptRuns an existing script.
The script can be run in the same thread (synchronous) or a separate thread (asynchronous).
system.importScript("Initialize")

system.runScript("Initialize")
Insert Custom ScriptCreates a local custom script.

Tag

ItemDescriptionScript Usage Example
Enter Tag ValueOpens a built-in window for the user to enter a value and writes the value to the specified tag.keyboard.launchKeypad("ID", {"x": 0, "y": 0})
Set Tag ValueWrites a constant value or another tag value onto the target tag.tag.write("ID", 145.0)
Toggle Tag ValueInverts the value of a Boolean tag; writes true if the current value is false, or writes false if the current value is true.tag.write("isActive", !tag.read("isActive"))

Others

ItemDescriptionScript Usage Example
BeepPlays a beep sound for the specified amount of time using the HMI's built-in buzzer.system.staticBeep(true)
thread.msleep(50)
system.staticBeep(false)
Enable/Disable DriverEnables or disables the drive for an I/O device.
When disabled, no communication will be sent or received for that device.
drive.enable("PLC")

driver.disable("PLC")
Exit ProjectCloses the project and exits to the HMI desktop.system.exit()
Open Config MenuOpens the runtime configuration menu.

Note that the "Limit 3-Button Menu Access" option will be ignored.
system.openConfig()
Open Frame MonitorOpens the frame monitor tool for troubleshooting device communication.system.openFrameMonitor()
Press KeySimulates a keyboard press event.
Can be used to create virtual keyboard buttons.
keyboard.sendKeyEvent(0x01000000)
Send EmailSends an email with a hard-coded subject and message to the specific recipients.system.email.send({to: "support@cimoninc.com", cc: "", subject: "Communication Failure", body: "The HMI has lost communication with the PLC"})
Send Screen NotificationDisplays a message in the notification bar at the bottom of the screen.notification.send("Initialization complete", 3000)
Set Translation LanguageSets the current language (column) for the multilanguage string feature.system.setLanguage("English")
SleepSuspends the script thread for the specified amount of time, then continues.thread.sleep(1)

thread.msleep(300)