Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

DriverCommand()

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

Anchor
RunScript
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.pngImage Added

RunScriptEx()

Anchor
RunScriptEx
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.pngImage Added

ReportOut()

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

Anchor
FormatStr
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)