On this page
OPC AE client
Windows OPC AE event subscription, conditional reception and variable mapping driver
Compatible devices and models
| Device series / model examples | Connection requirements |
|---|---|
| Device servers or industrial software exposing OPC Classic AE | Configure the OPC AE server, ProgID and COM/DCOM permissions on Windows. Devices are accessed through their AE server. |
Connect an event source from a server alarm condition
OPC AE receives event notifications; OPC DA reads current Item values. In an AE-capable server, configure an alarm condition for a source such as Channel1.Device1.Temperature. Source and ConditionName are separate identifiers.
KEPServerEX areas, sources, conditions and thresholds
First make the linked Tag update correctly in KEPServerEX. Configure events under Alarms & Events in the order Area → Source → Condition → Sub-Condition. The following configuration windows come from the installed KEPServerEX6.6 vendor help.
- Add an Area such as
Area1and keep Enable selected. An area organizes event sources; it is not a PLC station or variable address.
- Add a Source below the area. Use … beside Tag to browse an existing server Tag, for example
模拟器示例.函数.Ramp1, or the intended device point. With Use the tag name as the source name selected, the Tag address names the source; clear it to enter a custom Name. Update Rate defaults to1000ms, range100–60000, and limits how quickly the source receives Tag updates. Keep the source enabled.
- Add a Condition below the source. The window shows MULTI_LEVEL, which provides HI_HI, HI, LO and LO_LO subconditions. Start with Deadband type None and value
0. Absolute uses an engineering-unit change threshold; Percent derives a percentage threshold from Range. Enable the condition to produce conditional events.
- Under Sub-Condition General, select each required subcondition and set Description, Severity, Enable and its in-to/out-of/ack messages. Clear Auto-Acknowledge when clients must acknowledge it. Severity must fall within the gateway subscription filter’s range.
- Under Sub-Condition Triggers, configure the comparison. For a fixed high limit, select Value, enter threshold
80and choose Source > Threshold. Values above80 activate the subcondition; crossing back produces an exit transition. The Tag option shown below uses another numeric Tag as a dynamic threshold. Its Update Rate applies to that threshold Tag. Do not enter the text80 as if Tag mode accepted a fixed value.
After saving, browse Areas and event sources in the gateway and copy the qualified SourceID. Area, Source, Condition and subcondition represent organization, input data, alarm rules and individual states respectively. Use the browsed SourceID as the variable address, not MULTI_LEVEL or HI_HI, and do not invent an area prefix from the DA Tag name. Compare the same source in Recent events before configuring filtering, variables and storage.
Connect events in the gateway
- Obtain the server’s actual AE ProgID and URL, for example
opcae://localhost/Kepware.KEPServerEX_AE.V6. Changing a DA or UA URL prefix does not create an AE service. Create a device under No channel, name itCollect_OPC_AEand select OPC AE client. Keep Allow method calls off; the execution interval does not set the server’s alarm trigger period.
- Open Plugin properties and enter the OPC AE URL. Use
localhostfor a local server; a remote connection also needs the approved COM/DCOM runtime identity. The connection-check interval is in minutes (10in the figure); reducing it does not generate more events. Save and enable the device, then check connection and subscription state under Protocol debugging → Core status.
- Browse Protocol debugging → Areas and sources and copy the complete SourceID. Click Add variable, enter
TemperatureAlarm, selectCollect_OPC_AEand enable the variable.
Paste the complete SourceID into the address. The illustrated Channel1.Device1.Temperature identifies an event source, rather than a PLC register, ConditionName or alarm message. Select Object, Read only, and array length 1, then save.
- Keep the subscription active and include this Source and its severity in the filters. Change the associated Tag according to the server’s alarm rule. Compare Source, ConditionName, EventTime, ActiveTime and Cookie in Recent events with the variable object. Restore the source value and inspect subsequent condition changes. Without a new event, the acquisition timestamp need not advance every second as a polled point would.
Filtering, refresh and acknowledgement
Event type filters distinguish Simple, Tracking and Condition events. Category and returned-attribute IDs belong to the current server. Areas, sources and severity filters jointly determine which events arrive. Buffer time and batch size do not change alarm thresholds.
Under Subscription filters, read the current settings before editing and applying them. Enter one area or event source per line. Minimum/maximum severity bound the server’s Severity field. Keep Active enabled to receive notifications. Subscription buffer is an aggregation delay in milliseconds; maximum buffer count limits the notification batch, with 0 using the server default. Keep-alive is the notification interval when no events occur.
Subscription refresh requests current condition states, not the complete history. To acknowledge an event, select its latest original record and supply the actor/comment. Source, ConditionName, ActiveTime and Cookie identify the condition; message text alone is insufficient.
Event storage defaults to disabled. Enable it with the database type, connection, table and retention period when persisted queries are required. Defaults are SQLite OPCAE_Event.db and table opcAeEventLog. The gateway identity needs write access. Retention days control history cleanup, not subscription timeout.
Table splitting/timezone affect storage and queries; cache, queue and batch options affect persistence buffering. They do not change AE filtering or acknowledgement. Clearing Recent events leaves persisted records intact.
In device properties, select Event storage → Add, configure the fields, confirm, then save the device.
| Storage field | Configuration |
|---|---|
| Enable OPC AE event logging | Stores newly received events when enabled. Adding settings alone does not enable logging. |
| Connection string and database type | Must match. The SQLite example is Data Source=OPCAE_Event.db;Pooling=False; the gateway process needs file access. |
| Table name | Defaults to opcAeEventLog. Choose the device’s event table consistently with history queries. |
| Retention days | Defaults to 3650; set the required history retention period. |
| Timezone offset | For example +08:00; empty means UTC. Use the same time basis for history queries. |
| Offline cache | Buffers records during temporary database outages for later persistence. |
| Queue limit | Defaults to 100000 records awaiting storage; size for event bursts and available memory. |
| Maximum cache-file rows | Defaults to 262144, limiting records per cache file. |
| Batch size | Defaults to 2000 records per batch. Larger batches increase individual write latency. |
| Table splitting | Defaults to no splitting. Match the maintenance/query period and existing table naming. |
Prerequisites
Before using this plugin, you must install OPC Core Components (OPC Core) on the Windows hosts running the gateway and the OPC AE server. Match the component architecture to the corresponding process.
Open the plugin
Enter “Development Configuration → Collection Configuration”, create a device and select “OPC AE client” in “Device Plugin”.
Supported channels and data types
| Channel type | Pre-configuration check |
|---|---|
| Plugin built-in connection | Connection parameters are configured in the device dynamic properties and do not use public TCP, UDP or serial channel parameters. |
Optional data type: Object (determined by protocol node or payload)
Plugin properties
Connection configuration
| Setting | Description |
|---|---|
| OPC AE URL | Default: opcae://localhost/Kepware.KEPServerEX_AE.V6. Enter the target server’s OPC AE connection URL. |
Running parameters
| Setting | Description |
|---|---|
| Recheck Rate (min) | Default: 10. Connection check and reconnection interval in minutes. |
Event storage
| Setting | Description |
|---|---|
| Event Storage | Disabled by default. Configure a relational database connection, table name, and retention period before enabling it. The defaults use SQLite file OPCAE_Event.db and table opcAeEventLog. Save the settings and restart the device; newly received events can then be queried and exported under Persisted events. |
Address rules
Use the full OPC AE event source ID as the variable address, for example Channel1.Device1.AlarmHigh. Copy the qualified name from Areas and event sources, preserving its path and case. Event notifications update the variables; register polling and variable writes are unsupported.
Device debug
Enter “Development Configuration → Collection Configuration”, select the current device then open “Protocol Debug” at the top of the workspace.
Dedicated debugging page
The page uses the current device connection. Check the server and subscription state under Core status, then select a query or subscription operation.
Functions
| Function | Purpose |
|---|---|
| Core status | Check the connection, server time, subscription activity, buffer, and keep-alive parameters. |
| Areas and event sources | Browse qualified names. Select a node to read its enable state or enable and disable its conditions. |
| Categories & attributes | Query event categories, attributes, and condition definitions. Read or select the attribute IDs returned for a category. |
| Condition | Read the current state for a source and condition name, or translate its associated DA item addresses. |
| Subscription filters | Read or set event type, severity, category, area, and source filters. Adjust subscription activity, buffer time, maximum buffer size, and keep-alive. |
| Recent events | Inspect source, time, severity, condition and attributes; retain the original identifiers of events requiring acknowledgement. |
| Acknowledge alarm | Add each original source, condition, active time and Cookie to the acknowledgement list, then enter the actor/comment and inspect each server result. |
| Persisted events | Query, filter, and export records already written to the event database. Enable Event Storage first. |
Refresh server subscription requests the current conditions again. Cancel condition refresh cancels that refresh while live event reception continues. Clear recent events clears the recent in-memory list and preserves stored history.
Under Acknowledge alarm, enter the original Source, ConditionName, ActiveTime and Cookie, then select Add for each event. Preserve the original time zone and fractional seconds. Use the Cookie returned with that event. Enter the acknowledger and comment before submitting. One source may have several conditions; the source name alone does not identify the alarm occurrence.
Verify the configuration
- Confirm that the OPC AE server is reachable from the Windows gateway and that the device is online.
- Create a variable for a known source using its full source ID.
- Trigger a test event at that source.
- Compare source, condition, time, and attributes under Recent events. Confirm that the variable value and collection time update.
- Clear the test condition and confirm that the subsequent state event arrives. Use Read condition state on the Condition tab to inspect its current state.
- With event storage enabled, find the same event under Persisted events. Stored records should remain available after clearing recent events.
Troubleshooting
- Recent events stay empty: an empty list is normal until an event arrives. Trigger a test event, then check subscription activity and filters.
- The device is offline: check the Windows host, OPC AE URL, ProgID, DCOM permissions, and server process.
- Events arrive but variables do not update: check the full source ID, path, case, and the variable’s latest error.
- Messages are dropped or truncated: reduce the test event rate and inspect debug queue counters and message size limits.
- Persisted events stay empty: confirm that storage is enabled, the device was restarted, the database is writable, and new events arrived after enabling storage.
- Some acknowledgements fail: inspect the individual results, refresh recent events, and select the original event again, preserving its active time and Cookie.
Related links
- Collection configuration: View channel, device and common variable configuration.
- Plugin Index: Find other collection or data-forward plugins.




















