The ABB D2D function blocks are intended to use with the ACS880 drives. It provides drive to drive communication and drive to drive configuration function blocks for application programming in the Automation Builder environment. The description of the features in this document is based on the ABB drives D2D communication library version 1.9.0.2.
In the Drive Composer pro system information, make sure that the drive is installed with the corresponding system library. In System info, the D2DComm library version is located under the “Products More” view. The D2DComm library versions must be same in the drive and the application program project.
Function block name |
Description |
---|---|
Data read/write |
|
DS_ReadLocal |
Reads data from the local dataset. |
DS_WriteLocal |
Writes data to local dataset. |
Drive to drive communication |
|
D2D_TRA |
Transmits data to a remote drive. |
D2D_REC |
Receives data from the remote drive. |
D2D_TRA_REC |
Transmits and receives data from the remote drive. |
D2D_TRA_MC |
Transmits multicast messages to group of drives. |
Drive to drive configuration |
|
D2D_Conf |
Configures token management on master drive. |
D2D_Conf_Token |
Configures the node related transmission cycle of token on master drive. |
D2D_Master_State |
Returns status of master drive connected with D2D link, except its own status. |
D2D block error codes
Bit |
Value |
Description |
---|---|---|
0 |
D2D_MODE_ERR |
D2D is not active or message type is not supported in current D2D mode (Master/ Follower). |
1 |
LOCAL_DS_ERR |
Local dataset number out of range (1…255). |
2 |
TARGET_NODE_ERR |
Target node out of range 1...62. |
3 |
REMOTE_DS_ERR |
Remote dataset number out of range (128…255). |
4 |
MSG_TYPE_ERR |
Unsupported message type (value out of range 0...5). |
5 |
TOO_SHORT_CYCLE |
Communication overload (short token cycle). |
6 |
INVALID_INPUT_VAL |
Input value out of range (Target node and/or cycle time). |
7 |
GENERAL_D2D_ERR |
Some unspecified error situation in D2D driver. |
8 |
RESPONSE_ERR |
Syntax error in the received response. |
9 |
TRA_PENDING |
Message not sent. |
10 |
REC_PENDING |
Response not received. |
11 |
REC_TIMEOUT |
No response received. |
12 |
REC_ERROR |
Frame error in reception. |
13 |
REJECTED |
Message has been removed from the transmit buffer. |
14 |
BUFFER_FULL |
Transmit buffer is full. |
15 |
D2D_NOT_SUPPORTED |
Target is not supporting D2D. |
D2D blocks
D2D_TRA / D2D_REC blocks
The examples below describe how the D2D_TRA and D2D_REC blocks are used for sending and receiving data.
The D2D_TRA block is used to send data in WORD and REAL data format to remote drive address 1 and dataset 128.
The DS_ReadLocal block is used to read the dataset in remote drive.
The DS_WriteLocal block is used to write WORD and UDINT values to remote drive dataset 129.
The D2D_REC block is used to receive data from the master drive.
Token send configuration blocks
The example below describes how the D2D_Conf_Token and D2D_Conf blocks are used for sending tokens.
In token send configuration, the master drive configures the token. After the follower receives a token from the master, the follower node sends follower to follower (point to point) or multicast message.
Using the D2D_Conf_Token block, you can add a node into the token send configuration with own instance or common instance. The example below is a common instance configuration using the ConfToken. When all the nodes are included, the D2D_Conf is executed.
In this example, a previous configuration with the following nodes existed: remoteNode1 and remoteNode2. A new configuration is set that includes only remoteNode1 for which remoteNode2 must be removed from the existing configuration.
Each testStep represents a separate executed run cycle.
-
testStep(1) - remoteNode1 is added into new configuration
-
testStep(3) - remoteNode2 is removed from configuration
-
testStep(4) - D2D_Conf is invoked and starts sending token to remoteNode1 VAR
ConfToken: D2D_Conf_Token; ConfD2D: D2D_Conf; VAR_END
CASE testStep OF
0: // Initialize configuration blocks ConfToken(Enable:= FALSE); ConfD2D(Enable:= FALSE); testStep:= testStep + 1;
1: // Add remoteNode1 into configuration set-up (on rising edge of Enable) ConfToken(Enable:= TRUE, TxmCycMultiplier:= 2, RemoteNode := remoteNode1); testStep:= testStep + 1;
2: // Reset Enable pin
ConfToken(Enable:= FALSE); testStep:= testStep + 1;
3: // Remove remoteNode2 from configuration set-up, by setting TxmCycMultiplier:= 0
ConfToken(Enable:= TRUE, TxmCycMultiplier:= 0, RemoteNode := remoteNode2); testStep:= testStep + 1;
4: // Launch new D2D configuration on rising edge of Enable (start of communication with remoteNode1)
ConfD2D(Enable:= TRUE, TokenTxmCycle:= 1000); testStep:= testStep + 1;
10: // Stop sending tokens (end of the communication) ConfD2D(Enable:= FALSE);
testStep:= testStep + 1;