551 297 03

 

SMS Channel

 

Registers in SMS channel:

RegNo

Identifier

Memory type

Read Out

Type

0

SMSOutputBuffer

RAM Read Write

-------

Buffer

1

SMSInputBuffer

RAM Read Write

-------

Buffer

2

SMSOutputStatus

RAM Read Write

-------

Record

3

SMSFlagReg

EEPROM RPW

Binary

Bit8

4

 

 

 

 

5

WatchdogSMSConfiguration

EEPROM RPW

-------

Record

6

 

 

 

 

7

Statistics

RAM Read Write

-------

Record

8

 

 

 

 

9

 

 

 

 

10

 

 

 

 

11

 

 

 

 

12

 

 

 

 

13

 

 

 

 

14

Guid

PROM Read only

-------

String

15

ChError

RAM Read Write

-------

Record

 

 

RegNo 0: SMSOutputBuffer

SMSType = RECORD

 

PhoneNo:

String[40];

 

Message:

String[160];

 End;

 

SMSOutputBuffer: Buffer[1] of SMSType;

 

When an SMS is written to SMSOutputBuffer, the message is sent to the requested phone number. After transmission, or if transmission fails, the SMS is deleted from SMSOutputBuffer. Note: Since this register is stored in volatile RAM, it will be cleared after power off and reset.

 

RegNo 1: SMSInputBuffer

SMSType = RECORD

 

TypeID

Byte;

 

TimeDate

TimeDateType;

 

PhoneNo:

String[40];

 

Message:

String[160];

 End;

 

SMSInputBuffer: Buffer[1] of SMSType;

 

TypeID

Holds the type of SMS received:

0:

Normal Text SMS

1:

StatusReport

 

TimeDate

Holds the timestamp of the SMS.

 

Message

If a status report is received, the message will hold two numbers separated by a comma.

The first number is the message reference number. The second number is the message status code.

 

When an SMS is received, it is stored in the SMSInputBuffer. Note: Since this register is stored in volatile RAM, it will be cleared after power off and reset.

 

RegNo 2: SMSOutputStatus

SMSType = RECORD

 

MessageReferenceNo:

Integer;

 

StatusIDNo:

Integer;

 End;

 

MessageReferenceNo

When an SMS is sent, the service centre returns a reference number. This number can be compared with a status report. MessageReferenceNo is set to -1 when a message is written to the SMSOutputBuffer. Note: Since this register is stored in volatile RAM, it will also be set to –1 after power off and reset. 

 

StatusIDNo

If sending an SMS fails, bit 9 in ChError is set and the StatusIDNo is loaded with a number representing an SMS error described in this table:

 

StatusIDNo

Description

28

Unidentified subscriber

42

Congestion (Service centre is blocked)

192

Service centre busy

305

Invalid Phone number

500

Non specific error

For all specified errors, attempts should be made to send the SMS at a later time.

 

StatusIDNo is set to -1, when a message is written to the SMSOutputBuffer. When MessageReferenceNo changes from -1 and StatusIDNo remains at -1, the SMS has been sent without any problems. Note: Since this register is stored in volatile RAM, it will also be set to –1 after power off and reset.

 

RegNo. 3: SMSFlagReg

 

FlagReg:

Bit8; (* Factory setting: 0 *)

 

FlagReg :         

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: Enable SMS Status reports

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: SMSOnly

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The FlagReg can be accessed as one Byte or as individual bits.

 

Bit 0: Enable SMS Status reports

The Enable SMS Status reports flag configures the module to request SMS status reports from the service centre. The status reports are transported to the SMS input buffer.

 

Bit 7: SMSOnly

Important: Setting this flag disables GPRS in the module!

In the event that this flag is set the Red Error LED in the module will not be flashing as normal if the GPRS configuration is not valid. If the module has an open connection this will be terminated and the module will not make any attempts to connect, as long as SMSOnly is enabled.

 

RegNo 5: WatchdogSMSConfiguration

Record

 

 

WDEnable

Boolean;

 

PhoneNo:

String[40];

 

WDText:

String[50];

End;

 

 

WDEnable

If set, this Boolean will enable the Watchdog functionality.

 

PhoneNo

This field holds the phone number to which an SMS is sent if the WDTimer (in the Service channel) reaches zero before it is preset again, i.e. no communication from a master. If no phone number is entered, no SMS is sent.

 

WDText

This string specifies the WatchdogSMS text.

 

RegNo 7: Statistics

Record

 

 

ReceivedSMS:

LongInteger;

 

SentSMS:

LongInteger;

End;

 

 

ReceivedSMS

This field holds the number of SMS messages received since the PD 664 was powered up, or since the counter was last reset.

 

SentSMS

This field holds the number of SMS messages sent since the PD 664 was powered up, or since the counter was last reset.

 

RegNo 14: GUID

 

GUID:

String[22];

 

Each channel type is identified by means of a unique GUID. The value of GUID for the SMS channel is: PD/551297-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 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 manually, via P-NET. 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. An error in registers involved in calculating the result gives “Act data error”.

See summary for how ChError.His can be cleared in particular M36 slave modules.

 

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: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8: EEPROM_error_in_SMSFlagReg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

9: SendSMS_Failed

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

10: SendWatchdogSMS_Failed

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

11: Watchdog_error

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

12: EEPROM_error_in_WatchdogSMSConfiguration

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

13: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

14: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

15: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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 if the self-test finds an error in the program memory.

 

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

 

Bits 2 and 3 will cause His error in the P-NET response on access to all variables.

 

Bit 2:           InternalReset is set 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 if a reset is caused by writing 255 to Reset, via P‑NET (only a His error).

 

Bits 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:           EEPROM_error_in_SMSFlagReg is set if the self-test finds an error in the data memory (EEPROM). EEPROM fault is only set at power-up If the corresponding variable(s) is accessed, Act error in the P-NET response is set.

 

This error can occur if the power disappears, when writing to EEPROM. Consequently, a rewrite to the variable could perhaps solve the problem.

 

Bit 9:            SendSMS_Failed is set if transmission of an SMS fails. It is cleared when transmission of an SMS succeeds. This will cause Act error in the P-NET response on access to the SMSOutputBuffer variable. For example is this flag set if an invalid phone number has been selected.

 

Bit 10:          SendWatchdogSMS_Failed is set if the sending of a Watchdog SMS failed. It is cleared after a successful Watchdog SMS transmission. For example is this flag set if an invalid phone number has been selected for the Watchdog SMS. A missing telephone number leads to an immediate alarm.

 

Bit 11:         Watchdog_error is set when WDTimer in the service channel reaches zero and WDEnable is TRUE. This bit is cleared if WDTimer is above zero.

 

Bit 12:         EEPROM_error_in_WatchdogSMSConfiguration is set TRUE if the self-test finds an error in the data memory (EEPROM). EEPROM fault is only set at power-up. If the corresponding variable(s) is accessed, Act error in the P-NET response is set.

 

This error can occur if the power disappears, when writing to EEPROM. Consequently, a rewrite to the variable could perhaps solve the problem.