Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI Interface for Modbus Ethernet PLC

SquareRoot

  • Last UpdatedNov 16, 2022
  • 3 minute read

The SquareRoot field is used to specify operations to be applied to input and/or output values and has a default value of 0.

Note: Operations are never applied for digital tags.

The following parameters are used for the operations:

Parameter

Usage

Convers

The conversion factor PI Point Attribute.

InstZero

The instrument zero of the PLC, which is defined in the extended descriptor.

Zero

The Zero PI Point Attribute.

Span

The Span PI Point Attribute.

Value

This parameter represents a value from a PLC that is sent to an input tag or a value that is sent to a PLC from an output tag (or SourceTag). The conversions below are performed on Value.

Example: An input tag is used to read the temperature of a beaker of water. The water temperature range is between 0 oC and 100 oC. The range of values from the PLC is between -10000 and +10000, where -10000 corresponds to 0 oC and 10000 corresponds to 100 oC. To properly convert the value from the PLC to a temperature in oC, use the following settings: InstZero=-10000, Convers=20000, Zero=0, Span=100, SquareRoot=0.

The conversion that is applied depends upon the value of the SquareRoot and Convers parameters:

Conditions

Operation

SquareRoot=0 Convers !=0 and Convers !=1

Input tags:

Value = ([(Value - InstZero) / Convers ] * Span) + Zero

Output tags:

Value = ([(Value - Zero) / Span] * Convers) + InstZero

SquareRoot=0 Convers=0 or Convers=1

No operation performed on input or output tags:

Value = Value

SquareRoot=1 Convers!=0 and Convers!=1

Two-step operation for input tags:

Value = (Value) 0.5

Value = ([(Value - InstZero) / Convers ] * Span) + Zero

Two-step operation for output tags:

Value = (Value) 0.5

Value = ([(Value - Zero) / Span] * Convers) + InstZero

SquareRoot=1 Convers=0 or Convers=1

Input tags and output tags:

Value = (Value) 0.5

SquareRoot=2 Convers!=0 and Convers!=1

Two-step operation for input tags:

Value = (Value) 2

Value = ([(Value - InstZero) / Convers ] * Span) + Zero

Two-step operation for output tags:

Value = (Value) 2

Value = ([(Value - Zero) / Span] * Convers) + InstZero

SquareRoot=2 Convers=0 or Convers=1 or point type is digital

Input tags and output tags:

Value = (Value) 2

SquareRoot=3 Convers!=0

For floating point (i.e., type float16, float32) input tags:

For Location3 of 103, 104, 703, 704, 903, 904:

Value = Value / Convers Otherwise: Value = ([(Value - InstZero) / Convers ] * Span) + Zero

For floating point (i.e., type float16, float32) output tags:

For Location3 of 106, 116, 706, 716, 906, 916, 1106, 1116:

Value = Value * Convers

Otherwise:

Value = ([(Value - Zero) / Span] * Convers) + InstZero

For integer (i.e. type int16, int32) input tags:

Value = ([(Value - InstZero) / Convers ] * Span) + Zero

For integer (i.e. type int16, int32) output tags:

Value = ([(Value - Zero) / Span] * Convers) + InstZero

SquareRoot=3 Convers=0

No operation performed on input or output tags:

Value = Value

SquareRoot=4

Same as Convers=0

SquareRoot=5 Convers<>0

Input tags:

Value = (Value / Convers) - InstZero

Output tags:

Value = (Value + InstZero) * Convers

SquareRoot=5 Convers=0

No operation performed on input or output tags:

Value = Value

SquareRoot=6 Convers!=0

Input tags:

Value = (Value - InstZero) / Convers

Output tags:

Value = (Value * Convers) + InstZero

SquareRoot=6 Convers=0

No operation performed on input or output tags:

Value = Value

TitleResults for “How to create a CRG?”Also Available in