550 558 04

 

Service Channel (M36 Digital Slaves)

 

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

 

Registers in Service channel:

RegNo

Identifier

Memory type

Read Out

Type

0

NumberOfSWNo/DeviceInfo

PROM Read only

-------

Integer

1

DeviceID

PROM Read only

-------

Record

2

Notification

RAM Read only

-------

Record

3

Reset

RAM Read Write

Hex

Byte

4

PNETSerialNo

Special function

-------

Record

5

 

 

 

 

6

 

 

 

 

7

FreeRunTimer

RAM Read only

Decimal

LongInteger

8

WDTimer

RAM Read Write

Decimal

Real

9

DeviceConfig

EEPROM RPW

-------

Record

10

WDPreset

EEPROM RPW

Decimal

Real

11

SGVTable

EEPROM RPW

-------

Array

12

NetParam

EEPROM RPW

-------

Record

13

WriteEnable

RAM Read Write

Binary

Boolean

14

ChType

PROM Read only

-------

Record

15

CommonError

RAM Read only

-------

Record

 

RegNo. 0: Num­berOfSWNo

 

 

NumberOfSWNo:

Integer;

 

 

This constant holds the highest SWNo in the device. It occupies the same memory location as the NumberOfSWNo field in the DeviceID record below, but is declared as an Integer.

 

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. DeviceInfo is used during the procedure when it is required to download updated firmware. The firmware download feature can be selected by right-clicking the module in the VIGO MIB.

The firmware download is available only for modules specifically listed in this document.

 

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 has the following structure:

 

Record

 

 

DeviceNumber:

Word;

 

 

ProgramVersion:

Word;

 

 

ManufacturerNo:

Word;

 

 

Manufacturer:

String[20];

 

End;

 

 

 

This constant is stored in Read only memory and cannot be changed.

 

An example:

 

 

Device­Num­ber = 621

 

Programvers = 111

 

ManufacturerNo = 1

 

Manufacturer = "PROCES-DATA DK"

 


 

RegNo. 2: Notification

 

 

Notification:

Bit8;

 

 

CommonIn:

Bit8

Only PD 62x ver. 1.11 or higher

 

Notification:

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 on each channel. The Notification register is cleared automatically after a read. After a power-up all notification bits are set.

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: NotificationOnCh_0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: NotificationOnCh_1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: NotificationOnCh_2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: NotificationOnCh_3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4: NotificationOnCh_4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5: NotificationOnCh_5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6: NotificationOnCh_6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: Not used

 

 

 

 

 

 

 

 

 

 

CommonIn:

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: CommonError.ChError.Act <> 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: Status_InFlag_OnCh_1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: Status_InFlag_OnCh_2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: Status_InFlag_OnCh_3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4: Status_InFlag_OnCh_4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5: Status_InFlag_OnCh_5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6: Status_InFlag_OnCh_6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: Not used

 

 

 

 

 

 

 

 

 

 

 

RegNo. 3: Reset

 

 

Reset:

Byte;

 

 

By writing 255 Dec. to SWNo 3, the device performs a reset, and ExternalReset in CommonError is set TRUE.

 

 

RegNo. 4: PNETSerialNo

This Variable is a record having the following structure:

 

Record

 

 

PNETNo:

Byte;

(* Node Address *)

 

SerialNo:

String[20];

 

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 Dec. (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 has a 1/256 second resolution.

 

RegNo. 8: WDTimer

 

 

WDTimer:

Real;

 

 

M36 Slave devices with digital outputs are equipped with a P-NET Watchdog, which switches off all the digital outputs, by clearing OutFlags and Control flags, if P-NET communication ceases.

 

WDTimer is automatically preset with the value from WDPreset, either each time the device is called via P-NET, or following a power-up or device reset. If the WDTimer reaches zero before it is preset again, the PnetWDRunOut flag will be set, and all the outputs will switch OFF. The WDTimer contains a value in seconds.

 

RegNo. 9: DeviceConfig

The variable is a record having the following structure:

 

Record

 

 

Enablebit:

Bit8;

 

 

Functions:

Byte;

(Default: 16 Dec.)

 

Notification:

Byte;

 

 

User:

Byte;

 

End;

 

 

 

 

Enablebit

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: Not used

 

 

 

 

 

 

 

 

 

 

Functions

The watchdog facility may be switched on and off by means of the field variable Functions as shown below.

 

 

DeviceConfig.Functions = 0

Watchdog on

 

DeviceConfig.Functions = 16 (dec.)

Watchdog off

 

By default, DeviceConfig.Functions = 16 (decimal), meaning watchdog off.

 

Notification

The notification function can be enabled as shown below.

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: Change in CommonError.ChError.Act

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: Not used

 

 

 

 

 

 

 

 

 

 

 

If Service.DeviceConfig.Notification[0] is True, service channel notification is enabled. This means that Service.Notification[0] will be set True when the value of CommonError.ChError.Act changes. Default value: 0.

 

User

This field is available for the user. Default value: 0.

 

 

RegNo. 10: WDPreset

 

 

WDPreset:

Real;

 

 

The maximum permitted time between calls to the device before the watchdog will be activated, is defined in seconds in this register. Default value: 0.   

 

The following applies only to version 1.11 or higher of the PD 620/621/622 modules:

When several masters are communicating with a module, each request causes the module’s WDTimer to be preset, thus preventing a Watchdog alarm. To ensure that a specific master continues to regularly communicate with the module, WDPreset could initially be set by that master to 0 or less (e.g. -1). This change will then lead to a rather different functionality, where the particular master will need to be programmed to provide an initial and regular update of the WDTimer with a positive value. In the event that this update is missed, for example because of an error in this master, and being the one responsible for controlling the outputs, the WDTimer will reach zero before it is preset again, whereupon the PnetWDRunOut flag will be set, and all the outputs will switch OFF to their safe states.

 

 

RegNo. 11: SGVTable

The Super Global Variable concept is for future utilization, where tools for automatic setup and use of the SGVTable will be available.

 

So far, the following is defined:

When a P-NET request is received with a negative SWNo, it means that this is a request to a Super Global Variable. The device performs a binary search through the SGVSWNos in the SGVTable to find a match. If a match is found, SGVTable.SWNo is used instead.

 

If a Load instruction is given and Owner bit is set, a special response is sent on the P-NET  (a P-NET Store request)

 

Array[1..7] OF Record

 

SGVSWNo:

Integer;

 

 

SWNo:

Byte;

 

 

Owner:

Boolean;

 

End;

 

 

 

The SGVSWNos must be sorted in decreasing order (for example -2 on index 1, -14 on index 2). It is not allowed to have identical SGVSWNos in the table. The value of SGVSWNo must be 0 in not used entries.

 

 

RegNo. 12: NetParam

 

Record

 

(* Factory setting: *)

 

Baudrate:

LongInteger;

(* 76800 *)

 

ErrorCheck:

Boolean;

(* False *)

 

Reserved:

Byte;

 

End;

 

 

 

Baudrate

This field selects the baud rate for the LightLink P-NET communication. Baudrate can hold the values 76800 or 230400.

 

ErrorCheck

This field selects the error check method used for P-NET Light-Link communication.

 

 

False:

Default Error check (1 byte)

 

True:

Extended Error check (2 byte)

 

 

RegNo. 13: WriteEnable

 

 

WriteEnable:

Boolean;

 

 

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

 

 


RegNo. 14: ChType

Each channel in an interface device is described in an individual ChType variable. This is a Record, consisting of a unique number for the channel type and a TRUE Boolean value for each of the registers that are represented within a channel. The register number in a channel corresponds to the index number in the Boolean array.

The record for the service channel has the following structure:

 

ChType: Record

 

 

ChannelType:

Word;

 

 

Exist:

Bit16;

 

 

Functions:

Bit16;

 

End;

 

 

 

For the service channel, ChType has the following value:

 

ChannelType = 1 (Service channel)

 

Exist =

15

 

 

 

 

 

 

 

7

 

 

 

 

 

 

0

1

1

1

1

1

1

1

1

1

0

0

1

1

1

1

1

       

Functions =

15

 

 

 

 

 

 

 

7

 

 

 

 

 

 

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

1

 

 

RegNo. 15: CommonError

 

The CommonError variable holds error information for all Channels within the device.

 

This variable is a record having the following structure:

 

Record

 

 

ChError:

Record

 

 

 

 

 

His: Bit8;

 

 

 

 

Act: Bit8;

 

 

 

End;

 

 

 

ComHis:

Bit8;

 

 

 

ComAct:

Bit8;

 

 

End;

 

 

 

The 8 bits in ChError.His and ChError.Act have the following meaning:

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0:AnyChannelError     (ComHis/Act<>0)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1:Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2:EEPROM_fault

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3:PnetWDRunOut

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4:RAMDataStoreFault

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5:ProgramStorageFault

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6:ExternalReset     (P-NET)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7:InternalReset      (Hardware) 

 

 

 

 

 

 

 

 

 

 

 

Bit 7

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

Bit6

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

Bit 5

ProgramStorageFault is set TRUE if the self-test finds an error in the program memory (PROM).

Bit 4

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

Bit3

PnetWDRunOut is set TRUE if the WDTimer reaches zero and the Watchdog function is enabled.

Bit 2

EEPROM_fault is set TRUE if the self-test finds an error in the data memory (EEPROM). EEPROM fault is only set at power-up.

Bit 0

AnyChannelError is set TRUE if an error or an unacknowled­ged error exists (ChError.His <>0 or ChError.Act <>0), in one or more channels.

 

 

ComHis and ComAct are unique fields in the service channel, and hold an error status relating to all channels, where the bit number corresponds to the channel number. Each Channel has an error register, ChError. If ChError.His in a particular channel is <> 0, the corresponding bit is set in ComHis. If ChError.Act in a particular channel is <> 0, the correspon­ding bit is set in ComAct in the service channel. If the error disappears (ChE­rror.Act = 0), the corresponding bit in ComAct is automatically cleared.

If the channels become error free, individual bits in ComHis will be cleared when reading ChError in each of the chan­nels.

                              

n

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

          0:Channel 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

          1:Channel 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

          n:Channel n