beautypg.com

Using mailbox function blocks – ProSoft Technology PTQ-PDPMV1 User Manual

Page 130

background image

Configuring the Processor with Concept 2.6

PTQ-PDPMV1 ♦ Quantum Platform

User Manual

PROFIBUS DP Master Network Interface Module for Quantum

Page 130 of 306

ProSoft Technology, Inc.

August 12, 2014

4.11 Using Mailbox Function Blocks

4.11.1 Overview

The mailbox function blocks build mailbox requests to the module and read the
mailbox response from the module. These mailbox function blocks are optional,
meaning that the project will update PROFIBUS data and status information even
if no function blocks are used.

4.11.2 Configuration

The mailbox function block contains input, outputs and input/output pins that
must be associated to specific variables.

The mailbox function blocks (except Get Alarm, which will be covered later)
require the usage of the following pins (common for all mailbox function blocks):

Pin Name

Pin Type

Description

StatIn

Input

Input Status pin. Must be associated to the imported variable
PTQPDPMV1_In_Stat. It contains the status transferred from the
module allowing the mailbox function block to receive the
acknowledgment that the mailbox request was processed by the
module. It is used also to check if a new mailbox response is
available.
Note: The actual variable name corresponds with the module
name you configured in PCB. The data type names in these
examples use the default module name (PTQPDPMV1).

MailIn

Input

Input Mailbox pin. Must be associated to the imported variable
PTQPDPMV1_In_Mail. It contains the mailbox response
message that is handled by the function block according to its
mailbox ID.
Note: The actual variable name corresponds with the module
name you configured in PCB. The data type names in these
examples use the default module name (PTQPDPMV1).

StatOut

Input/Output

Output Status pin. Must be associated to the imported variable
PTQPDPMV1_Out_Stat. It is used to check if a new mailbox
response is available.
Note: The actual variable name corresponds with the module
name you configured in PCB. The data type names in these
examples use the default module name (PTQPDPMV1).

MailOut

Input/Output

Output Mailbox pin. Must be associated to the imported variable
PTQPDPMV1_Out_Mail. This variable stores the mailbox output
variable that is updated from the function block when a new
mailbox request is performed to the module. It consists of an
array of words.
Note: The actual variable name corresponds with the module
name you configured in PCB. The data type names in these
examples use the default module name (PTQPDPMV1).

"Trigger"

Input/Output

Move a value of 1 to this register to initiate the mailbox request. A
request can only be initiated if its current value is 0 and all
triggers for the other mailbox function blocks also have a value of
0. The actual name for this trigger register will be specific for each
mailbox function block. For example, for the SetOperate mailbox
(SETOPMD) the trigger register is SetOper.