550 709 01

 

 

PD 662 Redundancy Channel  (channel 1)

 

Registers in Channel:

RegNo

Identifier

Memory type

Read Out

Type

0

ActualPort

RAM

Decimal

Byte

1

 

 

 

 

2

 

 

 

 

3

 

 

 

 

4

 

 

 

 

5

 

 

 

 

6

 

 

 

 

7

 

 

 

 

8

 

 

 

 

9

ChConfig

EEPROM RPW

---------

Record

10

 

 

 

 

11

RS485Port1Info

RAM

---------

Record

12

RS485Port2Info

RAM

---------

Record

13

LightlinkInfo

RAM

---------

Record

14

Guid

FLASH Read only

---------

String

15

ChError

RAM

---------

Record

 

 

RegNo 0: ActualPort

 

 

ActualPort:

byte;

 

 

ActualPort shows which of the RS485 port is actually being used.

0 = neither.

1 = RS485 Port 1

2 = RS485 Port 2

 

 

 


RegNo 9: ChConfig

The ChConfig variable is a record of the following type:

 

Record

 

(* Factory setting *)

 

ErrorMax:

Byte;

(* 5 *)

 

PreferredPort:

Byte;

(* 1 *)

 

EnableNotification:

Bit8;

(* 0 *)

 

User:

Byte;

(* 0 *)

End;

 

 

 

 

ErrorMax  defines how many frames with errors that are allowed within 16 consecutive frames received at the port, before the port is set to Inactive (and Errorstate).

To set the port back to a non-error state, the port has to receive less than ErrorMax-2 frames with error within 16 consecutive frames.

If ErrorMax is set to 2 or less the port has to receive 16 frames without errors, before the port is set back to a non-error state.

ErrorMaxcan be set to a value from 0 to 8.

 

 

 

PreferredPort can be used to select which of the RS485 ports is to be the one used if both ports are in a non-error state.

0 = Automatic

1 = RS485 Port 1 preferred

2 = RS485 Port 2 preferred

 

 

 

EnableNotification:

Notification can be enabled in the following cases:

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: Enable notification if change in CHError

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: Enable notification if change in RS485Port1InfoRec*

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: Enable notification if change in RS485Port2InfoRec*

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: Enable notification if change in LightlinkInfoRec*

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7:

 

 

 

 

 

 

 

 

 

 

 

*

Notification is made when ErrorFlagsHis, ErrorFlagsAct og ErrorRate is changed. ErrorCounter is not used for notification.

 

 

 


RegNo 11: RS485Port1Info

RegNo 12: RS485Port2Info

RegNo 13: LightlinkInfo

 

Registers 11 to 13 all have the same structure:

RECORD

 

 

 

ErrorFlagsHis: 

bit8;

 

 

ErrorFlagsAct:

bit8;

 

 

ErrorRate: 

byte;

 

 

ErrorCounter:

Record;

(* see record structure below *)

END;

 

 

 

 

ErrorFlagsHis,

ErrorFlagsAct: describes which errors are detected. It is updated when/if the port is put in inactive state.

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 0: Frame error

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 1: Checksum error

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 2: Bad P-NET-Frame

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 3: Line error

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 4:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 5:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 6:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 7:

 

 

 

 

 

 

 

 

 

 

 

0:

Detected by UART.  E.g. no start/stop bit.

1:

Calculated checksum does not match checksum in frame.

2:

Error in Address field.  E.g. ctrl/status, InfoLength.

3:

It is not possible for the PD 662 to distinguish between Broken line, Shortcircuit or mixed wire connections. This bit will be raised for any of these three conditions.

 

ErrorFlagsHist is set if the port is set to Error state (more than ErrorMax errors in the last 16 frames) by the PD 662. A Master (e.g. a PD 601) can reset the bits if the corresponding bits in ErrorFlagAct are not set.

 

ErrorFlagAct bits are set when the PD 662, due to errors, sets the port to Error state. All types of error represented within the last 16 frames, will have their corresponding bit set.

All bits in the register are reset when the PD 662 changes a port from Error state to Non-error state. A Master cannot write to the register.

 

ErrorRate is calculated by this formula:

 

 

The Notification bit is only set if the Error rate ascends.

 


ErrorCounter

 

RECORD

 

 

 

FrameError: 

byte;

 

 

ChecksumError:

byte;

 

 

BadPNETFrame: 

byte;

 

 

LineError:

byte;

 

END;

 

 

 

 

ErrorCounter is a record where each error flag has a counter.  After a reset of the PD 662, the counters are initialised to zero. Every error detected by the PD 662 will increment the error counter, including errors detected in the Non-error state. The counters increment to a max. of 255 and cannot revert to zero before a master (e.g. a PD 601) has reset the counter.

 

FrameError is incremented on any frame error.

 

ChecksumError is incremented on any checksum error.

 

BadPNETFrame is incremented on any bad P-NET frame.

 

LineError is incremented on any line error.

 

 

 

RegNo 14: Guid

Each channel in an interface device consists of a unique guid.

 

 

Guid:

String[22];

(* PD/550709-XX *)

 

 

 

RegNo 15: ChError

 

Record

 

 

 

His:

Bit8;

 

 

Act:

Bit8;

 

End;

 

 

 

There are two sets of error bits, actual and historical. The actual error bits reflect the current situation and will automatically follow any change.

The historical error bits reflect the history and have the purpose of holding sporadic errors. The historical error bits are set together with the corresponding actual bits. They remain set after a read, so each individual bit must be cleared by setting it to false. Only the bits where the corresponding actual bit is false can be cleared. See summary for how ChError.His can be cleared in particular M36 slave modules.

The “His data error” bit in the P-NET response is set if any historical bit is true.

The “Act data error” bit in the P-NET response is reflecting the validity of the data in the response. Overload, electrical error or an error in other registers involved in calculating the result gives “Act data error”.


 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: Program_storage_fault

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: RAM_storage_fault

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: InternalReset

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: ExternalReset

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: EEPROM_Error in ChConfig

 

 

 

 

 

 

 

 

 

 

 

The following two bits will cause Act error In the P-NET response on access to all variables.

 

Bit 0            Program_storage_fault is set TRUE if the self-test finds an error in the program memory.

 

Bit 1            RAM_storage_fault is set TRUE if the self-test finds an error in the data memory (RAM).

 

Bit 2            InternalReset is set TRUE if a reset is caused by a power failure, or if the power has been disconnected (only a His error).

 

Bit 3            ExternalReset is set TRUE if a reset is caused by writing 255 to Reset, via P‑NET (only a His error).

 

The following bits are set TRUE if the self-test finds an error in the data memory (EEPROM) for the variable.

EEPROM fault is only set at power-up. If the corresponding variable is accessed, Act error in the P-NET response is set.

This error can occur if the power disappears when writing to EEPROM. A rewrite to the variable might solve the problem.

 

Bit 7   EEPROM_Error in ChConfig