Structures

MessageBox_HMI_typ

Contains the information for the currently active HMI popup.

Info

Descriptions of HMI_… types can be found in the HMITools library documentation.

messageBox

Name Type Description
Layer MessageBox_Layer_typ Stores data for the current state of the message
TextSnippets MessageBox_TextSnippets Stores data for displaying text
Prompt HMI_TextBox_typ Stores data for the prompt
UserInput HMI_TextBox_typ Stores data for the user input
Buttons1 - Button5 HMI_Button_typ Stores button data

messageBox.Layer

Stores data related to the current state of the message.

Name Type Description
Active BOOL Indicates if the current layer is active on the HMI
Status UINT Error status for the current layer. 0 indicates success

messageBox.TextSnippets

Stores data related to test display.

Name Type Description
Message STRING[260] Message displayed in the main section of the MessageBox
UserString STRING [260]
Buttons1 STRING[80] Button1 text
Buttons2 STRING[80] Button2 text
Buttons3 STRING[80] Button3 text
Buttons4 STRING[80] Button4 text
Buttons5 STRING[80] Button5 text

MessageBox_Message_typ

This structure maintains message data.

myMessage

This structure is used to maintain all message related data in one place.

Name Type Description
pUserString UDINT The variable with the user input data
MessageID UDINT ID used to identify the message
Prompt MessageBox_Message_Prompt_typ Prompt information
Buttons MessageBox_Button_typ[0..4] An array of buttons

myMessage.Prompt

Name Type Description
pText UDINT The main popup message
Index UINT The popup’s location in the queue

myMessage.Buttons[i]

Name Type Description
pText UDINT The main popup message
Index UINT The popup’s location in the queue
pCmd UDINT A pointer to the button command variable

Errors

Name Value Description
MESSAGE_ERR_INVALID_ID 0 The messageID entered is not in the queue
MESSAGE_ERR_ALREADY_INIT 1 The MessageBox is already initialized. This commonly occurs when MessageBoxInit() is called cyclicly
MESSAGE_ERR_OUT_OF_MEMORY 2 There is not enough space on the heap for the number of messages requested in MessageBoxInit()
MESSAGE_ERR_BUFFER_FULL 3 Occurs when the messages in the queue have exceeded the number specified in the MessageBoxInit()
MESSAGE_ERR_UNINITIALIZED 4 Occurs when MessageBoxInit() was never used
MESSAGE_ERR_EMPTY 5 Unused
MESSAGE_ERR_INVALID_POINTER 6 The pointer to the MessageBox instance is invalid
MESSAGE_ERR_ 7 Used as a placeholder for starting message IDs