Getting Started > What's New in v7.x > What's New in CitectSCADA v7.0 > Cicode Functions

Cicode Functions in v7.0

Some Cicode functions have been introduced, modified, deprecated or removed. The following sections detail the changes made to these functions:

New Functions

Miscellaneous Functions

AccControl

Controls accumulators for example motor run hours.

AccumBrowseClose

Closes an accumulator browse session.

AccumBrowseFirst

Gets the oldest accumulator entry.

AccumBrowseGetField

Gets the field indicated by the cursor position in the browse session.

AccumBrowseNext

Gets the next accumulator entry in the browse session.

AccumBrowseNumRecords

Returns the number of records in the current browse session.

AccumBrowseOpen

Opens an accumulator browse session.

AccumBrowsePrev

Gets the previous accumulator entry in the browse session.

ProcessIsClient

Determines if the currently executing process contains a Client component

ProcessIsServer

Determines if the currently executing process contains a particular server component.

ServiceGetList

Gets information about services running in the component calling this function.

Alarm Functions:

AlarmDspLast

Displays the latest unacknowledged alarms.

AlmSummaryAck

Acknowledges the alarm at the current cursor position in an active data browse session.

AlmSummaryClear

Clears the alarm at the current cursor position in an active data browse session.

AlmSummaryClose

Closes an alarm summary browse session.

AlmSummaryCommit

Commits the alarm summary record to the alarm summary device.

AlmSummaryDelete

Deletes alarm summary entries from the browse session.

AlmSummaryDeleteAll

Deletes alarm summary entries from the browse session.

AlmSummaryDisable

Disables the alarm at the current cursor position in an active data browse session.

AlmSummaryEnable

Enables the alarm at the current cursor position in an active data browse session.

AlmSummaryFirst

Gets the oldest alarm summary entry.

AlmSummaryGetField

Gets the field indicated by the cursor position in the browse session.

AlmSummaryLast

Places the data browse cursor at the latest summary record from the last cluster of the available browsing cluster list.

AlmSummaryNext

Gets the next alarm summary entry in the browse session.

AlmSummaryOpen

Opens an alarm summary browse session.

AlmSummaryPrev

Gets the previous alarm summary entry in the browse session.

AlmSummarySetFieldValue

Sets the value of the field indicated by the cursor position in the browse session.

AlmTagsAck

Acknowledges the alarm tag at the current cursor position in an active data browse session.

AlmTagsClear

Clears the alarm tag at the current cursor position in an active data browse session.

AlmTagsDisable

Disables the alarm tag at the current cursor position in an active data browse session.

AlmTagsEnable

Enables the alarm tag at the current cursor position in an active data browse session.

AlmTagsFirst

Gets the oldest alarm tags entry.

AlmTagsGetField

Gets the field indicated by the cursor position in the browse session.

AlmTagsNext

Gets the next alarm tags entry in the browse session.

AlmTagsNumRecords

Returns the number of records in the current browse session.

AlmTagsOpen

Opens an alarm tags browse session.

AlmTagsPrev

Gets the previous alarm tags entry in the browse session.

Super Genie Functions

AssGetProperty

Gets association information about the current Super Genie from the datasource

AssGetScale

Gets scale information about the associations of the current Super Genie from the datasource

AssInfoEx

Replaces the AssInfo function and supports online changes.

Cluster Functions

ClusterActivate

Allows the user to activate an inactive cluster.

ClusterDeactivate

Allows the user to deactivate an active cluster.

ClusterFirst

Allows the user to retrieve the first configured cluster in the project.

ClusterIsActive

Allows the user to determine if a cluster is active.

ClusterNext

Allows the user to retrieve the next configured cluster in the project.

ClusterServerTypes

Allows the user to determine which servers are defined for a given cluster.

ClusterStatus

Allows the user to determine the connection status from the client to a server on a cluster.

ClusterSwapActive

Allows the user to deactivate an active cluster at the same time as activating an inactive cluster.

I/O Device Functions

SubscriptionAddCallback

Adds a callback function to a tag subscription.

SubscriptionGetAttribute

Reads an attribute value of a tag subscription.

SubscriptionRemoveCallback

Removes a callback function from a tag subscription

TagGetProperty

Gets a property for a variable tag from the datasource.

TagGetScale

Gets the value of a tag at a specified scale from the datasource

TagSubscribe

Subscribes a tag for periodic monitoring and event handling.

TagUnsubscribe

Unsubscribes a tag for periodic monitoring and event handling.

Tag Functions

TagInfoEx

Supports online changes.

TagWriteEventQue

Opens the tag write event queue.

Task Functions

TaskCluster

Gets the name of the cluster context in which the current task is executing

Trend Functions

TrnBrowseClose

Closes a trend browse session.

TrnBrowseFirst

Gets the oldest trend entry.

TrnBrowseGetField

Gets the field indicated by the cursor position in the browse session.

TrnBrowseNext

Gets the next trend entry in the browse session.

TrnBrowseNumRecords

Returns the number of records in the current browse session.

TrnBrowseOpen

Opens a trend browse session.

TrnBrowsePrev

Gets the previous trend entry in the browse session.

TrnGetCluster

Gets the name of the cluster the trend graph is associated with.

TrnGetPenComment

Gets the comment of a trend pen.

Report Functions

RepGetCluster

Retrieves the name of the cluster the report is running on.

ModifiedFunctions

Alarm Functions

AlarmAck

Acknowledges alarms.

AlarmAckRec

Acknowledges alarms by record number

AlarmActive

Determines if any alarms are active in the user's area.

AlarmClear

Clears acknowledged, inactive alarms from the active alarm list.

AlarmClearRec

Clear an alarm by its record number

AlarmDelete

Deletes alarm summary entries.

AlarmDisable

Disables alarms.

AlarmDisableRec

Disables alarms by record number

AlarmDsp

Displays alarms.

AlarmDspLast

Displays the latest unacknowledged alarms.

AlarmEnable

Enables alarms.

AlarmEnableRec

Enables alarms by record number

AlarmFirstTagRec

Searches for the first occurrence of an alarm tag, name, and description

AlarmGetDelayRec

Gets the delay setting for an alarm via the alarm record number

AlarmGetFieldRec

Gets alarm field data from the alarm record number

AlarmGetThresholdRec

Gets the thresholds of analog alarms by the alarm record number

AlarmNextTagRec

Searches for the next occurrence of an alarm tag, name, and description.

AlarmNotifyVarChange

Activates a time-stamped digital or time-stamped analog alarm

AlarmSumAppend

Appends a new blank record to the alarm summary.

AlarmSumCommit

Commits the alarm summary record to the alarm summary device.

AlarmSumDelete

Deletes alarm summary entries.

AlarmSumFind

Finds an alarm summary index for an alarm record and alarm on time.

AlarmSumFirst

Gets the oldest alarm summary entry.

AlarmSumGet

Gets field information from an alarm summary entry.

AlarmSumLast

Gets the latest alarm summary entry.

AlarmSumNext

Gets the next alarm summary entry.

AlarmSumPrev

Gets the previous alarm summary entry.

AlarmSumSet

Sets field information in an alarm summary entry.

AlarmSumSplit

Duplicates an alarm summary entry.

AlarmSumType

Retrieves a value that indicates a specified alarm's type.

I/O Device Functions

DriverInfo

Provides information about the driver for a particular I/O Device.

IODeviceControl

Provides control of individual I/O Devices.

IODeviceInfo

Gets information on an I/O Device.

Miscellaneous Functions

AccControl

Controls accumulators for example motor run hours.

ServerInfo

Gets client and server information.

ServerInfoEx

Gets client and server information from a specified process in a multiprocessor environment.

Shutdown

Ends CitectSCADA's operation.

Report Functions

RepGetControl

Gets report control information.

Report

Runs a report.

RepSetControl

Sets report control information.

SPC Functions

SPCAlarms

Returns the status of the specified SPC alarm.

SPCProcessXRSGet

Gets the process mean, range and standard deviation overrides.

SPCProcessXRSSet

Sets the process mean, range and standard deviation overrides.

SPCSpecLimitGet

Gets the specification limits (USL and LSL) for the specified tag.

SPCSpecLimitSet

Sets the specification limits (USL and LSL) for the specified tag.

SPCSubgroupSizeGet

Gets the size of a subgroup for the specified SPC tag.

SPCSubgroupSizeSet

Sets the subgroup size for the specified SPC tag.

Super Genie Functions

Ass

Associates a variable tag with a Super Genie.

AssPage

Associates up to eight variable tags with a Super Genie and displays the Super Genie in the current window.

AssPopUp

Associates up to eight variable tags with a Super Genie and displays the Super Genie in a popup window.

AssTag

Associates a variable tag with the current Super Genie. The association will be created for the current Super Genie only, and will only come into effect after you re-display the Super Genie.

AssVarTags

Associates up to eight variable tags with a Super Genie. This association is only made for the next Super Genie you display (either in the current window or in a new window). You can use this function repeatedly to associate more than 8 variable tags to a Super Genie.

AssWin

Associates up to eight variable tags with a Super Genie, and displays the Super Genie in a new window.

Tag Functions

TagGetProperty

This function reads a property of a variable tag from the datasource

TagGetScale

Gets the value of a tag at a specified scale from the datasource

TagRamp

This function will increment a Tag by the amount defined by iPercentInc

TagRead

Reads a variable from the I/O Device

TagScaleStr

Gets the value of a tag at a specified scale

TagWrite

Writes to an I/O Device variable by specifying the variable tag.

Task Functions

MsgOpen

Opens a message session with a CitectSCADA server or client.

Trend Functions

TrendDspCursorTag

Displays the tag name of the current pen.

TrnAddHistory

Restores an old history file to the trend system.

TrnDelHistory

Deletes an old history file from the trend system.

TrnEventSetTable

Sets trend data from a table, for a specified trend tag.

TrnEventSetTableMS

Sets event trend data and time data (including milliseconds) for a specified trend tag.

TrnFlush

Flushes the trend to disk.

TrnGetDefScale

Gets the default engineering zero and full scales of a trend tag.

TrnGetPen

Gets the trend tag of a pen.

TrnGetTable

Stores trend data in an array.

TrnInfo

Gets the configured values of a trend tag.

TrnNew

Creates a new trend at run time.

TrnSelect

Sets up a page for a trend.

Window Functions

WinCopy

Copies the active window to the Windows clipboard.

WinFile

Writes the active window to a file.

WinNewAt

Opens a new display window at a specified location, with a selected page displayed.

WinPrint

Prints the active window.

Osolete Functions

Cluster Functions

ClusterGetName

Returns the names of the primary and standby cluster servers.

ClusterSetName

Connects to a specific cluster server.

Display Functions

DspCol

Displays a color at an AN.

Task Functions

ReRead

Causes CitectSCADA to re-read the I/O Device data associated with the current Cicode task.

Tags are now subscribed at the start of a function and updated tag values are sent to the subscribing function.

Tag subscriptions are made at the update rate of:

  • the graphics page if called from a page
  • the default subscription rate as determined by [Code]TimeData in the Parameters online help if called from Cicode (default 250 ms)
  • the update rate requested of a task created using TaskNewEx
  • the update rate requested of a subscription created using TagSubscribe

Verify that the subscription update rate matches the requirements of your function.

After removing ReRead from looping code you may need to extend the period of the Sleep function.

This is to replace the pause ReRead created while it read the tag values.