Home > Forum > Controllers SlimLine e Netsyst (LogicLab) > IP address change from software
- This topic has 1 replies, 2 participants and was last updated 4 years, 10 months ago da Sergio Bertana.
-
AuthorPost
-
June 17, 2019 at 11: 57 am #48228MarcelloParticipant
In a home automation system consisting of one slimline and from an HMI MT8070IER I would need to be able to change the IP of the HMI SlimLine (cortex7). As for the configuration on HMI there are no problems because there is an LB to be set to TRUE when changing the IP of a device. The SlimLine needs writing (which I can't do) and reboot (which I can't do either). For writing I read that you need to use a code like this:
ok: = SysOSIDValue (TRUE, OSID_ETH0_IP, ADR (newIP));
where newIP is a USINT Array containing the 4 address valuesTo restart I tried a blocking loop like this WHILE (TRUE) DO END_WHILE; which comes into operation only if the ok variable above is TRUE. The result is that the PLC does not restart but goes into STOP and I have to restart it either through LogicLab or by switching the PLC off and on again. Furthermore, the IP address does not change. What can I do?
I add another question: is it possible to send to SlimLine via the HTTPClient FB of telnet commands? (therefore self-sending commands) or is it possible from the HMI? I ask this because through toolly the IP change operation is very simple but complicated to explain to an installer, the same thing goes for explaining to access the webPage of the SlimLine...
June 17, 2019 at 12: 10 pm #48251Sergio BertanaAdministrator ForumTo change the IP address the function is correct, but after setting it with:
ok: = SysOSIDValue (TRUE, OSID_ETH0_IP, ADR (newIP));
It is necessary to write the configuration in FLASH memory, so that upon restart the new value is accepted, use:
ok: = SysOSIDValue (TRUE, OSID_CFG_WRITE, NULL);
To restart the program system is correct what you did (See forum) but you don't have to have LogicLab connected, because otherwise the system realizes that it is in debug and stops in stop.
To connect in Telnet you can use the FB CLIManager, there is an example in the manual, if you connect to localhost on port 23 you can login and manage the commands to set the IP address and reboot.
-
AuthorPost
- You must be logged in to reply to this topic.