Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

DriverCommand()

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()

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”)

image-20241017-052837.png

RunScriptEx()

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”)

image-20241016-052657.png

ReportOut()

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()

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()

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.
OpenPage (“Page1”)

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()

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()

ReplacePage

Replaces certain pages which is specified by the operator.

Subroutine

Command

ReplacePage (“Page name 1”, “Page name 2”)

Script

ReplacePage “Page name 1”, “Page name 2”

Description

This command is used to replace “Page name 1“ window with “Page name 2” window.
The size and position of the new page are set automatically as same as those of the old page.
If you enter an asterisk (“*”) instead of “Page name 1”, all windows will be closed at once, and the “Page name 2” window will be opened.

Example

Enter the command to replace the “Page A” window with “Page B” window.
ReplacePage (“Page A”, “Page B”)

ReplacePageEx()

ReplacePageEx

Replaces the registered items with the tags you specify and displays them on the screen.

Subroutine

Command

ReplacePageEx("Current Page Name",

"New Page Name","Tag Name List")

Script

ReplacePageEx "Current Page Name",

"New Page Name","Tag Name List"

Description

Replaces items registered on a new page with the tags you specify and displays them on the screen.

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 Page2 with tags “AA” and “BB”, respectively, and display them on the screen.

ReplacePageEx(“Page1”,“Page2”,”AA,BB”)

RunApp()

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()

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.

image-20241021-072945.png

Example

Backups files to Drive C.

Projectbackup(“C:\”)

  • No labels