2 Screenshots

About This File

A Library containing a function Block that can be run on any Omron NJ or NX PLC. The Function Block will retrieve the host PLC's IP address, Subnet Mask, Gateway, and MAC Address. The Port Details are displayed through 2 structures , 1 per-port. In the event you only have 1 Ethernet port then the structure for the 2nd port will contain all 0s. Data Format:

IP Address - USINT[4]

Subnet - USINT[4]

Gateway - USINT[4]

MAC - BYTE[6]  (hex value)

Access the retrieved details by the typical parent-child tag structure. ex. Port_1_Detals.IP_Address[0] will get the first octet of Port 1's IP.

Tested on: NX1P2, NX102, NX502, NX7, and NJ301

IMPORTANT: This Function Block should not be run immediately after startup. Allow the PLC a few seconds to establish a connection with the Ethernet network.


1 person likes this