Connection window (analog)

<< Click to Display Table of Contents >>

Navigation:  Connection windows >

Connection window (analog)

cw-analog1_zoom60This type of Connection window describes the functionality for Input- and Holding Registers.

Length

The maximum length of words to read or write is 125.

Table columns

Address

In these cells you can enter a description for the data. If Hex is selected, the addresses are displayed in hexadecimal format.

Name

In these cells you can enter an optional description for the data.

Word

In these cells you can see the raw words of data. If Holding Register is selected, you can double-click, press  Space  or  Enter  on a word to input a new value.

 

i_critAfter confirmation (if not disabled by Command line > /WriteAllways) one word will be written into your device and old data will be overwritten.

Type

Select one or more cells and select the Data type from the combo-box. Depending on that type the value column will reflect the settings. If a data type has a size of more then one word, it will occupy more than one rows and subsequent cells of these rows will be displayed as -

Scale

Select one or more cells and select the Scale from the combo-box or enter your own text.  Depending on that type the value column will reflect the settings. The syntax of scale is:
[ endian ] [ % | 1:number | minRaw;maxRaw;minValue;maxValue | number_of_characters ] [ {%format} ]

Parts of scale enclosed in [ ] are optional.
 

If data type is numerical, typical scales are:

You can optional prefix the scale by the type of endian - see the table below:

BE:   -  Big Endian  (default if not present)

BE-S: -  Big Endian byte swap

LE:   -  Little Endian

LE-S: -  Little Endian byte swap

oNo scaling occurs if scale is empty or 1:1

oPercentage %

oScaling 1:number

oYou can define your own scaling by entering 4 values: minRaw;maxRaw;minValue;maxValue
Example: 0;511;4;20  or 0;65535;-100;100
If minRaw or maxRaw is omitted their replacements are the data type depending min- or max values.
Example: If data type is INT16 and the scale is ;;minValue;maxValue , then minRaw=-32768 and maxRaw=32767 are used.
 
If a rawValue is read from a device, then the following equation is taking place:
 value    := minValue + ( rawValue - minRaw ) * ( maxValue - minValue ) / ( maxRaw - minRaw     )
 
If a Value is written to a device, then the following equation is taking place:
 rawValue :=   minRaw + ( Value - minValue  ) * ( maxRaw - minRaw     ) / ( maxValue - minValue )
 

oIf data type is Float or Double you can define your own format. The syntax is {%[width.prec]<g|f|e|n>[other chars]}
width - optional width of the resulting number
prec - optional precision of the resulting number
g - general, minimal display of a value in floating point or engineering format
f - normal, floating point notation
e - engineering form with exponent   x.yyyEnnn
n - number format with thousand separator
%% - a single % character
 
Example: {%.5e V}  or LE-S: {%.2f [Volt]} or BE: {%.2f %%} or BE: 0;255;0;100 {%.2f r.H.}
 

If data type is Char the cell defines the even count of characters 2,4,6, ... ,250 , the minimum characters are 2

If data type is WChar the cell defines the count of characters 1,2,3, ... ,125

Value

Values that are out of range are displayed with a red bar ( upper limit ↑ ) or an orange bar ( lower limit ↓ ). Unknown values are displayed as ?

If Holding Registers is selected you can edit data by double-click, pressing  Enter  or by begin typing numbers on a Word or Value cell.

Numerical values can be entered in different formats e.g.: 1,5 , -3e-13,  0x1234, 16#1234 or 2#1100´1111

Strings have to be entered between single quotes 'AB'. Special characters can be escaped by \

 

i_critAfter confirmation (if not disabled by Command line > /WriteAllways) one or more words will be written into your device and old data will be overwritten.

Data type description

Data type

Endian

Range

Int16

x

-32768 .. 32767

Int32

x

-2147483648 .. 2147483647

Int64

x

-9223372036854775808 .. 9223372036854775807

Word

x

0 .. 65535

DWord
UInt32

x

0 .. 4294967295

QWord
UInt64

x

0 .. 18446744073709551615

Hex16

x

0x0000 .. 0xFFFF

Hex32

x

0x00000000 .. 0xFFFFFFFF

Hex64

x

0x0000000000000000 .. 0xFFFFFFFFFFFFFFFF

Bit16

x

2#0000000000000000 .. 2#1111111111111111

Bit32

x

2#00000000000000000000000000000000 .. 2#11111111111111111111111111111111

Bit64

x

2#0000000000000000000000000000000000000000000000000000000000000000 ..
2#1111111111111111111111111111111111111111111111111111111111111111

Float

x

±3,4E38

Double

x

±1E308

Char

 

Two characters (8 bit each) per word. Special characters are:
\t = Tab
\r = Carriage return
\n = Line feed
\\ =  Backspace
\00 .. \FF = Char code (two digits required)

WChar

 

One wide characters (16 bit) per word. Special characters are:
\t = Tab
\r = Carriage return
\n = Line feed
\\ = Backspace
\0000 .. \FFFF = Char code  (four digits required)

BigEndian / LittleEndian

You can define the byte order by entering BE: , BE-S: , LE: or LE-S: at the beginning of the text. Without this prefix BE: is used as default.

Int16, Word, Hex16, Bit16

oBE:   -  Byte order = 0 1

oBE-S: -  Byte order = 1 0

oLE:   -  Byte order = 1 0

oLE-S: -  Byte order = 1 0

Int32, DWord, Hex32, Bit32, Float (32 Bit)

oBE:   -  Byte order = 0 1 2 3

oBE-S: -  Byte order = 1 0 3 2

oLE:   -  Byte order = 3 2 1 0

oLE-S: -  Byte order = 2 3 0 1

Int64, QWord, Hex64, Bit64, Double (64 Bit)

oBE:   -  Byte order = 0 1 2 3 4 5 6 7

oBE-S: -  Byte order = 1 0 3 2 5 4 7 6

oLE:   -  Byte order = 7 6 5 4 3 2 1 0

oLE-S: -  Byte order = 6 7 4 5 2 3 0 1

Examples for different scales

Numerical

oAs percentage: %

oLittle Endian as percentage: LE:%

oBig Endian byte swap, no scaling: BE-S:

oLittle Endian byte swap and scaling of 1:200 : LE-S: 1:200

oOwn scale Big Endian : -150;150;0;100  or BE: -150;150;0;100
Own scale Little Endian : LE: -150;150;0;100

Char and WChar

oCount of characters: 20

oCount of characters: 20 chars

 

See also: Connection window (discrete)