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

Appendix: Tutorial - call C function from IEC
System manual
2696790000/02/04.2020
127
rv1: DINT;
res1 : REAL;
res2 : STRING [106];
END_VAR
In the code area the IEC function MyCFunction is called as follows:
rv1 := MyCFunction( in_dword := 17, in_string := 'Hello c-Function',
in_real := 25.58, out_real => res1, out_string => res2);
The variables res1 and res2 contain the variables calculated in the C func-
tion which can be used later in the application.
Then the project can be loaded to the control (see online help u-create stu-
dio) and finally it can be executed.