GET_IPAddr  dmindex
Purpose To return the IP address of this PLC's built-in Ethernet port and store each '.' separated valued and the port number in DM[dmindex] to DM[dmindex+4].
Examples

GET_IPAddr 100    'Return the IP address and port

Assuming the IP address stored in the PLC is 192.168.1.101 and the port number is 9080:

DM[100] = 192
DM[101] = 168
DM[102] = 1
DM[103] = 101
DM[104] = 9080

 

Comments:
  • To return the IP address of a PLC's Ethernet port into the variables DM[100] to DM[104] (e.g. to display on a HMI panel), you can invoke a function that runs GET_IPAddr.
  • This command is ignored by i-TRiLOGI  simulator.
See Also SET_IPAddr, GET_DNS, GET_GATEWAY, GET_SMTP, GET_SUBNET

backbutton.gif (507 bytes)  Basic to TBASIC Reference Manual