Application programming
This chapter is about how to write application programs, i.e. programs in c, c++ or java,
that attaches ProviewR. It is assumed that the reader has basic knowledge in the c
programming language.
In many ProviewR applications, coding everything in the plc editor with function object
programming works excellent. However, there are applications that with graphic programming
will be unnecessarily complex, for example advanced models, handling of databases and
material planning. In this case you write an application program in c, c++ or java, that
attaches the realtime database, rtdb. The program reads input data from rtdb, makes its
calculations, and sets outdata to rtdb, where the data is further processed by the plc program,
sent to the I/O system and viewed in operator graphs.
We will concentrate on c/c++, as this is the programming language that is most common in
application programming and also has most functionality. The interfaces used are described
in Programmer's Reference Manual (PRM).
Attach to the realtime database and handle object and data.
Write on the console log.
Start an application.
Handle system events.
Application baseclass rt_appl.
Send messages and alarms.
Communicate with other processes via Qcom.
Fetch data from storage stations.
Read and write to the I/O System.
Threadsafe strings and times
Build an application with make.
Java applications.