Further diagnosis through the ADS interface
Additional diagnostic facilities are available through the ADS interface.
Read out the PROFINET name and the IP settings
An ADS READ block is to be used for this.
ADS WRITE |
Comment |
---|---|
AMSNETID |
AMS Net ID of the PROFINET device |
PORT |
0xFFFF (if a virtual PROFINET device is used, the port number is formed from 0x1000 + the device ID) |
Index Group |
High Word - 0x0000, Low Word - 0xF804 |
Index Offset |
0x0000 |
Length |
257 |
Data byte offset |
Value |
Comment |
---|---|---|
0..3 |
reserved |
reserved |
4..7 |
ARRAY4 of Byte |
IP Address |
8..11 |
ARRAY4 of Byte |
Sub Net Mask |
12..15 |
ARRAY4 of Byte |
Default Gateway |
16...x |
STRING (max. length 240) |
PROFINET Name |
Reading out the module difference
An ADS READ block is to be used for this.
ADS WRITE |
Comment |
---|---|
AMSNETID |
AMS Net ID des PROFINET Devices |
PORT |
0xFFFF (if a virtual PROFINET device is used, the port number is formed from 0x1000 + the device ID) |
Index Group |
High Word - 0x0000, Low Word - 0xF826 |
Index Offset |
0x0000 |
Length |
20882 |
The modules are identical if the length null is returned. The length can differ, depending on the type (see the ModuleDiffBlock PROFINET specification)
Example of how the data can be constructed:
Data byte offset |
Value |
Comment |
---|---|---|
0..3 |
UINT32 |
API |
4..5 |
UINT16 |
Number of Modules |
6..7 |
UINT16 |
Slot |
8..11 |
UINT32 |
Module Ident (see GSDML File) |
12..13 |
UINT16 |
Module State (0-noModul, 1- WrongModule, 2- ProperModule, 3- Substitute) |
14..15 |
UINT16 |
NumberOfSubModules |
16..17 |
UINT16 |
SubSlot |