Changing settings by ADS
The settings for EtherNet/IP can also be changed by ADS. The Store Category must be defined in the System Manager for this. This is entered in the object 8000:2B "Advanced Options" in all EtherNet/IP devices.
The IP address from the memory is used if the corresponding flag is set. If nothing is entered there, the flag is ignored and the parameters from the System Manager are used.
ADS-Write command
AMSNetId:
Take the AMSNetId from the System Manager of the Ethernet/TP device.
Port:
In the case of the CX8095 the port number is to be permanently set to 0xFFFF.
Slave:
IDXGRP: 0x0001F480
IDXOFFS: 0x00000000
A TwinCAT restart must be carried out after making the settings.
Setting for setting (4 bytes + object size (256 bytes))
Byte Offset 0: 0x45
Byte Offset 1: 0x23
Byte Offset 2: ObjIndex LoByte (e.g. 0x8000 for Slave 1 and 0x8010 for Slave 2 and 0xF800 for the Master)
Byte Offset 3: ObjIndex HiByte
Byte Offset 4-260: Data of the object (see object description below)
Setting for resetting (4 bytes)
Byte Offset 0: 0x00
Byte Offset 1: 0x00
Byte Offset 2: ObjIndex LoByte (e.g. 0x8000 for Slave 1 and 0x8010 for Slave 2 and 0xF800 for the Master)
Byte Offset 3: ObjIndex HiByte
Object description
Offset |
Name |
Data Type |
SubIndex |
Store Category | |
---|---|---|---|---|---|
1 |
2 | ||||
0x00..0x01 |
Id |
UINT16 |
1 |
|
|
0x02..0x03 |
Reserved |
UINT16 |
- |
|
|
0x04..0x23 |
Product Name |
BYTE[32], STRING(31) |
3 |
|
X |
0x24..0x27 |
Device Type |
UINT32 |
4 |
|
|
0x28..0x2B |
Vendor ID |
UINT32 |
5 |
|
|
0x2C..0x2F |
Product Code |
UINT32 |
6 |
|
X |
0x30..0x33 |
Revision |
UINT32 |
7 |
|
|
0x34..0x37 |
Serial Number |
UINT32 |
8 |
|
|
0x38..0x7D |
Reserved |
BYTE[70] |
- |
|
|
0x7E..0x83 |
MAC Address |
BYTE[6] |
32 |
|
|
0x84..0x87 |
IP Address |
UINT32 |
33 |
X |
|
0x88..0x8B |
Network Mask |
UINT32 |
34 |
X |
|
0x8C..0x8F |
Gateway Address |
UINT32 |
35 |
X |
|
0x90..0x91 |
DHCP Max Retries |
UINT16 |
36 |
|
|
0x92..0x93 |
TCP/IP TTL |
UINT16 |
37 |
|
|
0x94..0x95 |
TCP/IP UDP Checksum |
UINT16 |
38 |
|
|
0x96..0x97 |
TCP/IP TCP Timeout |
UINT16 |
39 |
|
|
0x98..0x99 |
Multicast TTL |
UINT16 |
40 |
|
|
0x9A..0x9B |
Multicast Checksum |
UINT16 |
41 |
|
|
0x9C..0x9D |
Forward Class3 to PLC |
UINT16 |
42 |
|
|
0x9E..0x9F |
Flags |
UINT16 |
43 |
|
|
0xA0..0xFF |
Reserved |
Byte[96] |
- |
|
|
Store Category
The "Store Category" defines, which *.tsm settings should be overwritten with settings from the remanent memory. To do this, bits 9 & 8 must be set accordingly under "Flags" in the System Manager project. In order to modify both, both bits must be set.
(Bit9=Cat2, Bit8=Cat1)
ADS-Read command
AMSNetId:
Take the AMSNetId from the System Manager of the Ethernet/TP device.
Port:
In the case of the CX8095 the port number is to be permanently set to 0xFFFF.
Slave:
IDXGRP: 0x44818000
IDXOFFS: ID of the slave interface
LEN: 256
The ID of the slave is displayed in the TwinCAT System Manager on the "Configuration" tab. The ID is set by the system and can only be read.
Master:
IDXGRP: 0x4481F800
IDXOFFS:0x00000000
LEN: 256
The data are saved in the data array as described above.
CX8095 example for TwinCAT 2.11 R3 build 2254 in order to change the IP address from the PLC:
Download