Limit 1 (Index 0x08n0:13) and Limit 2 (Index 0x08n0:14), Swap Limit bits

Limit 1 (index 0x08n0:13) and Limit 2 (index 0x08n0:14)

Indices 0x08n0:07 and 0x08n0:08 are used to activate limit value monitoring.

If the limits of the values that can be entered in indices 0x08n0:13 and 0x80n0:14 are violated, the bits in the indices are set accordingly (see the table and the example below).

Channel

Index for Limit 1

Index for Limit 2

1

0x60p0:03

0x60p0:04

2

0x60p0:0C

0x60p0:0D

3

0x60p0:15

0x60p0:16

4

0x60p0:1E

0x60p0:1F

With p = 0 for Port1.... p = 3 for Port4
Limit output (2 bit):

0: Limit function not active
1: Value < limit value
2: Value > limit value
3: Value = limit value

Limit 1 (Index 0x08n0:13) and Limit 2 (Index 0x08n0:14), Swap Limit bits 1:

Limit evaluation

The limit evaluation assumes a signed representation. The conversion to the desired representation (index 0x80n0:02) only takes place after the limit evaluation.

Example limit evaluation for EPI3174

Port1, channel 1; Limit 1 and Limit 2 enabled, Limit 1 = 2.8 V, Limit 2 = 7.4 V, representation: signed integer

Input in index 0x0800:13 (limit 1):

(2.8 V / 10 V) * 216 / 2-1 = 9,174dec

Input in index 0x0800:14 (limit 2):

(7.4 V / 10 V) * 216 / 2-1 = 24,247dec

Output:

Input channel 1

Limit1 index 0x6000:03

Limit2 index 0x6000:04

1.8 V

0x01hex, (Limit 1, limit value undershot)

0x01hex, (Limit 2, limit value undershot)

2.8 V

0x03hex, (Limit 1, limit value reached)

0x01hex, (Limit 2, limit value undershot)

4.2 V

0x02hex, (Limit 1, limit value exceeded)

0x01hex, (Limit 2, limit value undershot)

8.5 V

0x02hex, (Limit 1, limit value exceeded)

0x02hex, (Limit 2, limit value exceeded)

Swap Limit Index 0x80n0:0E

The limit function can be inverted by SwapLimitBits in index 0x80n0:0E.

Output n (2 bits):

SwapLimitBits setting

Value

FALSE (default setting)

  • 0: not active
  • 1: Value < limit value
  • 2: Value > limit value
  • 3: Value = limit value

TRUE

  • 0: not active
  • 1: Value > limit value
  • 2: Value < limit value
  • 3: Value = limit value
Limit 1 (Index 0x08n0:13) and Limit 2 (Index 0x08n0:14), Swap Limit bits 2:

Linking in the PLC with 2-bit values

The limit information consists of 2 bits. Limitn can be linked to the PLC or a task in the System Manager:

PLC: IEC61131-PLC contains no 2-bit data type that can be linked with this process data directly. In order to transmit the limit information, therefore, define an input byte, e.g.

Limit 1 (Index 0x08n0:13) and Limit 2 (Index 0x08n0:14), Swap Limit bits 3:

Link the limit to an existing variable.

Additional task: 2-bit variables can be created in the System Manager.

Limit 1 (Index 0x08n0:13) and Limit 2 (Index 0x08n0:14), Swap Limit bits 4:

Linking of 2-bit variable to additional task