analog

analog — creates a point of type analog.

Synopsis

       
(analog  enable_flag  name  address  read_write_mode  cycle_millisecs
 exception_flag  raw_min  raw_max  eng_unit_min  eng_unit_max)
	

Parameters

enable_flag

The initial value of the enabled status of the point. t will cause the point to be initially enabled. f will cause the point to be initially disabled. (see enable and disable commands).

name

The name of the point.

address

The address of the raw data. The address has the form:

device : buffer : word_offset [. bit [.bit_width]]

(See Points in the Data Model section of the System Overview.)

read_write_mode

R, W, or RW (case-insensitive) to specify the point as read-only, write-only, or read-write respectively.

cycle_millisecs

The cycle (or heartbeat) time in milliseconds associated with the point, upon which automatic reading or writing is performed. Typically, points are read or written in groups, and the individual cycle time for each point is set to 0.

exception_flag

If set, the point is registered for exceptions with the Cascade DataHub (if active).

raw_min

The minimum raw field value of the point that will be accepted. If the point value drops below this value, then the new point value is not updated.

raw_max

The maximum raw field value of the point that will be accepted. If the point value rises above this value, then the new point value is not updated.

eng_unit_min

The lower range of the point value in engineering units, corresponding to a raw value of raw_min. If both eng_unit_min and eng_unit_max are zero, then no engineering unit conversion is performed.

end_unit_max

The upper range of the point value in engineering units, corresponding to a raw value of raw_max. If both eng_unit_min and eng_unit_max are zero, then no engineering unit conversion is performed.

Returns

OK or (error)

Description

This command creates a point of type analog. Analog points are used to provide the system with real-valued quantities in engineering units. The raw digital input data is identical to that of a digital point, and is specified with the same address parameter syntax. However, the optional bit offset and bit width specifiers default to 0 and 16 respectively, since the most common type of analog quantity is a word-aligned, 16-bit value.

The features that distinguish an analog point from a digital one are: checking of the raw field data (before conversion) against limit values, and the conversion to a scaled REAL quantity.

This command is normally executed from the configuration file.

Example

In the following example, two analog input points are established, both initially enabled, read-only, not automatically read (cycle time of 0), and automatically registered with the Cascade DataHub. Temperature might be obtained from an unsigned 12-bit A/D converter since its raw range is 0-4096, but it will be automatically converted to a value in the range of -5.1 to +54.3. Pressure is an unsigned 15-bit number and no engineering unit conversion is performed.

(analog t Temperature 0:4  r  0  t  0 32767 -5.1 54.3)
(analog t Pressure 0:6  r  0  t  0 32767 0 0)