Questo sito utilizza i cookie per migliorare servizi ed esperienza degli utenti. Se decidi di continuare la navigazione consideriamo che accetti il loro uso.

Panoramica Cerca Sopra
Dettagli del download
Communication with an external program via Communication with an external program via COM
(0 voti)

CommWithExternalProgram is a project designed to demonstrate how to transfer data between the Reliance system and an external application via the COM interface. The RandomValue and Seconds tags defined in the project are used to hold the data received from the external application. The project also contains the RelianceValue tag, which is used to send the data to the external program (you can set its value in the visualization window). The external application is located in the <Project>MainApps folder and it is automatically started upon project startup (the Project Options > Scripts > Other > After run project property specifies the Create_GlobalObject script, which is to run the program). Before the project is started for the first time, the external program needs to be started manually to register the COM object.

The project's main visualization window contains two buttons connected to the scripts that are used to start or terminate the external application. The window also contains three Display components linked to the RandomValue, Seconds, and RelianceValue tags. The Create_GlobalObject and Free_GlobalObject event scripts defined through the Script Manager are designed to start and terminate the external application (the CreateObject method is used to start the external application). The SendNewValue script is designed to send the value of the RelianceValue tag to the external application (this can be achieved by calling the SetValue method of the external application). The last object defined via the Script Manager is a periodic script named Read_ObjValues (its period is 0.3 seconds), which is used to read the values from the external program (the GetRandomValue and GetSeconds methods of the external program are used to read the values).

The external application, which is part of the example project, shows the current values of the two dynamically generated tags and the list of values received from the visualization application. The external program is written in Borland Delphi (Pascal) and supplied including the source code (the source code is located in the <Project>MainAppsSourceExternal.zip directory).

Informazioni

Versione:
Dimensione395.27 KB
Downloads0
Lingua
Licenza
Autore
Sito Web
Prezzo
Creato24-08-2015
Creato da
Modificato il24-08-2015
Modificato daroby

Solo gli utenti registrati e loggati possono scaricare questo file.

.

.