Command Details: Map_ADI_Write_Ext_Area
Details
Command Code: | 12h |
Valid for: | Instance |
Description
This command is only supported by Anybus CompactCom 40 devices.
This command is equivalent to Map_ADI_Write_Area, but can map more than 256 bytes of data. It supports mapping fractional byte size types, and it can be used to map only specific parts of an ADI.
It maps an ADI as Write Process Data. If successful, the response data contains the offset, in bits, for the mapped ADI from the start of the Write Process Data area.
Mapping an ADI more than once (i.e. map it multiple times to the Read- or Write Process Data, or map it to both the Read- and Write Process Data) is not accepted by all networks.
It is not allowed to mix mapping commands Map_ADI_Read/Write_Area and Map_ADI_Read/Write_Ext_Area within one area (Read/Write).
It is recommended to only map one item for each mapping command during initial development, since data area offset is only given for the first mapping item, and all mapping items may be rejected using one single error code.
All mapped elements, except those of types BIT1-BIT7 and PADx, must be byte aligned.
The only implicit padding done is from the very last mapped item up to byte alignment, since the process data needs to be of byte size when the setup is complete.
Explicit padding is done either through available ADI elements of PADx type, or through the imaginary ADI 0, which is assumed to be an array with 255 elements of type PAD1. Explicit padding of process data is the only correct use of ADI 0. Padding bits might not be visible on the network.
This command may permanently alter the state of the Anybus CompactCom 40 PROFINET IRT IIoT Secure even though the command is returned with an error. Network specific restrictions may lead to n mapping items to be accepted, but with an error on mapping item n+1. If so, the mappings up to and including n will be accepted, but all other mapping items, starting with n+1, are rejected. The number of accepted mappings is declared in CmdExt[ 0 ] of the answer.
Certain Anybus implementations allow the network to remap the Process Data during runtime. (Consult the general Anybus CompactCom 40 Software Design Guide, Application Data Object (FEh) for further information.)
See also...
Anybus CompactCom 40 Software Design Guide, Application Object (FFh)
Important
Error control is only performed on the command parameters. The Anybus module does not verify the correctness of these parameters by a read of the actual ADI attributes.
Command details:
Field
Contents
CmdExt[0]
The number of mapping items to add (0-217)
CmdExt[1]
Reserved. Set to 0
MsgData[0-1]
New mapping item 1: ADI number
MsgData[2]
New mapping item 1: Number of elements in the ADI
MsgData[3]
New mapping item 1: Index to the first element to map (0-254)
MsgData[4]
New mapping item 1: Number of consecutive elements to map (1-255)
MsgData[5]
New mapping item 1: Number of type descriptors (1-255)
MsgData[6..n]
New mapping item 1: Array of type specifiers for each mapped element
...
Repeat MsgData[0-n] (as above) for mapping item 2 and onwards.
Response details (Success):
Field
Contents
CmdExt[0]
The number of accepted mapping items (0-217)
MsgData[0]
Bit offset of the mapped ADI from the start of the Write Process Data (Least significant byte)
MsgData[1]
Bit offset of the mapped ADI from the start of the Write Process Data
MsgData[2]
Bit offset of the mapped ADI from the start of the Write Process Data
MsgData[3]
Bit offset of the mapped ADI from the start of the Write Process Data (Most significant byte)
Response details (Error):
Error
Contents
Invalid CmdExt[0]
The number of accepted mapping items, before an error occurred
Invalid State
Mapping of ADIs is only allowed in the SETUP state
Object Specific Error
Object specific error, see MsgData[1] for details:
01h: Invalid data type
The data type is not valid for Process Data
02h: Invalid number of elements
The number of elements is not valid (zero, or too many elements)
03h: Invalid total size
The requested mapping is denied because the resulting total data size would exceed the maximum permissible (depending on network type)
06h: Invalid map command sequence
The order in which the commands were received is invalid
07h: Invalid mapping command
Inconsistencies in the command makes it impossible to parse
08h: Bad alignment
The alignment rules for process data are not followed
09h: Invalid use of ADI 0
ADI 0 is an array (255 elements) of type PAD1
FFh: Network specific restriction
Mapping an ADI other than the previous (non-padding) ADI, must be done on a byte boundary. Bits from multiple ADIs cannot be mapped to the same byte.
Indicated by network specific error code 01h (total error response is FFh FFh 01h).
Error control is only performed on the command parameters. The Anybus module does not verify the correctness of these parameters by a read of the actual ADI attributes.