User Documentation
Table Of Contents
- Table of contents
- 1 Introduction
- 2 Safety instructions
- 3 System overview
- 4 Operating behavior
- 5 Software installation
- 6 Configuration
- 7 Program development
- 8 Licensing
- 9 Device Administration (DevAdmin)
- 10 Software units
- 11 OPC UA Server
- 12 Node-RED
- 13 LongtermDiagnosticMonitor
- 14 Data recorder
- 15 Diagnostics
- 16 Maintenance
- 17 Technical data
- 18 Directives and standards
- 19 Appendix: Tutorial - creating an IEC project
- 20 Appendix: Addressing in the Ethernet (basics)
- 21 Appendix: Tutorial FoE
- 22 Appendix: Tutorial - call C function from IEC
- Index

Program development
System manual
2696790000/02/04.2020
36
, --- DOSTATEREPORT -----------------------------
dostatereport = function(stareppath)
end
, --- DOCLEARRETAIN -----------------------------
doclearretain = function()
end
, --- DODELETEAPPLICATIONS ----------------------
dodeleteapplications = function()
end
}
7.3.3 Defined operation behaviour
Each DeviceServiceItem (program) can provide the following functions:
Function Inputs Return value Description
testtransition Status transition true / false
Used to test whether the required
status transition can be carried out
by the program.
dotransition
Status transition,
step number
-
Execute one step of a certain tran-
sition.
docheck -
Checks that the program is working
correctly.
dostatusreport Path
Adds files to the status report cur-
rently triggered.
doclearretain -
Deletes process of the retain files of
the applications managed by the
program.
dodeleteapplica-
tion
-
Deletes process of applications
managed by the program.
Before each status transition, the DeviceService calls the testtransition
function with the required status transition. This checks that the DeviceSer-
viceItem is able to change its status. The function must return either true
or false. No other value is permitted.
The DeviceService then calls the function dotransition with the status
transition and a step number being carried out. Each DeviceServiceItem
must execute the status transition. If an error occurs in this process, the De-
viceServiceItem must call the Lua standard function error to be able to
enter the error message with the DeviceService. The dotransition function
is not permitted to have a return value.
The DeviceService checks for error messages. If an error has occurred in
the DeviceServiceItem, the entire system is powered down. Depending on
the configuration, the control automatically starts back up in the Run status.
The DeviceService performs a cyclical check by calling the docheck function
to ensure that the registered DeviceServiceItem is working correctly.
The status report is a collection of information of all programs running on the
control at a specific point in time. When a status report is triggered, all De-
viceServiceItem are informed so that their information can be appended to
the status report.