AddField

<< Click to Display Table of Contents >>

 

AddField

AddField(FieldLink, [FieldName], [FieldType], [FieldMinRecTime], [FieldMaxRecTime], [FieldScanTime], [FieldDeadBand], [FieldDeadBandUnit])

This method adds a Storage Field object in the Fields object. The parameters of this method are described on the next table.

Parameters of the AddField field

Parameter

Description

FieldLink

Data source linked to this Storage Field. This is a mandatory parameter and corresponds to Storage Field's Link property

FieldName

Name of a Storage Field in the Fields object. This is an optional parameter and, if omitted, receives the expression "Field". This parameter corresponds to Storage Field's Name property. Please check the general Name property for more information about the allowed characters on the names of objects

FieldType

Data type of a Storage Field. Possible values for this parameter are 0: eStorageDouble, 1: eStorageBit, 2: eStorageText, or 3: eStorageInteger. This is an optional parameter and, if omitted, uses the value 0 (zero). This parameter corresponds to Storage Field's Type property

FieldMinRecTime

Minimum time, in milliseconds, to store new data. This is an optional parameter and, if omitted, this time is configured as 0 (zero), that is, disables a minimum time. This parameter corresponds to Storage Field's MinRecTime property

FieldMaxRecTime

Maximum time, in seconds, without storing any data. This is an optional parameter and, if omitted, this time is configured as 3600 (one hour). This parameter corresponds to Storage Field's MaxRecTime property

FieldScanTime

Indicates how often, in milliseconds, a Tag's value is sent back to data compression algorithm, in case it is not varying. This is an optional parameter and, if omitted, uses the value configured in the FieldMaxRecTime parameter. This parameter corresponds to Storage Field's ScanTime property

FieldDeadBand

Dead band used to calculate Storage's algorithm. This is an optional parameter and, if omitted, uses the value 1 (one). This parameter corresponds to Storage Field's DeadBand property

FieldDeadBandUnit

Dead band unit of the FieldDeadBand parameter as a percentage of dead band (0: dbPercent) or in absolute units (1: dbAbsolute). This is an optional parameter and, if omitted, uses the value 0 (zero, percentage). This parameter corresponds to Storage Field's DeadBandUnit property

Was this page useful?