550 721 03

 

 

Service Channel (channel 0)   (PD 641, PD 642, PD 643)

This document provides full details about the structure and contents of the Service Channel incorporated into M36 Analogue Slave device types.

 

 

RegNo

Identifier

Memory type

Read Out

Type

0

NumberOfSWNo/DeviceInfo

PROM Read only

-------

Record

1

DeviceID

PROM Read only

-------

Record

2

Notification

RAM Read only

Binary

Bit8

3

Reset

RAM Read Write

Decimal

Byte

4

PNETSerialNo

Special function

-------

Record

5

 

 

 

 

6

 

 

 

 

7

FreeRunTimer

RAM Read only

Decimal

LongInteger

8

 

 

 

 

9

EnableNotification

EEPROM RPW

Binary

Bit8

10

 

 

 

 

11

SGVTable

EEPROM RPW

-------

Array

12

NetParam

EEPROM RPW

-------

Record

13

WriteEnable

RAM Read Write

Binary

Boolean

14

Guid

PROM Read only

-------

String

15

ChError

RAM Read Write

-------

Record

 

 

RegNo 0: NumberOfSWNo

This constant holds the highest SWNo in the device and a guid for the entire device.

 

Record

 

(* Factory setting *)

 

NumberOfSWNo:

Integer;

(*PD 641:63/PD 642:79/PD 643: 63*)

 

NodeTypeGuid:

String[22];

(* "xxxxxxxxxxxxxxxxxxxxxx" *)

End;

 

 

 

This record holds the highest SWNo in the device. It occupies the same memory location as the NumberOf SWNo field in the DeviceID record below, but is declared as an Integer. It also holds a Global Unique Identity (GUID) as a string, as a means of identifying the module. This field is also mirrored in DeviceGUID in the record below.

 

 

RegNo 0: DeviceInfo

 

Record

 

 

NumberOfSWNo:

Word;

 

 

DeviceGUID:

String[22];

 

 

Reserved1:

Byte;

 

 

HardwareGUID:

String[22];

 

 

KeyID:

Byte;

 

 

BootLoaderGUID:

String[22];

 

End;

 

 

 

This record holds the complete identification of the module, including the version number of the hardware and the software.

 

 

RegNo 1: DeviceID

The purpose of this record is to be able to identify a connected device. The record includes registered manufacturer number, the type number of the device and a string, identifying the manufac­turer.

 

The record is of the following type:

 

Record

 

(* Factory setting *)

 

DeviceNumber:

Word;

(* 641, 642, or 643 *)

 

ProgramVersion:

Word;

(* 100 *)

 

ManufacturerNo:

Word;

(* 1 *)

 

Manufacturer:

String[20];

(* "PROCES-DATA DK" *)

End;

 

 

 

The value of ProgramVersion reflects the actual firmware release.

 

 

RegNo 2: Notification

 

 

Notification:

 Bit8;

 

 

A notification is used to inform users of variable values when new values are available. Several conditions can set the notification bit and the conditions can be chosen in ChConfig.Notification / EnableNotification on each channel. The Notification register is cleared automatically after a read. After a power-up all notification bits are set.

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: Channel_0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: Channel_1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: Channel_2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: Channel_3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4: Channel_4    (PD 642 only)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7:

 

 

 

 

 

 

 

 

 

 

 

RegNo 3: Reset

 

 

Reset:

Byte;

 

 

By writing 255 to the Reset variable, the device performs a reset, and ExternalReset in ChError is set TRUE. Any other value than 255 can cause random behaviour.

 

 

RegNo 4: PNETSerialNo

This Variable is a record of the following type:

 

Record

 

(* Factory setting *)

 

PNETNo:

Byte;

(Node Address) (* 0 *)

 

SerialNo:

String[20];

(* "xxxxxxxxPD" *)

End;

 

 

 

The serial number is used for service purposes and as a 'key' to setting the device's P-NET Node address.

A special function is included for identifying a device connected to a network containing many other devices, having the same or unknown node addresses, and to enable a change of the node address via the P-NET.

Setting a new node address via the P-NET is performed by writing the required node address together with the serial number of the device in question, into the PnetSe­rialNo at node address 126 (calling all devices). All devices on the P-NET will receive the message, but only the device with the transmitted serial number will store the P-NET node address.

 

RegNo 7: FreeRunTimer

 

 

FreeRunTimer:

LongInteger;

 

 

FreeRunTimer is a timer, to which internal events are sync­hronized. The timer is of type LongInteger in 1/256 Second.

 

 

RegNo 9: EnableNotification

 

 

EnableNotification:

Bit8;

(* Factory setting = 0 *)

 

Notification can be enabled for the following events:

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: ChangeInChErrorAct

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7:

 

 

 

 

 

 

 

 

 

 

 

RegNo 11: SGVTable

When a P-NET block is received with most significant bit set in SWNo it is a Super Global Variable. The device performs a binary search through the SGVSWNo’s in the SGVTable to find a match, if a match was found SGVTable.SWNo is used instead. If Load instruction and owner bit is set a special response is sent on the P-NET (a P-NET Store request).

 

Array[1..7] Of Record

(* Factory setting *)

 

SGVSWNo:

Integer;

(* 0 *)

 

SWNo:

Byte;

(* 0 *)

 

Owner:

Boolean;

(* 0 *)

 

End;

 

 

 

The SGVSWNo must be in decreasing order (-1 on index 1, -2 on index 2.......). Identical SGVSWNo's are not allowed in the table. SGVSWNo must hold 0 in not used entries.

 

 

RegNo 12: NetParam

 

Record

 

(* Factory setting *)

 

Baudrate:

LongInteger;

(* 76800 *)

 

Errorcheck:

Boolean;

(* OFF *)

 

Reserved:

Byte;

(* 0 *)

End;

 

 

 

Baudrate:  This variable selects the baud rate for the PD640. Baudrate can hold the values 76800 or 230400.

 

                                      

Errorcheck:

False:

P-NET Default Error check (1 byte)

 

 

True:

P-NET Extended Error check (2 byte)

 

 

 

RegNo 13: WriteEnable

 

 

WriteEnable:

Boolean;

 

 

Write protected variables can only be changed when Write­Enab­le is TRUE. After reset, WriteEnable is set to FALSE.

 

 

RegNo 14: Guid

Each channel type in an interface device consists of a unique Guid.

 

 

Guid:

String[22];

(*"PD/550721-03" *)

 

 

RegNo 15: ChError

 

Record

 

 

 

His:

Bit16;

 

 

Act:

Bit16;

 

End;

 

 

 

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

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, and cleared by the host. Only the bits where the corresponding actual bit is false can be cleared.

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”.

 

15

 

 

 

 

 

 

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: Program_storage_fault

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: RAM_storage_fault

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: InternalReset

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: ExternalReset

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4: EEPROM_error_in_PNETSerialNo

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5: EEPROM_error_in_NotificationEnable

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: EEPROM_error_in_SGVTable

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8: EEPROM_error_in_NetParam

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

9:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

10:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

11:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

12:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

13:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

14:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

15:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The following bits also appear in ChError in all channels, and 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).

 

The following bits also appear in ChError in all channels, and will only be set in His.

 

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

 

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

 

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, so a rewrite to

the variable can maybe solve the problem.

 

Bit 4               EEPROM_error_in_PNETSerialNo.

 

Bit 5               EEPROM_error_in_NotificationEnable.

 

Bit 7               EEPROM_error_in_SGVTable.

 

Bit 8               EEPROM_error_in_NetParam.