Type of communication and data sharing in PROMOTIC application

Each application focused on monitoring and controlling technological processes will probably need to get or to save data from(to) external sources. The source of such values can be for example a database, PLC device, hard disk file, input/output PC card, etc. This chapter shows the cases that are practically eligible and shows how to solve such cases in the PROMOTIC system.

1. Communication with PLC or similar devices


By this communication the PROMOTIC application gets data from external devices - PLC devices, intelligent inputs/outputs, etc. The device is the most often connected via Ethernet or over the serial line (to PC for example over the port COM1, COM2, etc.). It can be also connected by special card, for example for PROFIBUS DP Siemens, etc.

Over the serial line (RS232/RS485/RS422 interfaces) or over the Ethernet the PLC device can "talk" by its special language, which means by the communication protocol. For example SAIA PLC is using the S-BUS protocol, Modicon (and others) is using Modbus protocol, etc.

The PROMOTIC system has ready the set of so called communication drivers that can transfer data by the most used protocols. Using these PROMOTIC drivers is cheap and very common.
Let' handle the case when a PROMOTIC driver doesn't exist for the external device or the device communicates over another interface than a serial link or Ethernet:
The most standard solution now is to use the OPC server, which is 3rd party software (mostly supplied directly from the producer of such device). The software can communicate with the device and it provides data (that it can interchange with the device) over the OPC standard interface. Then the PROMOTIC application as the OPC client co-operates with this OPC server and it can read/write data from/to the device. For the description of the incorporation into the PROMOTIC application see the Communication by OPC interface.
Now the DDE server, the already obsolete but still used solution, is used for the communication with devices. The principle is practically the same as for the OPC server. But the DDE interface is not so quick for the data packets transfer and it doesn't allow such general configuration of the transfer as the OPC server. The DDE interface is rather the interface for the data transfer determined for office needs and not for the real-time communication. For the description of the incorporation into the PROMOTIC application see Communication by standard interface DDE.
Another practically applied solution is to use the ActiveX technology. Another company in this solution provides the software that can communicate with the specified device. This software doesn't provide the data over the standard device (as the OPC or DDE) but the software represents an ActiveX object that can be included into the PROMOTIC application by means of the PmActiveX Promotic object. Over this ActiveX object it is possible to call methods (according to the documentation of this object) and thus to get data from/to the device. An example of such communication can be the communication with PLC devices of the Johnson ControlsorAMiT company.

2. Communication between application by computer networks

The simplest way how to share data in the networks is to share them in the PROMOTIC system by the XML data. This way is also very general because you work in the HTTP protocol and thus the data can be transferred even in the Internet. The offered data (from the PROMOTIC application) can be very simply used either in another application (e.g. again PROMOTIC), to show them on HTML pages or to browse them directly in the WEB browser. For the description of the incorporation into the PROMOTIC application see: XML data sharingorOverview of the WEB technology in the PROMOTIC system.
Another standard option is to use Communication drivers. Some drivers are able to communicate via Ethernet. It is possible to communicate with the PLCs, through the installed networks, that have only the serial link communication available - this can be done by using the serial link/Ethernet converter on the PLC side.

The PmChar driver seems to be interesting, it can be used to transfer the designer predefined data via TCP or UDP protocol.

The obsolete method how to quickly share the data between the PROMOTIC applications in the local networks is the data transfer over Sockets. The data are transferred over the TCP/IP (Transmission Control Protocol/Internet Protocol) or the IPX/SPX (Novell Corporation's Internet Packet Exchange/Sequenced Packed Exchange) network protocol. But this way of the transfer isn't so transparent as the transfer over the XML and it serves only for the communication between the PROMOTIC applications. For the description of the incorporation into the PROMOTIC application see Data transfer in network over Sockets.
For data sharing in the local networks the above mentioned standard interface OPC or DDE can be used. These interfaces enable the data transfer even in the networks and the following extensions must be installed - for the DDE it is the NetDDE and for the OPC it is the DCOM. The data transfer in these cases is otherwise transparent but demanding more configuration.

3. Communication with input/output cards plugged in the PC where PROMOTIC application runs

In this case the input/output card is plugged in the PC (e.g. in ISA or PCI slot) and it scans for example analog or digital inputs/outputs. This information must be shared in the PROMOTIC application.

The normal practice is the use DLL libraries. Practically every producer of such cards (e.g. AXIOM, MOXA, PCLab, Tedia, Advantech, Neovision, Elcom, National-Instruments cards, etc.) supplies a driver for this card in the form of the DLL library. The DLL library is simply a file where functions that can be called in the PROMOTIC system, are "packed". The DLL functions can be called in the PROMOTIC system by the PmDll object. By calling appropriate functions (according to the documentation of the driver) it is possible to share the data between the card and the PROMOTIC application.

For some cards (e.g. Neovision, National-Instruments, Advantech) the OPC servers are available. It makes the communication solutions very standard, in fact the same as communication with the PLCs.

4. Data transfer by file or database access

The data sharing in a file on the hard disk can be considered as perhaps the "most elemental" communication between applications. Two applications that share data in such way must know the specific file format. The PROMOTIC system enables writing and reading into binary and text files. For the list of the file functions see Data sharing by files. But the data sharing in this way is relatively slow and it needs an access to the hard disk. Thus it isn't suitable for real-time data sharing but it is suitable for storing a large volume of data for the later use.
The more standard way of data sharing is an database access. In the PROMOTIC system the access into databases is handled by the PmAdo and PmDatabase, Promotic objects that accesses databases by the general way over the standard ADO, ODBC or DAO interface. These interfaces allow an access into any database that supports this interface (these are practically all common databases). To have an access into the database the PROMOTIC application must only have the appropriate database driver. The PROMOTIC system already includes the drivers for common databases like Microsoft Access, dBase, etc.
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice