551 296 02

 

 

PD 664 Service Channel (channel 0)

Registers in Service channel.

RegNo

Identifier

Memory type

Read Out

Type

0

NumberOfSWNo/DeviceInfo

PROM Read only

-------

Record

1

DeviceID

PROM Read only

-------

Record

2

NeighbourNodeAddress

RAM Read only

Decimal

Byte

3

Reset

RAM Read Write

Decimal

Byte

4

PNETSerialNo

Special function

-------

Record

5

 

 

 

 

6

 

 

 

 

7

FreeRunTimer

RAM Read only

Decimal

LongInteger

8

WDTimer

RAM Read Write

Decimal

Real

9

 

 

 

 

10

WDPreset

EEPROM RPW

Decimal

Real

11

 

 

 

 

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

 

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 = 664

 

Programvers = 113

 

ManufacturerNo = 1

 

Manufacturer = "PROCES-DATA DK"

 

 

 

RegNo 2: NeighbourNodeAddress

NeighbourNodeAddress: Byte;

 

A P-NET node can have a "neighbour" node, of any general node type. To facilitate NetScan and other utilities, the node address of the neighbour node can be read in this "Read only" variable. If the P-NET node has no neighbour node, the value of NeighbourNodeAddress is 255.

 

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 *)

 

NoOfMasters

Byte;

(* 0 *)

 

SerialNo:

String[20];

(* "xxxxxxxxPD" *)

End;

 

 

 

The serial number is used for service purposes and acts as a 'key' for setting the P-NET ad­dress and number of masters for the P-NET node.

 

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 and number of masters via the P-NET.

 

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

 

An attempt to write data to node address 126 will give no reply. Consequently the calling master must disable the generation of a tran­smi­ssion error when addressing this node.

In the device, the SerialNo = "XXXXXXXXPD", is set by PROCES-DATA, and cannot be changed. The eight “X”es indicate the serial number, and PD is the initials of PROCES-DATA.

 

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. 8: WDTimer

 

 

WDTimer:

Real;

 

 

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 an SMS will be sent to the phone number defined in the SMS channel. The WDTimer contains a value in seconds.

 

RegNo. 10: WDPreset

 

 

WDPreset:

Real;

(* Factory setting: 60.0 *)

 

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

 

The following applies only to version 1.02 or higher of a PD 664 device:

When a master communicates with the device, 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 a negative number (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, the WDTimer will reach zero before it is preset again, whereupon the SMS.ChError.Act[11], Watchdog_Error flag will be set, and a SMS sent.

 

 

RegNo 12: NetParam

 

Record

 

(* Factory setting *)

 

Baudrate:

LongInteger;

(* 76800 *)

 

ErrorCheck:

Boolean;

(* FALSE *)

 

NoOfMasters:

Byte;

(* 0 *)

 

Retries:

Byte;

(* 0 *)

End;

 

 

 

This register holds parameters for the net, to which the P-NET node is connected.

 

Baudrate:  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)

 

 

NoOfMasters: The value of NoOfMasters can be a value of 0 to 32, but no request will be sent on P-NET when NoOfMasters = 0.

 

Retries:

This register defines the maximum number of retries made in the event of transmission errors, before the error is reported. The defined maximum number of retries is for each block in a LONG LOAD / STORE. Therefore, the value of Retries should be very low.

 

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

 

 

GUID:

String[22];

(* "PD/551296-01" *)

 

Each channel type is identified by means of a unique GUID. The value of GUID for the P-NET Service channel is: PD/551296-01.

 

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 any change.

The historical error bits reflect past situations and have the job 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.

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 reflects 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: ModuleError

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5: SIM_not_inserted

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6: GPRS_Network_Error

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8: EEPROM_error_in_PnetSerialNo

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

9: EEPROM_error_in_NetParam

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

10: PNET_Sync_Error

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

11: EEPROM_error_in_WDPreset

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

12:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

13:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

14:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

15:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Bits 0 and 1 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).

 

Bit 4 and 5 will cause Act error in the P-NET response on access to all variables.

Bit 4:          ModuleError is set if a module error occurs.

Bit 5:          SIM_not_inserted is set if no SIM card is inserted into the cardholder.

Bit 6:          GPRS_Network_Error is set to TRUE if the module’s internal self-test detects a network error and the network connection has been reinitialised.

 

Bit 8 and 9 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.

These errors can occur if the power disappears when writing to EEPROM, so a rewrite to the variable can maybe solve the problem.

 

Bit 8:          EEPROM_error_in_PNETSerialNo

Bit 9:          EEPROM_error_in_NetParam

Bit 10:        PNET_Sync_Error is set if the device is unable to send a request because it is out of sync.

 

Bit 11 is 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 possibly solve the problem.

 

Bit 11:        EEPROM_error_in_WDPreset