Command Expression - Functional
In VBScript:
When a function does not return a value, parentheses are not used.
Example:AddTagEvent "TagName", "ScriptName"
When a function returns a value, parentheses must be used.
Example:result = AddTagEvent("TagName", "ScriptName")
In Python:
Parentheses must always be used regardless of whether the function returns a value.
Example:scada.AddTagEvent("TagName", "ScriptName")
Command | Command Type | Description | Command,Script, Return(Supported) |
---|---|---|---|
AlarmAck("Tag Name") | Alarm | This is used to acknowledge the alarm in an assigned tag. | Y,Y,N |
AlarmAckAll() | Alarm | This is used to acknowledge the all alarms. | Y,Y,N |
AlarmSound("Tag Name", "Sound File") | Alarm | This is used to register a sound file (Wave type) outputted when an alarm occurs in an assigned tag. | Y,Y,N |
GetAlarmCount(Alarm Level/Zone) | Alarm | This is used to inform the number of the current alarms corresponding to an alarm level or an alarm zone. | Y,Y,Y |
CommClearCount("Device Drivers Name") | Communication | This is used to clear an assigned device driver, station or all communication counters related to a whole system. | Y,Y,N |
CommRxCount("Device Drivers Name") | Communication | This is used to output the number of the tag values received from an assigned device driver, station or a whole system (Errors included) | Y,Y,Y |
CommRxErrCount("Device Drivers Name") | Communication | This is used to output the number of tag values received from a specified device, station, or the entire system, including the count of reception errors. | Y,Y,Y |
CommStatus("Device Drivers Name") | Communication | This is used to output the communication status for an assigned device driver or station. If the name of a device driver is not assigned, the communication status for a whole system will be outputted. | Y,Y,Y |
CommTxCount("Device Drivers Name") | Communication | This is used to output the number of the tag values written in an assigned device driver, station or a whole system. (Errors included) | Y,Y,Y |
CommTxErrCount("Device Drivers Name") | Communication | This is used to output the number of the sending errors in the number of tag values written in an assigned device driver, station or a whole system. | Y,Y,Y |
DriverCommand("Station Name", Command, "Parameter") | Communication | This is used to control the driver of a specific I/O device by the command language and parameter value of a corresponding driver. | Y,Y,N |
EnableDevice("Device Name", Run | Communication | This is used to run or stop the communication for an assigned drive or station. | Y,Y,N |
ModemConnect("Device Name", "Tel No", "Modem Initialization Command") | Communication | This is used to link a corresponding device to a modem through an assigned telephone number by using modem initialization command. | Y,Y,N |
ModemDisconnect("Device Name") | Communication | This is used to release the modem link to a corresponding device. | Y,Y,N |
DLogVal("Tag Name", "Time Value") | Data Logger | This is used to data logging it outputs the assigned time value when it corresponds. | Y,Y,Y |
ChangeEmbed("Page Name", “Object Name") | Display Control | This is used to display an assigned page on the 'Page Embeding' screen.(The object name is ‘View - Object Window - the number inside the brackets [ ]’) (Only for Command Expression) | Y,N,N |
ChangeEmbedEx("Page Name", "Object Name", "Tag Name List") | Display Control | This is used to display an assigned page as an assigned tag on the ‘Page Embeding' screen(The object name is ‘View - Object Window - the number inside the brackets [ ]’) (Only for Command Expression) | Y,N,N |
ClosePage("Page Name") | Display Control | This is used to close an assigned page. | Y,Y,N |
OpenPage("Page Name") | Display Control | This is used to open Popup page with assigned page. | Y,Y,N |
OpenPageEx("Page Name", "Tag Name List") | Display Control | This is used to display an assigned page as an assigned tag. (Only for Command Expression) | Y,N,N |
ReplacePage("Page Name") | Display Control | This is used to open web page with assigned page. | Y,Y,N |
ReplacePageEx("Page Name", "Tag Name List") | Display Control | This is used to open web page with assigned page as an assigned tag. (Only for Command Expression) | Y,N,N |
wcGridClearData("Page name.Object Name") | Display Control | Deletes data from the Input/output table. | Y,Y,N |
wcGridGetData("Page name.Object Name", col, row) | Display Control | This is used to inform the cell data of a Input/output table bbject. (String output) | Y,Y,Y |
wcGridGetRowCount("Page name.Object Name") | Display Control | This is used to inform the Row count of a Input/output table Object. (String output) | Y,Y,Y |
wcGridInsertData("Page name.Object Name", "DATA") | Display Control | This is used to add a new row to the Input/output table object.However, please note that the data format must be entered as follows.EX) DATA = ‘value1’,'value2’,'value3’,'value4’,'value5' | Y,Y,N |
wcGridSetData("Page name.Object Name", col, row, data) | Display Control | This is used to set up data in the specific cell of a Input/output table object. | Y,Y,N |
AddTagEvent("Tag Name", "Script Name") | Event | This is used to run an assigned script whenever the value of an assigned tag is changed. | Y,Y,N |
ManualEntry( "Tag Name", Value) | Event | This is used to set tag value on UltimateAccess Web’s memory only. This function does not write to a IO device. | Y,Y,N |
PulseOff("Tag Name", Pulse Width) | Event | This is used to Pulse-Off-output an assigned tag as much as a given pulse width (Unit: msec). | Y,Y,N |
PulseOn("Tag Name", Pulse Width ) | Event | This is used to Pulse-On-output an assigned tag as much as a given pulse width (Unit: msec). | Y,Y,N |
PulseTag("Tag Name", Pulse Width) | Event | This is used to pulse-output the value of an assigned tag as much as a given pulse width (Unit: msec). | Y,Y,N |
RemoveTagEvent("Tag Name") | Event | This is used to delete the tag event registered to an assigned tag. If this function is called, a script will not be run even the tag value is changed. | Y,Y,N |
TagAction("Tag Name") | Event | This is used to run the tag action registered to an assigned tag. | Y,Y,N |
LogIn | Login | Not supported in the current version (Update scheduled for version 1.0.17) |
|
LogInEx | Login | Not supported in the current version (Update scheduled for version 1.0.17) |
|
LogOut | Login | Not supported in the current version (Update scheduled for version 1.0.17) |
|
MinReportVal("Tag Name","Time Value","Value Type") | Minute Report | This is used to get values stored in the minute-by-minute report. | Y,Y,Y |
PlaySound("SoundFile Name") | Multimedia | This is used to run a sound file (wav format). | Y,Y,N |
PlaySoundEx("SoundFile Name", Number Of Repeat) | Multimedia | This is used to repeat running an assigned sound file (wav format) as much as the number of repeats. | Y,Y,N |
StopSound() | Multimedia | This is used to quit all the sound outputted. | Y,Y,N |
StopSoundEx("SoundFile Name") | Multimedia | This is used to quit the output of an assigned sound file. | Y,Y,N |
GetLineStatus(Line Number) | Network | This is used to inform the status of each line in case of network redundancy. | Y,Y,Y |
GetNodeStatus("Node Name") | Network | This is used to inform the link status of an assigned network node. If node status is normal, 1 will be outputted. Otherwise, 0 will be outputted. | Y,Y,Y |
GetNodeType() | Network | This is used to output in string as follows according to the current action mode of a system. | Y,Y,Y |
GetServerName(Server Name) | Network | This is used to output the name for an assigned server in string. | Y,Y,Y |
IsActiveServer("Node Name") | Network | This outputs 1, if an assigned node is active server. Otherwise, it outputs 0. | Y,Y,Y |
SwapServer() | Network | In case of redundancy system, active system and back-up system will be switched each other. | Y,Y,N |
CSqlClose("Query Name") | ODBC | The ‘Query Name’ is to be registered in SELECT Statement through the ODBC Manager. This function is used to execute a work by using Function CsqlOpen()and the functions related to various cursors. If no more work is needed, it will inform a system of finishing. | Y,Y,N |
CSqlDelete("Query Name") | ODBC | The ‘Query Name’ is to be registered in SELECT Statement through the ODBC Manager. Before this function is used, a SELECT Statement should be run by using CsqlOpen(). This function is used to delete the record that the cursor assigns at a called time from DBMS. | Y,Y,N |
CSqlFirst("Query Name") | ODBC | The ‘Query Name’ is to be registered in SELECT Statement through ODBC. Before this function is used, a SELECT Statement should be run by using CsqlOpen(). This function is used to move a current cursor to the record on the top. As the result, the field value for a new record is moved to the value of a linked tag. | Y,Y,N |
CSqlGetError("Query Name") | ODBC | This is used to check whether the ODBC functions executed just before(Ex., CSqlInsert, CSqlOpen … ) were executed normally. If normally executed, 0 is returned. If other value is returned, an error occurs. The error description for each return value is as follows. | Y,Y,Y |
CSqlGetRecord(“Query Name”, Record Number) | ODBC | Reads the data according to the assigned record number. | Y,Y,Y |
CSqlGetRecordNo(“Query Name”) | ODBC | Returns the number of active records in the database manager. | Y,Y,Y |
CSqlInsert("Query Name") | ODBC | The ‘Query Name’ is registered in SELECT Statement through the ODBC Manager. Before this function is used, a SELECT Statement should be run by using CsqlOpen().This function is used to make the tag values at a called time as the field values inked with each tag and to compose a new Record. And it is to register the Record to DBMS. | Y,Y,N |
CSqlLast("Query Name") | ODBC | The ‘Query Name’ is registered in SELECT Statement through the ODBC Manager. Before this function is used, a SELECT Statement should be run by using CsqlOpen().This function is used to move a current cursor to the last Record. At the result, the field value of a new Record is moved to the value of a linked tag. | Y,Y,N |
CSqlNext("Query Name") | ODBC | The ‘Query Name’ is registered in SELECT Statement through ODBC. Before this function is used, a SELECT Statement should be run by using CsqlOpen().This function is used to move a current cursor to the next Record. At the result, the field value of a new Record is moved to the value of a linked tag. | Y,Y,N |
CSqlOpen("Query Name") | ODBC | The ‘Query Name’ is registered in SELECT Statement through the ODBC Manager. This function is to be called before the function related to a cursor is used. Close by using Function CsqlClose() if necessary work is done. The functions related to a cursor include the reading functions for several Records gotten as the result of the execution of a SELECT sentence and the functions to delete, Insert, update and rerun the Record. | Y,Y,N |
CSqlPrev("Query Name") | ODBC | The ‘Query Name’ is registered in SELECT Statement through the ODBC Manager. Before this function is used, a SELECT Statement should be run by using CsqlOpen().This function is used to move a current cursor to the previous Record. At the result, the field value of a new Record is moved to the value of the linked tag. | Y,Y,N |
CSqlReconnect("DBMS Name") | ODBC | This is used to reconnect with DBMS. In case of the disconnection due to unexpected reasons while DBMS is used, the CIMON is to be reconnected with DBMS. | Y,Y,N |
CSqlRequery("Query Name") | ODBC | The ‘Query Name’ is registered in SELECT Statement through the ODBC Manager. Before this function is used, a SELECT Statement is to be run by using CsqlOpen().This function is used to rerun a corresponding SELECT Statement and to reread the Record in DBMS. | Y,Y,N |
CSqlRun("Query Name") | ODBC | The ‘Query Name’ is to be registered through the ODBC manager. This is used to run a query. | Y,Y,N |
CSqlSetWhere("Query Name", "WHERE clause") | ODBC | The 'Query Name' must be registered in the CIMON ODBC Configuration Manager, and the search conditions of this query can be modified. Only 'Select' type queries can be used. | Y,Y,Y |
CSqlUpdate("Query Name") | ODBC | The ‘Query Name’ is registered in SELECT Statement through the ODBC Manager. Before this function is used, a SELECT Statement is to be run by using CsqlOpen().This function is used to make the tag values at a called time as the field value linked to each tag, and to modify the Record that a cursor assigns to update this Record in DBMS. | Y,Y,N |
RawSqlRun("DBMS Name", "SQL Program" ) | ODBC | The ‘DBMS Name’ is to be registered in the ODBC manager. This is used to run a query about this DBMS. The query sentence(SQL) run is to be assigned to the second parameter by using double quotation marks. | Y,Y,N |
RecipeDialog() | Recipe | This is used to display the recipe control screen in CimonX execution mode. | Y,Y,Y |
RecipeDownload("Model Name", " Tag Group Name") | Recipe | This is used to download the recipe data for the specified tag group, functioning as the [Write] option in the recipe control screen. | Y,Y,N |
RecipeGetData("Model Name", "Field Name") | Recipe | This is used to bring the field value of a corresponding recipe model in current recipe memory. To use this function to a command expression, the data value brought from A1 = RecipeGetData(" Process 1", "Calcium") is to be matched with the corresponding tag(Real, Virtual tag) saved. | Y,Y,Y |
RecipeGetError() | Recipe | This is used to get recipe error count. | Y,Y,Y |
RecipeLoad("Model Name", "File Name") | Recipe | This is used to read the recipe settings from the specified file. | Y,Y,N |
RecipeSave("Model Name", "File Name", "Comment") | Recipe | This is used to save the current recipe values. | Y,Y,N |
RecipeSetData("Model Name", "Field Name", Description) | Recipe | This is used to set specific field value | Y,Y,N |
RecipeUpload("Model Name", "Group") | Recipe | This is used to upload the values of tags belonging to the specified tag group into the recipe, functioning as the [Read] option in the recipe control screen. | Y,Y,N |
EnableReport("Report Model Name", Execution/Stop) | Report | This is used to stop or run an assigned report model. | Y,Y,N |
ReportDialog | Report | The Print/Open Report dialog box is shown. This dialog box is used to reprint or to output the previous report file. (Only for Command Expression) | Y,N,N |
ReportOut("Report Model Name") | Report | An assigned report model is outputted immediately. | Y,Y,N |
ReportTimeStr("Time Value", Time Format) | Report | This is used to output the time for a report in a string according to time format. | Y,Y,Y |
TLogVal("Tag Name", "Time Value", "Value Type") | Report | This is used to output the data value for the report of an assigned tag. | Y,Y,Y |
GetParameter() | Script | This is used to get the parameters of the function passed to RunScriptEx. | N,Y,Y |
RunScript("Script Name") | Script | This is used to Run the specified script. | Y,Y,N |
RunScriptEx("Script Name", Option, Parameter) | Script | This is used toRuns the specified script, passing in parameters. | Y,Y,N |
StopScript(“ValueChange”) | Script | Stops the assigned script. | Y,Y,N |
EnableDataLog("Data Logging Model", Run | System | This is used to run or stop the data logging of a corresponding data-logging model. | Y,Y,N |
FormatStr("Conversion Form", Value Type, Value) | System | This is used to display an assigned value in a string, conforming to the conversion form. | Y,Y,Y |
GetCommentStr( idx, row, column) | System | This is used to string tell the CommentTable (String output) | Y,Y,Y |
GetTime("Time Display String") | System | This is used to output an assigned time in second. | Y,Y,Y |
ProjectBackup("Backup Folder") | System | This is used to back up set files in File Backup.ini through an assigned folder. The contents of File Backup.ini are set up in an assigned directory and file for Back-Up. | Y,Y,N |
ReadPrivateIni("Section", "Item", "File Name") | System | This is used to read and bring the item value of an corresponding section from an assigned file. | Y,Y,Y |
RunApp("Execution File", "Parameter") | System | This is used to run a specific application program. | Y,Y,N |
ShowAlarm() | System | This is used to show the "Alarm" window.(Only for Command Expression) | Y,N,N |
ShowDatabase() | System | This is used to show the "Database" window.(Only for Command Expression) | Y,N,N |
ShowDatalog() | System | This is used to show the "Data Logging" window.(Only for Command Expression) | Y,N,N |
ShowNetStatus() | System | This is used to show the "Communication Status" window.(Only for Command Expression) | Y,N,N |
ShowRunStatus() | System | This is used to show the "System status" monitoring window.(Only for Command Expression) | Y,N,N |
TimeConvert(Time Value, Time Format) | System | This is used to convert the assigned time value to other type according to format, and to output the result in a string. | Y,Y,Y |
TimeStr(Time Format) | System | This is used to output a current time value in the following strings according to assigned time format. | Y,Y,Y |
TimeToStr(Time Value, Time Format) | System | This is used to output an assigned time value in a string according to time format. | Y,Y,Y |
WritePrivateIni("Section", "Item", "Value", "File Name") | System | This is used to enter a value to the item of a section corresponding to an assigned file. | Y,Y,N |
GetTagVal("Tag Name") | Tag | This is used to output the current value of the tag specified in the input parameters. | N,Y,Y |
GetTagValEx("Tag Name","Tag Variable") | Tag | This is used to retrieve the tag variable value of the specified tag. | N,Y,Y |
SetTagVal("Tag Name", Value) | Tag | This is used to set a value for the specified tag. | N,Y,N |
SetTagValEx("Tag Name", "Tag variable", Value) | Tag | This is used to set a value for the tag variable of the specified tag. | N,Y,N |
GetPenStatus("Object Name", Pen Number) | Trend | This is used to output 1 when the specified Pen of the Trend Object is visible and 0 when it is not visible. | Y,N,Y |
GetTrendMode("Trend Object Name") | Trend | This is used to output 0 if the specified Trend Object is a RealTime trend, and 1 if it is a Historical trend. | Y,N,Y |
NextTrend("Trend Object Name", Movement Mode) | Trend | This is used to move forward by the collection cycle when the movement mode is 0, and to display the data one frame ahead when the movement mode is 1. | Y,N,N |
PrevTrend("Trend Object Name", Movement Mode) | Trend | This is used to move backward by the collection cycle when the movement mode is 0, and to display the data one frame earlier when the movement mode is 1. | Y,N,N |
SetPenStatus("Trend Name", Pen Number, Show/Hide) | Trend | This is used to set the specified Pen of the Trend Object to be visible (1) or not visible (0). | Y,N,N |
SetTrendMode("Object Name ", Trend Mode) | Trend | Sets the Trend mode as real-time Mode (1) or Historical Mode (1). | Y,N,N |
TrendGetPenVal("Trend Object Name", Pen Number, Value Type) | Trend | Outputs the values related to the specified Pen of the Trend Object. Return contents by value type: | Y,N,Y |
TrendSetPenVal("Trend Object Name", Pen Number, Value Type, Set Value) | Trend | Sets the values related to the specified Pen of the Trend Object. Return contents by value type: | Y,N,N |
ZoomTrend("Trend name", Zoom mode) | Trend | Zoom in or out on the display time of the specified Trend Object. Zoom modes by value type: 0: Zoom In, 1: Zoom Out | Y,N,N |
DbFindCount("Log DB Model Name") | User Data Table | Function that tells you how many records were retrieved after a DbFindRun. The return value is the number of records. | Y,Y,Y |
DbFindFirstItem("Log DB Model Name") | User Data Table | This is used to Moves the pointer to the earliest record in the retrieved records. The return value is the order of the records. | Y,Y,Y |
DbFindItemData("Log DB Model Name","Item Name") | User Data Table | This is used to Gets the value of the item at the current record pointer. | Y,Y,Y |
DbFindLastItem("Log DB Model Name") | User Data Table | This is used to Moves the pointer to the last record in the retrieved records. The return value is the order of the records. | Y,Y,Y |
DbFindNextItem("Log DB Model Name") | User Data Table | This is used to Moves from the current record pointer to the next record in the sequence. The return value is the sequence of records. | Y,Y,Y |
DbFindPrevItem("Log DB Model Name") | User Data Table | This is used to Moves from the current record pointer to the record in the previous order. The return value is the order of the records. | Y,Y,Y |
DbFindRun("Log DB Model Name") | User Data Table | This is used to performs a search with the search conditions set through DbSetFindTimeStr and DbSetFindFilter. If the search is successful, the return value is 0. | Y,Y,Y |
DbInsert("Log DB Model Name") | User Data Table | This is used to Save the moment by reading the tag value registered in the LogDB model | Y,Y,Y |
DbSetFindFilter("Log DB Model Name","Conditional Expression") | User Data Table | This is used to Sets the conditions for searching. Returns 0 if the conditional expression is valid, or non-zero if the conditional expression is invalid. For error values, see the error table | Y,Y,Y |
DbSetFindTime("Log DB Model Name", Start Time, End Time) | User Data Table | This is used to Set the time to search. | Y,Y,N |
DbSetFindTimeStr("Log DB Model Name","Start Time String","End Time String") | User Data Table | This is used to Set the time to search. | Y,Y,N |
AddUserEventLog("string variable") | User Event Log | This is used to set data in User event logging. | Y,Y,N |