Statements Used With the Statistics Feature

This section describes four statements used in conjunction with the Statistics feature. The statements are CLOSE_LOG, SEND_DATA_TO, SEND_LABEL_TO, and SETUP_LOG.

NOTE: You must start the Statistics server before you can start a sequence with any of the statements defined in the Statistics package. See Starting the Statistics Server for details.

CLOSE_LOG Statement

This statement provides a way to close a channel connection from a runtime task or a control sequence.

The syntax is:

	CLOSE_LOG CHANNEL --log channel--  

Double-click --log channel-- to enter the log channel that you wish to close.

SEND_DATA_TO Statement

This statement provides a way to send up to eight data values to a channel to be logged.

The syntax is:

SEND_DATA_TO CHANNEL --log channel-- {OPTIONAL --yes/no--}
{MODE --log mode--} {SAVE_CURRENT --yes/no--} {1:
--variable--} {2: --variable--}...{8: --variable--} 

Double-click --log channel-- to enter the log channel to which you wish to send data. You can choose from six channels: 1 through 4, A, or B.

If OPTIONAL is set to "yes", the statement will not report any error upon failure.

Double-click --log mode-- to enter the mode used to report the value. You can select one of the following:

The log mode remains set for all calls to the statement until you specify another mode.

NOTE: If you are in the "difference" mode and no value was previously saved, the current value is used as the saved value. In this case, the first output data is always zero.

If SAVE_CURRENT is set to "yes", the current data value is saved in the local cache. If the statement is called with the difference mode enabled, the new data value is subtracted from the saved value, and the result is sent to the server.

The optional variables (1 through 8) contain the values to be sent to each field.

SEND_LABEL_TO Statement

This statement provides a way to send data containing the labels for each field to a log channel from a runtime sequence.

The syntax is:

SEND_LABEL_TO CHANNEL --log channel-- {OPTIONAL --yes/no--}
{USE_VAR_NAME --yes/no--} {1: --variable--} {2:
--variable--} ... {8: --variable--} 

Double-click --log channel-- to enter the log channel to which you wish to send data. You can choose from six channels: 1 through 4, A, or B.

If OPTIONAL is set to "yes", the statement will not report any error upon failure.

If USE_VAR_NAME is set to "yes" the record name of the variable is used as the label. If this is set to "no", the variables given are assumed to be string variables, and the contents of the variables are used as the labels.

The optional variables (1 through 8) contain either the labels for the fields, or the variable names that are used as the labels.

SETUP_LOG Statement

This statement provides a way to connect a log channel to either a file or a serial line from a runtime or control sequence.

CAUTION: If connecting to a file that already exists, the existing file will be deleted automatically before the connection is made.

The syntax is:

SETUP_LOG CHANNEL --log channel-- {CONNECT TO --string
variable--} {FIELDS_(1-8) --constant--} {STATUS
--o_variable--} {TIMEOUT --variable--} {OPTIONAL --yes/no--} 

Double-click --log channel-- to enter the log channel that you wish to connect to either a file or a serial line.

Double-click --string variable-- to enter the name of the file to which you wish to connect. Any string variable can be used as a file name or serial line representation.

Double-click --constant-- to enter the number of data values being sent to the log channel. If this field is not defined, a maximum of eight fields is used.

Double-click --o_variable-- to store the status of the log channel connection.

Double-click --variable-- to define the maximum time (in seconds) for the statement to wait for the "connection complete" signal from the Statistics server. The default value is 5 seconds.

If OPTIONAL is set to "yes", the statement will not report any error upon failure.