Working with Commonly Used Functions
- Last UpdatedJul 18, 2023
- 4 minute read
Cicode has many functions that perform a variety of tasks. Many of these are used for building complex Plant SCADA systems. The functions you will often use are divided into six categories:
Alarm Functions
You can use alarm functions to display alarms and their related alarm help pages, and to acknowledge, disable, and enable alarms. You can assign a privilege to each command that uses an alarm function, so that only an operator with the appropriate privilege can perform these commands. However, you should assign privileges to commands only if you have not assigned privileges to individual alarms.
-
AlarmAck: Acknowledges an alarm. The alarm where the cursor is positioned (when the command is executed) is acknowledged. You can also use this function to acknowledge multiple alarms.
-
AlarmComment: Adds a comment to the alarm summary entry at run time. The comment is added to the alarm where the cursor is positioned when the command is executed. A keyboard argument passes the comment into the function. Verify that the length of the comment does not exceed the length of the argument, or an error results.
-
AlarmDisable: Disables an alarm. The alarm where the cursor is positioned (when the command is executed) is disabled. You can also use this function to disable multiple alarms.
-
AlarmEnable: Enables an alarm. The alarm where the cursor is positioned (when the command is executed) is enabled. You can also use this function to enable multiple alarms.
-
AlarmHelp: Displays an alarm help page for the alarm. Each alarm in your system can have an associated help page. The help page for the alarm at the position of the cursor (when the command is executed) is displayed.
Page Functions
With the page functions, you can display your graphics pages and the standard alarm pages.
Note: The following page functions are not supported in the server process in a multiprocessor environment. Calling page functions from the server process results in a hardware alarm being raised.
-
PageAlarm: Displays current alarms on the alarm page configured in the project.
-
PageDisabled: Displays disabled alarms on the alarm page configured in the project.
-
PageDisplay: Displays a new page on the screen. The Page name or number is required as an argument. (Use the PageLast() function to go back to the last page - the page that this new page replaced).
-
PageFile: Displays a file on the file page configured in the project.
-
PageGoto: Displays a new page on the screen. This function is similar to the PageDisplay() function, except that if PageLast() is called, it does not return to the last page.
-
PageHardware: Displays hardware alarms on the alarm page configured in the project.
-
PageLast: Displays the graphics page that was displayed before the current one. You can use this function to 'step back' through the last ten pages.
-
PageNext: Displays the next graphics page (defined in the Next Page property of the Pages form).
-
PagePrev: Displays the previous graphics page (defined in the Prev Page property of the Pages form).
-
PageSOE: Displays a category of sequence of events (SOE) entries on the SOE page.
-
PageSummary: Displays summary alarm information on the alarm page configured in the project.
-
PageTrend: Displays a standard trend page.
Keyboard Functions
Keyboard functions control the processing of keyboard entries and the movement of the keyboard cursor on the graphics page.
-
KeyBs: Backspaces (removes) the last key from the key command line. Use this function with a 'Hotkey' command. It is normally used to erase keyboard characters during runtime command input.
-
KeyDown: Moves the cursor down the page to the closest animation point number (AN).
-
KeyLeft: Moves the cursor left (across the page) to the closest animation point number (AN).
-
KeyRight: Moves the cursor right (across the page) to the closest animation point number (AN).
-
KeyUp: Moves the cursor up the page to the closest animation point number (AN).
Report Functions
To run a report by operator action, use the following function:
-
Report: Runs the report on the report server.
Time/date Functions
The following functions return the current date and time:
-
Date: Returns the current date as a string.
-
Time: Returns the current time as a string.
Miscellaneous Functions
-
Beep: Beeps the speaker on the Plant SCADA computer.
-
FullName: Returns the full name of the user who is currently logged in to the system.
-
InfoForm: Displays the animation information form. This form displays the real-time data that is controlling the current animation.
-
Login: Allows a user access to the Plant SCADA system.
-
LoginForm: Displays a dialog box to allow a user to log in to the system.
-
Logout: Logs the current user out of the Plant SCADA system.
-
Name: Returns the user name of the user who is currently logged in to the system.
-
Prompt: Displays a message on the screen. The message String is supplied as an argument to the function.
-
Shutdown: Terminates Plant SCADA. Use this function, or the ShutdownForm() function, to shut down your system. Otherwise buffered data may be lost.
-
ShutdownForm: Displays a dialog box to allow a user to shut down your Plant SCADA system.