<< Click to Display Table of Contents >>
Reading Events from Schneider Electric Relays from SEPAM 20, 40, and 80 Series |
To read SEPAM relays, the offset model of addressing must be configured as Data is addressed from 0, on the Modbus tab. Reading these events is performed using the following basic types of Tags:
•Tag for collecting all table events (mandatory): Performs a collect of all table events from a certain memory zone on a device. This Tag, in addition to returning all events read to an event-reported application, still stores events read in this Driver's internal buffer, to remove them using readings on Tags for reading a single event, described next
•Tag for reading a single event (optional): Returns events received from a specified relay, with a certain address, type, and zone. This Tag does not perform a direct reading from a device, but returns events from this Driver's internal buffer, stored during the reading of a Tag for collecting all table events, described previously, that is, to be able to read events with this type of Tag, a Collecting all events-type Tag must be already active, with its scan enabled. This Tag is useful when users need to get events from a specific type and source, such as relay, zone, address, and type. An example of usage is an association to Screen objects, displaying the status of a certain event address. Although this Tag returns the same information returned by the previous Tag, its usage prevents users from creating filters, Select Case clauses in VBScript, or any other method to separate several types of events returned by a Tag for collecting all events by script in an application
An application must implement a Tag for collecting all events for each table or event zone to collect on each relay, because it is during the reading of this Tag that actual events are collected from a device. Configuration for these two Tags is presented next.
This is an event-reported Tag. Its typical usage is inserting events in a linked Historic, by using Historic's WriteRecord method, called on Tag's OnRead event. At each reading, that is, at each Tag's scan period, this Driver can collect up to 4 (four) new events from a device. This is the maximum number of events that each relay's event zone contains at each reading request.
As it is during the reading of this Tag that events are effectively collected from a device, even if its data is not used directly, that is, even if there is no need to store all events in a Historic, its implementation is mandatory for single-event Tags to return data. A Tag for collecting all events must be configured as a Block Tag with 3 (three) Elements, and with the following parameters:
•Device: "<slave id>:"
•Item: "spsoe<Zone or Event Table (1 or 2)>"
Example: To read Zone 1 (one) of Slave 1 (one), Device is equal to "1:" and Item is equal to "spsoe1". Alternatively, Device can be equal to "" and Item equal to "1:spsoe1". For more information, please check the topic String Configuration.
To use numerical configuration, users must define, on the Operations tab, an operation that uses as its reading function the special function SP SOE. Its data type is automatically defined as SP_events, as soon as the SP SOE reading function is selected.
•B1: 1000 + Slave address (relay) on the network, between 1 (one) and 247
•B2: Code of the operation configured with special reading function SP SOE
•B3: 0 (zero)
•B4: Zone or event table (1 or 2)
The next table describes the meaning of the Block Elements, which have their values returned as reported by events.
Meaning of Block Elements (SP_events data type)
Offset |
Meaning |
Data Type |
Range of Values |
---|---|---|---|
0 |
Type of event |
Word |
From 0 (zero) to 65535 (800H for Remote Annunciation, Internal Data, and Logic Input) |
1 |
Address of the event |
Word |
References bit addresses from 1000H to 105FH |
2 |
Ramp up or down |
Word |
00: Ramp down or 01: Ramp up |
For more information about event-reported Tags, please check topic Tags Reported by Events on E3 User's Manual.
IMPORTANT |
When reading mass memory events in event-reported Tags in E3 or Elipse Power, disable Tag's dead band, that is, the EnableDeadBand property configured as False, and also the associated Historic object, that is, the DeadBand property equal to 0 (zero), to avoid loosing events with close values. It is also important to disable historic by scan, that is, in E3 or Elipse Power configure the ScanTime property as 0 (zero). This ensures that new events are only stored using the WriteRecord method, executed on Tag's OnRead event, avoiding duplication of events. |
This is also an event-reported Tag, and users can use its OnRead event for storage in a Historic. Notice that this does not prevent it to be treated as a normal Tag, or a real-time Tag, in case only its most recent value is relevant. As this Driver only reads an internal buffer, it is advisable to define a very low scan time, even lower than the one from the other type of Tag. CPU consumption at each scan can be considered as not significant. It is suggested to configure it as half the scan period for a Tag for collecting all events.
As already mentioned, this Tag is used to get a status for a certain event address, without parsing or performing filters on events that arrive by the previous Tag, by script, or by any other means. A typical application would be linking it to Screen objects.
A Tag for reading a single event, as already mentioned, does not perform a reading of events from a device, but from this Driver's internal buffer, previously filled during the reading of a Tag for collecting all events. This Tag returns a single Element, an event-reported one, and it can be configured as a simple Tag, which does not need to be a Block Tag. This Driver accepts up to eight events accumulated by event point, that is, for each combination of relay, zone, type, and event address in its internal buffer. If there is an overflow, that is, if more than eight events from a single point are returned without any single-event Tag collecting them, this Driver starts to discard older events. The correct configuration of a scan time may prevent data loss.
TIP |
It is recommended to configure a scan for single-event Tags with a value equivalent to half the configured value for the Tag for collecting all associated events, thus avoiding the loss of events by overflow of this Driver's internal buffer. |
This Tag must be configured with the following parameters:
•Device: "<slave id>:"
•Item: "ptspsoe<Event type (800H by default)>.<Event bit address) + Event zone offset* (please check the next table)>"
Example: To read 800H-type events at address 1 (one) of zone 2 (two), Device must be equal to "1:" and Item must be equal to "ptspsoe&h800.&h8001". Alternatively, Device can be equal to "" and Item equal to "1:ptspsoe&h800.&h8001". For more information, please check topic String Configuration.
•N1: Slave address (relay) on the network, between 1 (one) and 247
•N2: Code of the operation configured with special reading function SP SOE
•N3: Event type (0800H by default, according to manufacturer's documentation)
•N4: Event address (Event bit address) + Event zone offset, as described on the next table
Options for event address (Events Zone Offset)
Event Zone |
Event Zone Offset |
---|---|
1 |
0 (zero) |
2 |
8000H (8000 in hexadecimal) |
Examples:
•Event Address: 102FH, Event Zone = 1 ® N4 = 102FH + 0 = 102FH
•Event Address: 102FH, Event Zone = 2 ® N4 = 102FH + 8000H = 902FH
NOTE |
To represent values in hexadecimal in Elipse E3 and in Elipse Power, users must use the prefix "&H", such as &H10 = 16. In Elipse SCADA, use the suffix "h", such as 10h = 16. On this Manual, however, the uppercase suffix "H" is used to indicate values in hexadecimal format. |
•Value: Returns ramp up or down, as described on the next table
Available options for Value
Value |
Meaning |
---|---|
00 |
Ramp down |
01 |
Ramp up |
•Timestamp: The Timestamp property represents the date and time an event was actually read from a relay, during the reading of a Tag for collecting all events previously described
For more information about relay events, their meanings and addressing, please check manufacturer's documentation. For more information about event-reported Tags, please check topic Tags Reported by Events on E3 User's Manual.