16 Configuration Console Tool

Note for software developers:

Applications can be synchronized with the startup and shutdown using global events.

SEvent ”SimaticNetPcStationUpEvent”:

The global event ”SimaticNetPcStationUpEvent“ is in the ”signaled” state when the PC station has started up and is ready for OPC communication. Applications that require a started- up PC station and functioning OPC communication the previously had to wait for an undefined time can wait for the event and therefore be synchronized with the startup of the PC station.

SEvent ”SimaticNetPcStationDownEvent”:

The global event ”SimaticNetPcStationDownEvent“ is in the ”signaled” state when the PC station has not started up and is not therefore ready for OPC communication. Applications can wait for the event and therefore be synchronized with the shutdown of the PC station.

The event names ”SimaticNetPcStationUpEvent“ and ”SimaticNetPcStationDownEvent“ are never in the ”signaled” state at the same time. As the state changes, however, both may briefly be in the ”not signaled” state.

Application example (Win32 - API, see also MSDN Library):

...

HANDLE hUp = OpenEvent(SYNCHRONIZE, FALSE, “Global\\SimaticNetPcStationUpEvent”); DWORD dwResult;

dwResult = MsgWaitForMultipleObjects(1, &hUp, FALSE, INFINITE, QS_ALLINPUT); // evaluate dwResult

220

Commissioning PC Stations - Manual and Quick Start

Release 5/2005

C79000-G8976-C156-07

Page 220
Image 220
Siemens C79000-G8976-C156-07 quick start Application example Win32 API, see also Msdn Library