(analog enable_flag name address read_write_mode cycle_millisecs exception_flag raw_min raw_max eng_unit_min eng_unit_max)
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.)
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.
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)
Copyright © 1995-2012 by Cogent Real-Time Systems, Inc. All rights reserved.