Other Expressions
DriverCommand | Control the driver of a specific I/O device with its commands and parameter values. | |
Function | Command | DriverCommand("DeviceName.StationName", Command, "Parameter") |
Script | DriverCommand("DeviceName.StationName", Command, "Parameter") | |
Description | Each communication driver supports different commands and parameters, so please refer to the help for the driver you want to use. |
DriverCommand Example - CmWebSMS
DriverCommand("SMS.STATION", 1, "MyGroup,7")
Send a message with message ID 7 to all members of the group named “Administration”.
DriverCommand("SMS.STATION", 3, "Brian,5")
Send a message with message ID 5 to a contact named “Hong Gil-dong”.
DriverCommand("SMS.STATION", 5, "01112345678,2")
Send a message with message ID 2 to the 011-1234-5678 phone number.
RunScript | Executes the assigned script. | |
Subroutine | Command | RunScript(“Script Name”) |
Script | RunScript “Script Name” | |
Description | Executes the assigned script. | |
Example | Executes the script “Temp”. RunScript(“Temp”) |
RunScriptEx | Executes the assigned script with tha parameter. | |
Subroutine | Command | RunScriptEx(“Script Name”, Option, Parameter) |
Script | RunScriptEx “Script Name”, Option, Parameter | |
Description | Executes the assigned script with tha parameter. If you specify 0 for the option, if the specified script is currently running, it performs no action. If you specify 1, if the specified script is running, run the script with the specified parameters after the script ends. The parameter is a number or string that is passed to the script. You can call the GetParameter function in that script to get the value passed to you. | |
Example | If the script 'ValueChange' is running, it will take no action. RunScriptEx(“ValueChange”,0,0) If you run the script “Temp” with the parameter “Cimon”, you can use the parameter “Cimon” by calling GetParameter() from within the script. RunScriptEx(“Temp”,0,”Cimon”) |
ReportOut | Prints out the assigned report model. | |
Subroutine | Command | ReportOut (“Model Name”) |
Script | ReportOut “Model Name” | |
Description | Prints out the assigned report model regardless of the output time. You can print the report even if the report model is not operating. The report model printed by the function is not saved as a file. | |
Example | Prints out the report model named “WaterTreatment”. ReportOut (“WaterTreatment”) |
FormatStr | Outputs the specified value as a string in the conversion format. | |
Subroutine | Command | FormatStr(“Conversion Format”,Value Type,Value) |
Script | n=FormatStr(“Conversion Format”,Value Type,Value) | |
Description | Outputs the specified value as a string in the Conversion Format. The conversion format is the same as the Format format in C, such as “%04d”, “%5.2f”, etc. However, there is a limit of one parameter. The value you want to convert is specified in the Value parameter. | |
Value Type | Value | |
0 | If the value you want to convert is a non-decimal integer | |
1 | If the value you want to convert is a real number with floating-point values | |
2 | If the value you want to convert is a string | |
Example | Converts “1823” to match the “%5.2f” format. n=FormatStr(“%5.2f”,0,1823) |
OpenPage | Displays the page during the project runtime. | |
Subroutine | Command | OpenPage (“Page name”) |
Script | OpenPage “Page name” | |
Description | This command opens the page window which is saved as “Page name”. | |
Example | Enter the command to display the“Page1” window. Open the GOOGLE main window. OpenPage("http://www.google.com") Display the GOOGLE main window at (top: 100, left: 200, width: 800, height: 600). OpenPage("http://www.google.com,position:100,200,800,600") |
OpenPageEx | Opens the item registered on the specified page, replacing it with the specified tag. | |
Subroutine | Command | OpenPageEx(“Page Name”,”Tag Name List”) |
Script | OpenPageEx “Page Name”,”Tag Name List” | |
Description | Opens the item registered on the specified page, replacing it with the specified tag. When editing a page, replace the items specified by $1, $2... Replace the items specified by $n with the tag names specified in the “Tag Name List”. Tag names are separated by commas (,). | |
Example | Replace the $1 and $2 items on Page1 with tags “AA” and “BB”, respectively, to display them on the current screen. OpenPageEx(“Page1”,”AA,BB”) |
ReplacePage | Replaces the current page with the specified page. | |
Subroutine | Command | ReplacePage (“Page name”) |
Script | ReplacePage “Page name” | |
Description | Replaces the current page with “Page name”. | |
Example | Replaces the current page with the “Page A” page. |
ReplacePageEx | Replaces the current page with the specified page, and replaces the registration entry with the specified tag. | |
Subroutine | Command | ReplacePageEx("New Page Name","Tag Name List") |
Script | ReplacePageEx "New Page Name","Tag Name List" | |
Description | Replaces the current page with the specified page, and replaces the registration entry with the specified tag. When editing a page, replace the items specified by $1, $2... Replace the items specified by $n with the tag names specified in the “Tag Name List”. Tag names are separated by commas (,). | |
Example | Replaces the $1 and $2 items on “Page1” with tags “AA” and “BB”, respectively, and display them on the screen. ReplacePageEx(“Page1”,”AA,BB”) |
RunApp | Run the specific application. | |
Subroutine | Command | RunApp(“File”, “Parameters”) |
Script | RunApp “File”, “Parameters” | |
Description | Runs a user's specific application. In the “File” field, enter the full path to the file, and in the “Parameters” field, enter the path to any files that are required to run, if any. (Caution) This command will only work on the computer running CimonX. | |
Example | Runs the Excel program and open the “Test.xlsx” file. RunApp(“C:\ProgramFiles\MicrosoftOffice\Office15\excel.exe”,”C:\Test.xlsx”) |
ProjectBackup | Backs up the files set in the Backup.ini file to the specified path. | |
Subroutine | Command | ProjectBackup(“Path”) |
Script | ProjectBackup “Path” | |
Description | Backs up the files set in the Backup.ini file to the specified “Path”. In the Backup.ini file, you can specify the files you want to back up. | |
Example | Backups files to Drive C. Projectbackup(“C:\”) |