Knowledge base

Message and Event Schemas

This section details the data structures and schemas used throughout the PLC diagnostic system for message processing and event tracking.

Message Schema

A Message represents a diagnostic or status update sent from a press. Each message contains details about the event, including its type, associated press, timestamp, and additional data points.

Fields:

Field Type Description
Id Integer Unique identifier for this message.
PressId Integer The ID of the press this message is associated with.
Name Text The text or description of the message.
TypeId Integer The ID linking this message to a specific Message Type.
Date Date The timestamp indicating when this message was created.
Items Array of Message Items Additional data associated with the message, such as specific values or parameters.

DowntimeTypes Enum

The DowntimeTypes enum defines the types of downtime that a message may represent.

Values:

Value Integer Description
None 0 No downtime associated.
Operator 1 Downtime caused by operator action.
Equipment 2 Downtime due to equipment failure.
Other 3 Other unspecified downtime.
SetupAndAdjustments 4 Downtime due to setup and adjustments.
IdlingAndMinorStops 5 Downtime due to minor stops or idling.
ReducingSpeed 6 Downtime due to speed reduction.
ProcessDefect 7 Downtime caused by process defects.
ReducedYield 8 Downtime due to reduced yield.

Message Item Schema

A Message Item represents a specific data point within a Message. Each item consists of a value and an associated Item Type, which defines its meaning (e.g., temperature, pressure, or speed).

Fields:

Field Type Description
Id Integer The ID of the Message Item Type this item belongs to.
Value Double The recorded value for this item (e.g., a temperature reading).

Message Type Schema

A Message Type categorizes a message, defining how it should be interpreted and displayed. It also determines whether the message is associated with a downtime event and specifies any related messages that indicate the end of an event.

Fields:

Field Type Description
Id Integer Unique identifier for this message type.
Description String A descriptive label for this message type.
MessageCategoryId Integer The ID linking this type to a Message Category.
DowntimeType DowntimeTypes Enum Specifies the type of downtime this message represents (if applicable).
FontColor String (Hex) The font color for displaying messages of this type.
BackgroundColor String (Hex) The background color for displaying messages of this type.
EndMessageTypeId Integer The ID of the type of message that indicates that this event has completed.

Processing Details:

  • A Message Type groups similar messages together.
  • The MessageCategoryId determines the broader classification.
  • If a DowntimeType is specified, this message contributes to downtime tracking.
  • The EndMessageTypeId indicates which message type concludes an ongoing event or issue.