| Dettagli del download |
|
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). |
|
|||||||||||||||||||||||||||||||||

Gli esempi presenti su questo sito sono stati liberamente inviati dagli utenti di automationforum.it, è stato espressamente specificato loro di inviare solo esempi FREE. Automationforum.it non si ritiene responsabile dell'eventuale presenza di esempi rilasciati sotto licenza commerciale, Automationforum.it invita tutti coloro che individuano esempi rilasciati sotto licenza commerciale presenti in questa raccolta a segnalarlo dall'apposito