Graco 332564B Read Alarm Info, Yymmdddw, Example Ascii Character String Decode Algorithm

Models: 332564B

1 104
Download 104 pages 58.79 Kb
Page 55
Image 55

Operation Using a Programmable Logic Controller (PLC)

Read Alarm Info

The Read Alarm Info command allows remote access to any of the last 200 alarms logged by the ProMix PD2K. The argument is the chronological index of the alarm log, where 0 is the most recent alarm and 199 is the 200th most recent.

The date is returned as a four-byte packet with each byte holding a two-digit value for (from MSB to LSB) year, month, day, and day of the week (Monday = 01).

The time is returned as a three-byte packet with each byte holding a two-digit value. Starting from the MSB, the first byte can be ignored, then hour, minute, and second.

The alarm code is a four-character little endian ASCII string

See System Errors, page 88, for more details on these Event Types. An example decoding algorithm is provided below.

Example: Read back the second most recent alarm, which was a Position Pump 1 (DK01) recorded on Tuesday June 3, 2014 at 8:11 AM.

DCS Register

Parameter Description

Data

Units

Value

Range

 

 

Type

 

 

 

DCS

Read Alarm Info

uint32

NONE

15

0 - 16

Command

 

 

 

 

 

Argument 0

Alarm Index

uint32

NONE

1

0 - 199

 

 

 

 

 

 

Acknowledge

Command Acknowledged

uint32

NONE

2 = ACK

0 - 4

Return 0

Alarm Date

uint32

[YY:MM:DD:DW]

0x0E060302 =

N/A

 

 

 

 

[14:06:03:02]

 

Return 1

Alarm Time

uint32

[xx:HH:MM:SS]

0x080B0B =

N/A

 

 

 

 

[08:11:11]

 

Return 2

Alarm Code Char[3:0]

uint32

NONE

0x31304B44 = [‘1’,

N/A

 

 

 

 

’0’, ’K’, ’D’]

 

Example ASCII Character String Decode Algorithm:

 

 

 

character_str[0] = Return_2 & 0xFF;

 

 

 

 

character_str[1] = (Return_2 >> 8) & 0xFF;

 

 

 

 

character_str[2] = (Return_2 >> 16) & 0xFF;

 

 

 

 

character_str[3] = (Return_2 >> 24) & 0xFF;

 

 

 

 

character_str[4] = ‘\0’;

 

 

 

 

332564B

55

Page 55
Image 55
Graco 332564B important safety instructions Read Alarm Info, Yymmdddw, Example Ascii Character String Decode Algorithm