Saturday, February 25, 2012

Access IP information of 1756-ENBT/1788-ENBT modules with MSG instruction

The following steps describe how to access the IP Address for the 1756-ENBT via the user program. This also works with 1788-ENBT module.
The Source or Destination tag ipinfo is a SINT array of 22 elements, but may be longer if a Domain Name is included - see the Notes at the end.


To GET the module IP Address, configure a CIP generic message instruction, as shown below:



To SET the module IP Address, configure a CIP generic message instruction, as shown below:




Notes:
If a Domain Name is included in the SINT array, the source length may have to be up to 70 bytes long:
SINT[20..21] Word value containing number of characters in Domain Name
SINT[22..69] Domain Name - 48 ASCII characters

Read Array length should always be 70 bytes:
  • 20 for addresses
  • 2 for length
  • 48 for possible ASCII domain name

Write Array length should be 22 plus the length value in ipinfo[20], padded to an even number of bytes (pad not included in the length).

1 comment: