Suppose you need to switch PLC IP dynamically between 192.168.1.10\192.168.2.10, First, set PLC IP to 192.16.1.10. Create a PGVL with a flag ‘xUseSecondry’ xUseSecondry : bool ; create a function that use socket to update IP: FUNCTION fSwitchIP : bool VAR_INPUT useMainIP:bool; END_VAR --------------------------------CODE------ if useMainIP then SysSockSetIPAddress(‘0’, ‘192.168.1.10’); PGVL.xUseSecondry := 0; else SysSockSetIPAddress(‘0’, ‘192.168.2.10’); PGVL.xUseSecondry := 1; end_if Now, if during...
For a permanent change, you may need to update the PLC configuration file or set the IP at startup using retained variables.
I have an application stored at PlsPrg, it is not a boot application. the RTE is running, there is no application shown in the RTE info. I would like to run the application. Is it possible to do it via PLC command line?