SET_WIFI_GATEWAY  dmindex
Purpose To set the IP address of the Internet gateway that this PLC's WIFI port is to connect to using the parameters stored in DM[dmindex] to DM[dmindex+3].
Examples
	
	DM[100] = 192
	DM[101] = 168
	DM[102] = 0
	DM[103] = 1
	SET_WIFI_GATEWAY 100	' Set the gateway address to 192.168.0.1
	SETSYSTEM 252,0 	' (only required for Nano-10 and FMD PLCs)    
	RESTART 		' Reboot the PLC
Comments:

  • To change the IP address of the network gateway that the PLC WIFI to connect to(this is the pathway to connect to the Internet, for small network this is typically the IP address of the WIFI router). You can load the new gateway IP address into the variables DM[100] to DM[103]  (e.g. from a HMI panel) and then invoke a function that runs SET_WIFI_GATEWAY 100 to write the new gateway address into the PLC.
  • For Nano-10 and FMD PLCs,  you should backup the new gateway IP address in FLASH (using the SETSYSTEM 252,0 command) and restart (cold boot) the PLC after changing the gateway IP address so that the new gateway IP address will be saved into the virtual EEPROM . This is not required for Fx and Wx PLCs.
  • The PLC will only assume the new gateway IP address after it has been rebooted (via the RESTART command or power-on reset).
  • This is applicable to all models.
  • This command is ignored by i-TRiLOGI  simulator.
See Also GET_WIFI_GATEWAY
GET_WIFI_IPADDR, GET_WIFI_SUBNET, GET_WIFI_DNS, GET_WIFI_MACID,
SET_WIFI_IPADDR, SET_WIFI_SUBNET, SET_WIFI_DNS

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