Modify wait time of MultiDownload/Online Change¶
Depending on the network infrastructure the MultiOnlineChange (MOC) might run into errors due to timeouts. The user will not be informed about these timeouts directly, but each timeout might result in errors.
Examples:
“Logfile cannot be read” (red line in PLC list even though the download/change was successful).
“Online Change not possible” (PLC changes state from “run” to “stop” during Online Change, because the wait time for loading the project was not sufficient).
To avoid these timeouts and the resulting errors the user can extend the wait times of the MultiOnlineChange plug-in/tool. These times can be adapted in the template XML file “CmdTemplate.xml”
by increasing the values in the delay
lines. The file has the following content:
<CmdTemplates>
...
<DownloadPLC>
device instance "MyDriver"
device parameter "Address" @@@ipAddress
device parameter "Port" @@@port
device parameter "Motorola byteorder" Yes
onerror continue
delay 1000
query off no
online login
delay 5000
online logout
waitevent ONL_LOGGEDOUT
query off no
online login
delay 3000
online filewrite @@@iniFileForLogging
waitevent ONL_FILEWRITTEN
online filewrite @@@uniqueIdent
waitevent ONL_FILEWRITTEN
online logout
waitevent ONL_LOGGEDOUT
query off ok
online login
waitevent ONL_PROGRAMLOADED
waitevent ONL_FILEWRITTEN
delay 3000
@@@bootproject online bootproject;
waitevent ONL_FILEWRITTEN
delay 10000
online logout
waitevent ONL_LOGGEDOUT
query off no
online login
delay 1\ 5\ 0\ 0\ 0 @@@enable online run delay 2\ 0\ 0\ 0\ 0 online fileread @@@uploadLogFile waitevent ONL\_FILEREAD delay 5\ 0\ 0\ 0 online logout file save delay 1000 system "@@@handleRiBatch" delay 2000 </DownloadPLC> \.\.\. <OnlineChangePLC> project loadcompileinfo "@@@plcDirectory\\@@@projectName\.ri" device instance "MyDriver" device parameter "Address" @@@ipAddress device parameter "Port" @@@port device parameter "Motorola byteorder" Yes delay 1\ 0\ 0\ 0\ 0 onerror continue query off no online login delay 1\ 0\ 0\ 0\ 0 online filewrite @@@iniFileForLogging waitevent ONL\_FILEWRITTEN online filewrite @@@uniqueIdent waitevent ONL\_FILEWRITTEN online logout waitevent ONL\_LOGGEDOUT query off ok delay 1000 online login waitevent ONL\_PROGRAMLOADED delay 3000 @@@bootproject online bootproject waitevent ONL\_FILEWRITTEN delay 10000 online logout waitevent ONL\_LOGGEDOUT query off no online login delay 1\ 5\ 0\ 0\ 0 online fileread @@@uploadLogFile waitevent ONL\_FILEREAD delay 3\ 0\ 0\ 0 online logout file save delay 1000 system "@@@handleRiBatch" delay 2000 </OnlineChangePLC> </CmdTemplates>
Each delay defines a wait time in milliseconds, which can be adapted by the user. As an example some of the delays are emphasized above:
- The three emphasized delay times in tag
<DownloadPLC>
can be increased to ensure that the MOC waits long enough for the log-file to be accessible after reboot before reading it. - The four emphasized delay times in tag
<OnlineChangePLC>
can be increased to ensure that MOC waits long enough for loading the project, logging in to PLC and reading the log-file.