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
Item | Description | Script Usage Example |
---|---|---|
Save Alarm CSV | Saves 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
Item | Description | Script Usage Example |
---|---|---|
Add Row to Data Log | Adds a new row to a data log model using the current tag values. | datalog.addRow("Model") |
Save Data Log CSV | Saves 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 Log | Changes the start/stop status for the specified data log model. | datalog.start("Model") datalog.stop("Model") |
FTP
Item | Description | Script Usage Example |
---|---|---|
FTP Download | Downloads 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 Upload | Uploads 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 Server | Enables 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)
Item | Description | Script Usage Example |
---|---|---|
Logout User | Logs out the current IAM user. | system.logout() |
Open Login Window | Opens the built-in login window for IAM users. | system.openLoginWindow() |
Multimedia
Item | Description | Script Usage Example |
---|---|---|
Open PDF | Opens the specified PDF file in a separate view application. | system.file.openPdf(Storage.Project, "Folder/error_codes.pdf") |
Play Library Audio | Plays 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 Video | Plays the specified video file in a separate viewing application. Only available on eXT2 devices. | system.video.playFile(Storage.Project, "Folder/training.wav") |
Stop Library Audio | Stops the specified audio file if it is currently being played asynchronously. | system.audio.stopFile(Storage.Project, "Folder/buzzer.mp4") |
Page
Item | Description | Script Usage Example |
---|---|---|
Close Page | Closes the specified page. | page.close("Home") page.closeIndex(0) page.closePopupIndex(3) |
Open Page | Opens 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 Page | Opens the previously opened base page. | page.openPrevious() |
Recipe
Item | Description | Script Usage Example |
---|---|---|
Export Recipe CSV | Saves 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 CSV | Overwrites the current recipe data for the specified model using a CSV file. | recipe.importCsv("Mixtures", Storage.Usb, system.file.openDialog(Storage.Local)) |
Open Recipe Config | Opens the built-in recipe config window. | recipe.openConfig() |
Receive Recipe Record | Overwrites the specified record data using the current parameter tag values. | recipe.receiveRecord("Mixtures", tag.read("Index")) |
Send Recipe Record | Writes the values from the specified recipe record to the parameter tags. | recipe.sendRecord("Mixtures", tag.read("Index")) |
Schedule
Item | Description | Script Usage Example |
---|---|---|
Enable/Disable Schedule | Enables or disables a schedule. When disabled, a schedule will not perform its set action. | schedule.setEnable("Dump", true) |
Script
Item | Description | Script Usage Example |
---|---|---|
Call Script | Runs 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 Script | Creates a local custom script. |
Tag
Item | Description | Script Usage Example |
---|---|---|
Enter Tag Value | Opens 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 Value | Writes a constant value or another tag value onto the target tag. | tag.write("ID", 145.0) |
Toggle Tag Value | Inverts 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
Item | Description | Script Usage Example |
---|---|---|
Beep | Plays 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 Driver | Enables 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 Project | Closes the project and exits to the HMI desktop. | system.exit() |
Open Config Menu | Opens the runtime configuration menu. Note that the "Limit 3-Button Menu Access" option will be ignored. | system.openConfig() |
Open Frame Monitor | Opens the frame monitor tool for troubleshooting device communication. | system.openFrameMonitor() |
Press Key | Simulates a keyboard press event. Can be used to create virtual keyboard buttons. | keyboard.sendKeyEvent(0x01000000) |
Send Email | Sends 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 Notification | Displays a message in the notification bar at the bottom of the screen. | notification.send("Initialization complete", 3000) |
Set Translation Language | Sets the current language (column) for the multilanguage string feature. | system.setLanguage("English") |
Sleep | Suspends the script thread for the specified amount of time, then continues. | thread.sleep(1) thread.msleep(300) |