IEC 60870-5.PDF

42
IEC870 - Driver Manual IEC870.DLL IEC 870-5-101, 102 and 104 Driver Version 2.21 Driver Manual

Transcript of IEC 60870-5.PDF

  • IEC870 - Driver Manual

    IEC870.DLL

    IEC 870-5-101, 102 and 104 Driver

    Version 2.21

    Driver Manual

  • IEC870 - Driver Manual

    Driver Profile

    File IEC870.DLL

    Vendor Standard protocol defined by IEC

    Protocols Supported

    IEC 870-5-101 (Master/Slave, Balanced/Unbalanced) Supports only standard definitions IEC 870-5-102 (Master, Unbalanced) Supports standard definitions plus parts of the following custom extensions:

    - custom ZIV protocol IEC 870-5-104 (Master/Slave) Supports only standard definitions

    Platform Win32

    Driver Version v2.21

    Requirements IOKit v1.06 or later

    Date of Release 2006-08-18

    The driver allows communication with devices that implement the IEC 870-5 protocol suite, specifically the following companion standards:

    - IEC 870-5-101: Companion standard for basic telecontrol tasks (Master and Slave in balanced and unbalanced mode)

    - IEC 870-5-102: Companion standard for the transmisison of integrated totals in electric power systems

    - IEC 870-5-102 (ZIV extensions): based on the ZIV and REE extensions to the IEC 870-5-102 protocoll

    - IEC 870-5-104: Network access for IEC 870-5-101 using standard transport profiles (Master and Slave)

    When using the IEC 870-5-104 (master or slave) protocol, the following parameters are fixed:

    - T1 = 15 seconds - T2 = 10 seconds - T3 = 20 seconds - K = 12 frames - W = 8 frames

  • IEC870 - Driver Manual

    Driver Configuration Parameters: The P parameters of the driver are not used. All the driver configuration is done in the driver Extras... dialog. The dialog contains seven (7) pages. The first two pages (IEC and Interrogation) are provided by the IEC870 driver, and are described in detail in this document. The other five pages (Setup, Serial, Ethernet, Modem, and RAS) are provided by the IOKit, and are described in a separate document (IOKit Users Manual).

    IEC Page: The IEC page configures the protocol type and parameters.

    Protocol: select the protocol to use. The options are:

    - IEC 870-5-101 MASTER (balanced) - IEC 870-5-101 MASTER (unbalanced) - IEC 870-5-101 SLAVE (balanced) - IEC 870-5-101 SLAVE (unbalanced) - IEC 870-5-102 MASTER (unbalanced) - IEC 870-5-102 MASTER (unbalanced) ZIV extensions - IEC 870-5-104 MASTER - IEC 870-5-104 SLAVE If you select the SLAVE option and you are using the Ethernet interface, you should select the Listen for connections on port: option in the Ethernet page.

    Terry

  • IEC870 - Driver Manual

    The standard TCP port fot the IEC 870-5-104 protocol is port 2404.

    Field sizes (in octets):

    Slave Address: number of octets used to represent the slave address in the ASDU. If you use 0 then only a single slave will be addressable (the slave address will be 0). IEC 870-5-101 = 1 to 2 octets (typical value is 1) IEC 870-5-102 = 0 to 2 octets (typical value is 1) IEC 870-5-104 = 1 to 2 octets (typical value is 2) Cause of Transmission: number of octets used to represent the cause of transmission in the ASDU (1 or 2 octets). IEC 870-5-101 = 1 to 2 octets (typical value is 1) IEC 870-5-102 = 1 octet IEC 870-5-104 = 1 to 2 octets (typical value is 2) Information Object Address: number of octets used to represent the address field in the INFORMATION OBJECT structure (1, 2 or 3 octets) IEC 870-5-101 = 1 to 3 octets (typical value is 2) IEC 870-5-102 = 1 octet IEC 870-5-104 = 1 to 3 octets (typical value is 3)

    App Layer Timeout (sec): number of seconds to wait for responses at the application layer

    IEC 870-5-101 specifics: Configures the general interrogation process for protocols IEC 870-5-101 Master (Balanced and Unbalanced) and IEC 870-5-104 Master:

    Auto-run general interrogation: enables a General Interrogation command to be generated automatically when a data link is established with the slave. Repeat every (sec): enables the General Interrogation command to be generated at a fixed rate while the slave is connected.

    IEC 870-5-102 - ZIV specifics:

    Password: enter the password that will be sent after the driver connects to the slave. If the password is incorrect the slave will not accept any commands.

    Link layer:

    Link layer retries: number of retries for sending/receiving packets. If there is an error receiving a packet, the last packet sent will be resent until a valid response is received, or the number of retries is exceeded (does not apply to the IEC 870-5-104 protocol).

    Slave polling rate (ms): rate (in milliseconds) at which each slave will be polled for events and responses (function 11 REQUEST/RESPOND USER DATA 2) (does not apply to the IEC 870-5-104 protocol). Try to reactivate failed slaves every (sec): number of seconds between each attempt to reactivate the connection to a slave.

    Terry

    Terry

  • IEC870 - Driver Manual

    Wait M_EI_NA on activation: check this option to wait for the end-of-initialization ASDU after connecting to the slave. If this ASDU is not sent within the Application Layer timeout, then the slave will be disconnected. Enable ACK using CC1: (balanced mode only) check this option to send CC1 frames (single-character) instead on ACK frames

    Respond using: (slave mode only) determines how the driver responds to requests sent by the master. The options are:

    (auto): maintain compatibility with older driver versions. It uses an ACK in balanced mode, or Data in unbalanced mode. ACK: always respond with an ACK Data: respond with data (implicit ACK). For example, if the master sends a General Interrogation Activation request, the driver will respond with a General Interrogation Activation Confirmation.

    Driver starts in listen mode: check this option to make the driver work in listen mode. While

    in this mode, the driver will not send any frames, it will monitor all the communication between the slaves and another master on the serial line or Ethernet connection and update the internal cache with data received from the slaves. The Listen Mode can be enabled/disabled using the LISTEN MODE CONTROL tag (N1=0, N2=997, N3=0 and N4=0)

    Default slave address: the slave address to use when N1/B1 is 0. All tags using N1/B1=0 will

    be addressing this slave. OBS: when using a SLAVE protocol, the default slave address must be configured with a number greater than 0.

    Force common address: allows the COMMON ADDRESS to be overridden for all slaves.

    Normally the driver assumes that the COMMON ADDRESS is equal to the LINK ADDRESS of the slave. If these addresses are different, then you can enable this option to override the COMMON ADDRESS for all slaves.

  • IEC870 - Driver Manual

    Interrogation Page: The Interrogation page lets you configure a list of data to be returned in a General Interrogation command. It is available only when the driver is in Slave mode.

    Return a pre-defined data list in General Interrogation: check this option to force the driver to always return a predefined list of data objects as a response to General Interrogation. If this option is not checked the driver will return all available data objects at the time of General Interrogation (all the objects written into the internal driver cache using N2=4 or N2=5). If you check this option, the driver will always return the sequence of objects defined in the edit box. The list of objects should be in the following format: : The can be any of the following values:

    M_SP_NA_1 (ASDU 1) M_SP_TA_1 (ASDU 2) M_DP_NA_1 (ADSU 3) M_DP_TA_1 (ASDU 4) M_ST_NA_1 (ASDU 5) M_ST_TA_1 (ASDU 6) M_BO_NA_1 (ASDU 7) M_BO_TA_1 (ASDU 8) M_ME_NA_1 (ASDU 9) M_ME_TA_1 (ASDU 10) M_ME_NB_1 (ASDU 11)

  • IEC870 - Driver Manual

    M_ME_TB_1 (ASDU 12) M_ME_NC_1 (ASDU 13) M_ME_TC_1 (ASDU 14) M_IT_NA_1 (ASDU 15) M_IT_TA_1 (ASDU 16) M_EP_TA_1 (ASDU 17) M_EP_TB_1 (ASDU 18) M_EP_TC_1 (ASDU 19) M_PS_NA_1 (ASDU 20) M_ME_ND_1 (ASDU 21) M_SP_TB_1 (ASDU 30) M_DP_TB_1 (ASDU 31) M_ST_TB_1 (ASDU 32) M_BO_TB_1 (ASDU 33) M_ME_TD_1 (ASDU 34) M_ME_TE_1 (ASDU 35) M_ME_TF_1 (ASDU 36) M_IT_TB_1 (ASDU 37) M_EP_TD_1 (ASDU 38) M_EP_TE_1 (ASDU 39) M_EP_TF_1 (ASDU 40)

    is a comma (,) separated list of Information Object Addresses, and it also allows a range of addresses (separated by a -): 1, 2, 3, 4, 5 is equivalent to 1 5 (addresses 1 to 5) Check!: click this button to check for errors in the data object list Remove timestamp from data sent in General Interrogation: check this option to remove the timestamp from all data returned to the master in General Interrogation requests. For example, if you specify M_SP_TA_1:1, the driver will look for the M_SP_TA_1 data in the internal cache, remove the timestamp, and send it in the general interrogation as M_SP_NA_1:1. The table below shows the data conversions performed by the driver:

    ASDUs with timestamp Converted to

    M_SP_TA_1 and m_SP_TB_1 M_SP_NA_1

    M_DP_TA_1 and M_DP_TB_1 M_DP_NA_1

    M_ST_TA_1 and M_ST_TB_1 M_ST_NA_1

    M_BO_TA_1 and M_BO_TB_1 M_BO_NA_1

    M_ME_TA_1 and M_ME_TD_1 M_ME_NA_1

    M_ME_TB_1 and M_ME_TE_1 M_ME_NB_1

    M_ME_TC_1 and M_ME_TF_1 M_ME_NC_1

    M_IT_TA_1 and M_IT_TB_1 M_IT_NA_1

    Convert the following objects to Boolean values (0 / 1) You should mark the data types that you want to use as booleans. According to the IEC 870 standard, the types DIQ, SEP, DCO and RCP have values from 0 to 3 (0 and 3 are invalid (transition values), 1 is False/OFF, 2 is True/ON). Older versions of the IEC870 driver would use these types as a boolean value (0 = False/OFF, 1 = True/ON), so if you want to stay compatible with early versions of the IEC870 driver, you should check these four options (the driver will convert the value 1 to False(0), and 2 to True(1)).

  • IEC870 - Driver Manual

    Modify the timestamp on received values: select an option to modify the timestamp format on the ASDUs received. This option does not actually modify the timestamp value, it does instead rename the ASDU number received, changing to a corresponding ASDU with the selected timestamp format. The available options are:

    Dont modify the timestamp format: keeps the timestamp format unaltered. Use 3-octet timestamp (CP24Time2a): modifies the ASDUs received to a

    corresponding ASDU with a 3-octet timestamp (ex: modifies M_SP_NA_1 and M_SP_TB_1 into M_SP_TA_1)

    Use 7-octet timestamp (CP56Time2a): modifies the ASDUs received to a corresponding ASDU with a 7-octet timestamp (ex: modifies M_SP_NA_1 and M_SP_TA_1 into M_SP_TB_1)

    Discard (delete) the timestamp: modifies the ASDUs received to a corresponding ASDU with no timestamp (ex: modifies M_SP_TA_1 and M_SP_TB_1 into M_SP_NA_1)

    For example, if the driver is configured to use a 3-octet timestamp and it receives a value from M_SP_NA_1:1, the value will be written in the internal driver cache as a M_SP_TA_1:1 (with the timestamp set to the current system time). The table below displays the conversions supported by the driver:

    ASDUs without timestamp

    ASDUs with CP24Time2a

    ASDUs with CP56Time2a

    M_SP_NA_1 (1) M_SP_TA_1 (2) M_SP_TB_1 (30)

    M_DP_NA_1 (3) M_DP_TA_1 (4) M_DP_TB_1 (31)

    M_ST_NA_1 (5) M_ST_TA_1 (6) M_ST_TB_1 (32)

    M_BO_NA_1 (7) M_BO_TA_1 (8) M_BO_TB_1 (33)

    M_ME_NA_1 (9) M_ME_TA_1 (10) M_ME_TD_1 (34)

    M_ME_NB_1 (11) M_ME_TB_1 (12) M_ME_TE_1 (35)

    M_ME_NC_1 (13) M_ME_TC_1 (14) M_ME_TF_1 (36)

    M_IT_NA_1 (15) M_IT_TA_1 (16) M_IT_TB_1 (37)

    (not available) M_EP_TA_1 (17) M_EP_TD_1 (38)

    (not available) M_EP_TB_1 (18) M_EP_TE_1 (39)

    (not available) M_EP_TC_1 (19) M_EP_TF_1 (40)

  • IEC870 - Driver Manual

    Commands Page: The Commands page configures how the driver will respond to commands received from a master (slave mode only).

    Clock synchronization command: configures the response action the driver will take when it receives a clock synchronization command. The available options are:

    default (disabled) uses the default behavior (clock synchronization commands are disabled)

    disabled the driver will reject clock synchronization commands (a NACK will be sent to the master)

    pass to the application the driver will accept clock synchronization commands and pass them to the application to be handled.

    handle automatically the driver will accept clock synchronization commands, and it will handle them immediately (by changing the computer clock appropriately). After handling the command, it will notify the application.

  • IEC870 - Driver Manual

    I/O Tags The I/O tags and block tags use generally the following parameters:

    N1/B1 station address (master or slave) N2/B2 function N3/B3 data type (this document refers to the ASDU number as the data type) N4/B4 data address * for block tags, the B4 parameter addresses the first object in the block

    The tags are divided in five categories:

    - General Driver Tags - General Station (Slave or Master) Tags - IEC 870-5-101 and 104 Master Specific Tags - IEC 870-5-101 and 104 Slave Specific Tags - IEC 870-5-102 Specific Tags

    General Driver Tags The following tags return/set information related to the driver as a whole. The N1/B1 parameter (slave address) should be left at 0.

    TAG LISTEN MODE CONTROL (0, 997, 0, 0) read/write

    Use this I/O tag to enable/disable the listen mode for the driver. When in listen mode, the driver only monitors the communication between the slaves and ANOTHER MASTER in the network. Write 0 to disable listen mode, or 1 to enter listen mode. The initial setting for this tag is configured in the Extras dialog.

    Terry

  • IEC870 - Driver Manual

    General Station (Master or Slave) Tags The following tags return/set information related to a station (protocol independent). These tags are available for both the IEC 870-5-101, IEC 870-5-102 and IEC 870-5-104 protocols.

    TAG READ EVENT FROM CACHE (slave, 4 or 5, type, address) read-only Returns spontaneous events stored in the driver cache. If there are no events, the tag value will be unmodified. The tags OnRead script can be used to store each event to a historic file. The events are usually sent spontaneously by the slave when an I/O point is modified. When the driver receives an event, it stores it in a list (internal cache) and identifies it by the fields. When the READ EVENT tag is read, it simply removes the oldest event related to from the cache, without causing any I/O to occur.

    *** IEC 870-5-101 and 104: it is recommended that you enable the general interrogation on the

    Extras dialog to force a periodic refresh on all the values sent from the slave.

    *** IEC 870-5-101 and 104 SLAVE: this tag also allows writing. The value will be stored in the

    driver cache and will be reported to the master via General Interrogation. *** IEC 870-5-101 and 104 SLAVE: if you use N2=5 then the tag also will allow writing and will

    additionally send the value spontaneously to the master.

    (*) check APPENDIX-I for a list of supported DATA TYPES for each protocol

    TAG/BLOCK READ CURRENT VALUE FROM CACHE (slave, 1, type, address) read-only Reads from the driver cache the MOST RECENT value received for the data object. This tag works almost the same as the READ EVENT tag, the difference is that it returns only the newest event if many events are received between two read requests of the tag. For example, suppose the scan rate for the tag is 5 seconds. If the driver receives two events for the data object (it is turned ON and OFF very quickly), it will return only the latest event because it reports only the CURRENT value of the data object and doesnt care for changes that may occur between two tag scans. Use this type of tag if you are monitoring ANALOG values and you care to know only the current tag value. Otherwise, you should use the READ EVENT tag (N2=4)

    *** this tag will return ERROR if none of the data objects requested is in the driver cache.

    (*) check APPENDIX-I for a list of supported DATA TYPES for each protocol

    BLOCK[8] READ EVENT LOG (slave, 99, 0, 0) read-only Use the OnRead script of this tag to analyze all the ASDUs received from the slave. The block elements are:

    0 WORD, data type 1 WORD, data address 2 DWORD, flags 1 3 DWORD, flags 2 4 double, data value 5 double, time stamp 6 STRING, data type 7 WORD, cause of transmission

    Terry

    Terry

  • IEC870 - Driver Manual

    TAG READ SLAVE STATISTICS (slave, 998, 0, 1..5) read-only Returns the current value of a statistics counter for the slave. N4 can be:

    1 number of frames sent 2 no-reply counter 3 frame error counter 4 frames not sent (send error) 5 frame retries

    BLOCK[17] READ SLAVE ADVANCED STATISTICS (slave, 999, 0, 0) read-only Use this block tag to monitor advanced statistics counter for the slave (includes some driver statistics as well). The block elements are (not all elements are available in all system configurations):

    0 LONG, number of ASDUs created 1 LONG, number of ASDUs deleted 2 LONG, number of invalid ASDUs 3 LONG, number of ASDUs in the driver event cache for the slave 4 LONG, number of ASDUs in the driver data cache for the slave 5 LONG, number of ASDUs in the driver log cache for the slave 6 LONG, number of HVALUE objects allocated 7 LONG, number of references to HVALUE objects 8 LONG, number of HTIMER objects allocated 9 LONG, number of timer categories allocated 10 LONG, number of HVALUE objects created 11 LONG, number of bytes used in the process heap 12 LONG, number of heap blocks in the process 13 LONG, number of bytes available in the process heap 14 LONG, number of heap blocks available in the process 15 LONG, number of processes in the system 16 LONG, number of threads in the system

    TAG SLAVE STATE (slave, 992, 0, 0) read-only Indicates if the slave is connected or not:

    0 slave not connected 1 slave connected

    Terry

  • IEC870 - Driver Manual

    IEC 870-5-101 and 104 Slave Specific Tags The following tags are available when any of the slave mode protocols are selected (101 balanced, 101 unbalanced, and 104).

    BLOCK[4] COMMAND INDICATION (station, 4, type, addr) read/write The supported command types (type) are:

    - 45 (C_SC_NA_1): single command - 46 (C_DC_NA_1): double command - 47 (C_RC_NA_1): regulating step command - 48 (C_SE_NA_1): set point command, normalized value - 49 (C_SE_NB_1): set point command, scaled value - 50 (C_SE_NC_1): set point command, short floating point number - 51 (C_BO_NA_1): bitstream of 32 bits - 58 (C_SC_TA_1): single command (with 7-octet timestamp) - 59 (C_DC_TA_1): double command (with 7-octet timestamp) - 60 (C_RC_TA_1): regulating step command (with 7-octet timestamp) - 61 (C_SE_TA_1): set point command, normalized value (with 7-octet timestamp) - 62 (C_SE_TB_1): set point command, scaled value (with 7-octet timestamp) - 63 (C_SE_TC_1): set point command, short floating point number (with 7-octet

    timestamp) - 64 (C_BO_TA_1): bitstream of 32 bits (with 7-octet timestamp)

    If the driver receives one of the above commands, it fills this block with command information and sends it to the application. On the OnRead event for this block tag, the application should handle the indication received, modify the block elements appropriately, and write back the information to the driver (so that the driver can send a response to the Master). The block elements are:

    - element0: Command value (depends on the command type) - element1: Cause Of Transmission (6=Activate, 8=Deactivate) - element2: Select/Execute (0=Execute, 1=Select) - element3: Quality Of Command (0=undefined, 1=short pulse duration, 2=long duration

    pulse, 3=persistent output) If an activation command indication (element1=6) is received, the application should immediately reply with:

    - a positive ACTCON (activation confirmation, element1=7) if it wants to allow the command to proceed

    - a negative ACTCON (element1=135 (128+7)) if it wants to disallow the command If a positive ACTCON was sent, the application should then check element2 (Select/Execute) and perform the appropriate action. If Execute was requested, the application should proceed with the command, and after its termination it should reply with an ACTTERM (activation termination, element1=10) to indicate that the command was executed. The E3 example below shows a OnRead event of a command indication tag:

    ' CMDIndication is a tag block with 4 elements. The tag parameters are: ' AdviseType = 0 AlwaysInAdvise ' AllowRead = True ' AllowWrite = False

    Terry

    Terry

    Terry

    Terry

    Terry

  • IEC870 - Driver Manual

    BLOCK[4] COMMAND INDICATION (station, 4, type, addr) read/write ' B1 = ' B2 = 4 ' B3 = 45 to 51, 58 to 64 ' B4 = ' EnableDeadband = False ' Size = 4 Sub CMDIndication_OnRead() Dim CMD, SE, COT, QU CMD = Item(1).Value ' command value (depends on the command type) COT = Item(2).Value ' COT (cause of transmission) SE = Item(3).Value ' 1=Select, 0=Execute QU = Item(4).Value ' Quality of command Select Case COT Case 6 ' ACT(6) should be answered with a ACTCON(7) WriteEx Array(CMD, 7, SE, QU), TimeStamp If SE = 0 Then ' TODO: Execute here the command ' send an ACTTERM(10) WriteEx Array(CMD, 10, SE, QU), TimeStamp 'ACTTERM End If Case 8 ' DEACT(8) should be answered with a DEACTCON(9) WriteEx Array(CMD, 9, SE, QU), TimeStamp End Select End Sub

    TAG TEST LINK (station, 1104, 0, 0) read-only This tag indicates the status of the connection with the master (in balanced mode only). Everytime this tag is read, a TEST LINK command (IEC function 2) is sent, and if the command is accepted (ACKed) the tag returns: - 1, indicating that the link is working correctly, or - 0 indicating that the link is not working (the master is not responding)

  • IEC870 - Driver Manual

    IEC 870-5-101 and 104 Master Specific Tags The following tags return/set information related to a station using protocols IEC 870-5-101 (Balanced or Unbalanced) or IEC 870-5-104 in Master mode.

    TAG CLOCK SYNCHRONIZATION (slave, 2, 0, 0) write-only Write any value to this tag to execute the Clock Synchronization procedure on the specified slave. A C_CS_NA_1 (103) ASDU is filled with the current system time and sent to the slave.

    TAG INTEGRATED COUNTERS (slave, 3, command, counterGroup) write-only Write any value to this tag to send Integrated Counters commands. command can be:

    0 request 1 freeze 2 freeze and reset 3 reset

    counterGroup can be:

    0 general (all counter groups) 1 counter group 1 2 counter group 2 3 counter group 3 4 counter group 4 5 .. 64 other

    request: this command should be triggered by the application to force the slave to send the requested counter information. The received data is placed on the driver cache and can be read using the READ EVENT FROM CACHE and READ CURRENT VALUE FROM CACHE tags. freeze: sends a Counter Freeze without Reset command to the specified counter groups. freeze and reset: sends a Counter Freeze with Reset command to the counter groups. reset: sends a Counter Reset command to the specified counter groups.

    TAG SELECT (slave, 10, type, address) write-only Write to this tag to send a Select command to the slave. After a successfull select you should send an Execute command (N2=11) or deactivate the selection (N2=12). The supported command types (type) are:

    - 45 (C_SC_NA_1): single command - 46 (C_DC_NA_1): double command - 47 (C_RC_NA_1): regulating step command - 48 (C_SE_NA_1): set point command, normalized value - 49 (C_SE_NB_1): set point command, scaled value - 50 (C_SE_NC_1): set point command, short floating point number - 51 (C_BO_NA_1): bitstream of 32 bits - 58 (C_SC_TA_1): single command (with 7-octet timestamp) - 59 (C_DC_TA_1): double command (with 7-octet timestamp) - 60 (C_RC_TA_1): regulating step command (with 7-octet timestamp) - 61 (C_SE_TA_1): set point command, normalized value (with 7-octet timestamp)

    Terry

    Terry

    Terry

    Terry

  • IEC870 - Driver Manual

    TAG SELECT (slave, 10, type, address) write-only - 62 (C_SE_TB_1): set point command, scaled value (with 7-octet timestamp) - 63 (C_SE_TC_1): set point command, short floating point number (with 7-octet

    timestamp) - 64 (C_BO_TA_1): bitstream of 32 bits (with 7-octet timestamp)

    TAG EXECUTE (slave, 11, type, address) write-only Write to this tag to Execute a command previously selected with N2=10.

    TAG DEACTIVATE SELECTION (slave, 12, type, address) write-only Write to this tag to cancel a Select command (N2=10).

    TAG SELECT / SHORT PULSE (slave, 20, type, address) write-only Write to this tag to send a Select Short Pulse command to the slave. After a successfull select you should send an Execute command (N2=21) or deactivate the selection (N2=22).

    TAG EXECUTE / SHORT PULSE (slave, 21, type, address) write-only Write to this tag to Execute Short Pulse a command previously selected with N2=20.

    TAG DEACTIVATE SELECTION / SHORT PULSE (slave, 22, type, address) write-only Write to this tag to cancel a Select Short Pulse command (N2=20).

    TAG SELECT / LONG PULSE (slave, 30, type, address) write-only Write to this tag to send a Select Long Pulse command to the slave. After a successfull select you should send an Execute command (N2=31) or deactivate the selection (N2=32).

    TAG EXECUTE / LONG PULSE (slave, 31, type, address) write-only Write to this tag to Execute Long Pulse a command previously selected with N2=30.

    TAG DEACTIVATE SELECTION / LONG PULSE (slave, 32, type, address) write-only Write to this tag to cancel a Select Long Pulse command (N2=30).

    TAG SELECT / PERSISTENT OUTPUT (slave, 40, type, address) write-only Write to this tag to send a Select Persistent Output command to the slave. After a successfull select you should send an Execute command (N2=41) or deactivate the selection (N2=42).

    TAG EXECUTE / PERSISTENT OUTPUT (slave, 41, type, address) write-only Write to this tag to Execute Persistent Output a command previously selected with N2=40.

    TAG DEACT. SELECTION / PERSISTENT OUTPUT (slave, 42, type, address) write-only Write to this tag to cancel a Select Persistent Output command (N2=40).

    TAG /BLOCK READ INTERROGATION GROUP (slave, 101..116, type, address)

    read-only

    Reads the interrogation group specified in N2/B2 and returns the current value of the data object specified in N3/B3 and N4/B4 (equivalent to a READ CURRENT VALUE FROM CACHE tag, N2/B2=1). N2/B2 corresponds to the interrogation group number:

    - 101 interrogation group 1

    Terry

    Terry

    Terry

  • IEC870 - Driver Manual

    TAG /BLOCK READ INTERROGATION GROUP (slave, 101..116, type, address)

    read-only

    - 102 interrogation group 2 - ... - 116 interrogation group 16

  • IEC870 - Driver Manual

    IEC 870-5-102 Master Specific Tags The following tags return/set information related to a slave using the IEC 870-5-102 companion standard.

    BLOCK[4] READ MANUFACTURER AND PRODUCT SPECIFICATION (slave, 201, 0, 0)

    read-only

    This block returns information about the date of standard, manufacturer code and product code as returned by the slave. The block elements are: 0 month of standard 1 year of standard 2 manufacturer code 3 product code

    TAG READ CURRENT SYSTEM TIME OF INTEGRATED TOTAL DTE (slave, 202, 0, 0)

    read-only

    This tag returns the current system time reported from the slave.

    TAG READ RECORDS OF SINGLE-POINT OR INTEGRATED TOTALS (slave, 203, type, 0)

    write-only

    type can be 101, 102, 104 to 123. The tag value (or the first block element, in case of blocks) is the , it specifies the kind of information to be returned. Possible values for the record address are:

    0 default 1 record address of integrated totals from the start of the accounting period 11 record address of integrated totals integration period 1 12 record address of integrated totals integration period 2 13 record address of integrated totals integration period 3 21 record address of integrated totals (daily values) integration period 1 22 record address of integrated totals (daily values) integration period 2 23 record address of integrated totals (daily values) integration period 3 31 record address of integrated totals (monthly values) integration period 1 32 record address of integrated totals (monthly values) integration period 2 33 record address of integrated totals (monthly values) integration period 3 41 record address of integrated totals (annual values) integration period 1 42 record address of integrated totals (annual values) integration period 2 43 record address of integrated totals (annual values) integration period 3 50 oldest single-point information 51 complete record of single-point information 52 record section 1 of single-point information 53 record section 2 of single-point information 54 record section 3 of single-point information 55 record section 4 of single-point information

    Write to this tag to request single-point information or integrated totals to be sent to the driver. If the tag is a block, the block should be written entirely (block element writes are not allowed). The tag value (or the first element in case of block) is always the of the data (define above). The status of the write command (available in the WriteEx function of E3) indicates the cause-of-transmission of the response from the slave:

  • IEC870 - Driver Manual

    TAG READ RECORDS OF SINGLE-POINT OR INTEGRATED TOTALS (slave, 203, type, 0)

    write-only

    7 activation confirmation (success), indicates that the slave will be sending the requested records.

    9 deactivation confirmation (this cause-of-transmission should never be received, because the driver doesnt support the deactivate command)

    10 activation termination, indicates that all records have already been sent 13 requested data record not available 14 requested ASDU-type not available 15 record number in the ASDU sent by the controlling station is not known 16 address specification in the ASDU sent by the controlling station is not known 17 requested information object not available 18 requested integration period not available

    If the status is 7 (activation confirmation), then the driver report the received records in the background, until a cause of transmission of 10 (activation termination) is received. To detect the reception of the activation termination, you should declare a READ EVENT FROM CACHE TAG, with N1=

  • IEC870 - Driver Manual

    TAG READ RECORDS OF SINGLE-POINT OR INTEGRATED TOTALS (slave, 203, type, 0)

    write-only

    Value: element 0: record address element 1: start address element 2: final address element 3: date/time of record

    Type = I/O block (size = 3) B3 = 105 C_CI_NB_2 (Read accounting integrated totals of the oldest integration period and of a selected range

    of addresses) 109 C_CI_NF_2 (Read periodically reset accounting integrated totals of the oldest integration period and of

    a selected range of addresses) 113 C_CI_NK_2 (Read operational integrated totals of the oldest integration period and of a selected range

    of addresses) 117 C_CI_NO_2 (Read periodically reset operational integrated totals of the oldest integration period and

    of a selected range of addresses)

    Value: element 0: record address element 1: start address element 2: final address

    Type = I/O block (size = 5) B3 = 120 C_CI_NR_2 (Read accounting integrated totals of a selected time range and of a selected range of

    addresses) 121 C_CI_NS_2 (Read periodically reset accounting integrated totals of a selected time range and of a

    selected range of addresses) 122 C_CI_NT_2 (Read operational integrated totals of a selected time range and of a selected range of

    addresses) 123 C_CI_NU_2 (Read periodically reset operational integrated totals of a selected time range and of a

    selected range of addresses)

    Value: element 0: record address element 1: start address element 2: final address element 3: start date/time element 4: final date/time

  • IEC870 - Driver Manual

    IEC 870-5-102 ZIV Specific Tags The following tags return/set information related to a slave using the IEC 870-5-102 companion standard, with ZIV extensions selected.

    BLOCK[33] READ CONFIGURATION BLOCK (slave, 1204, record, address) read-only This block uses ASDU 204 to request information of ASDU 205. The block elements are: 0 (date/time) current device time 1 (float) tension (Phase A) 2 (short) units of tension (Phase A) 3 (float) tension (Phase B) 4 (short) units of tension (Phase B) 5 (float) tension (Phase C) 6 (short) units of tension (Phase C) 7 (float) intensity (Phase A) 8 (short) units of intensity (Phase A) 9 (float) intensity (Phase B) 10 (short) units of intensity (Phase B) 11 (float) intensity (Phase C) 12 (short) units of intensity (Phase C) 13 (float) active power (consumed) 14 (short) units of active power (consumed) 15 (float) active power (generated) 16 (short) units of active power (generated) 17 (float) reactive power (consumed) 18 (short) units of reactive power (consumed) 19 (float) reactive power (generated) 20 (short) units of reactive power (generated) 21 (float) apparent power 22 (short) units of apparent power 23 (float) frequency 24 (float) power factor 25 (DWORD) state 26 (DWORD) inputs 27 (DWORD) outputs 28 (DWORD) leds 29 (date/time) time of last closing 30 (date/time) time of the first standard load profile 31 (date/time) time of the first programmable load profile 32 (short) current tariff

    BLOCK[10] READ VTCD EVENT (slave, 1253, 0, address) read-only This block uses ASDU 253 to request VTCD events 1 to 10 (address = 1 to 10). VTCD data is returned in ASDU 254. The block elements are: 0 (float) tension before (1) 1 (float) tension before (2) 2 (float) tension before (3) 3 (DWORD) duration (in msec) 4 (WORD) echo (1) 5 (WORD) echo (2) 6 (WORD) echo (3) 7 (float) tension after (1) 8 (float) tension after (2)

  • IEC870 - Driver Manual

    BLOCK[10] READ VTCD EVENT (slave, 1253, 0, address) read-only 9 (float) tension after (3) * the block timestamp contains the time the VTCD event occurred The block will be empty (all elements zeroed) if there is no event stored in the index specified (1 to 10).

    BLOCK[23] READ CONFIGURATION BLOCK 2 (slave, 1141, 0, 0) read-only This block uses ASDU 141 to request the device configuration block. The block is returned using ASDU 142. The block elements are: 0 (BYTE) manufacturer code 1 (WORD) device model 2 (BYTE) firmware version 3 (DWORD) serial number 4 (BYTE) standard date 5 (date/time) protocol date 6 (BYTE) battery state 7 (BYTE) baud rate (port 1) 8 (BYTE) data format (port 1) 9 (BYTE) AT mode (port 1) 10 (String) AT command 11 (BYTE) baud rate (port 2) 12 (BYTE) data format (port 2) 13 (BYTE) baud rate (optical port) 14 (BYTE) data format (optical port) 15 (double) volts 1 16 (double) volts 2 17 (double) amps 1 18 (double) amps 2 19 (BYTE) integration period 1 20 (BYTE) integration period 2 21 (BYTE) integration period 3 22 (BYTE) active contracts

    TAG WRITE PASSWORD (slave, 1183, 0, 0) write-only Write to this tag to send a password to the device. You will normally configure the device password in the driver Extras... dialog. Use this tag only if you need to modify the password in runtime.

    BLOCK[2] REQUEST BLOCKS OF INTEGRATED TOTALS (slave, 1189 or 1190, record, object)

    write-only

    Write to this tag to send a request to read integrated totals (aka MASS MEMORY) using ASDU 189 (B2=1189) for absolute readings or ASDU 190 (B2=1190) for incremental readings. record is the record number. You will normally use one of the following: 11 totals by integrated period (you may optionally specify 12 or 13) 21 daily totals (you may optionally specify 22 or 23) object specifies the information that will be retrieved: 9 blocks with generic measurement points with reserved fields 10 blocks with generic measurement points without reserved fields 11 blocks with consummed data points without reserved fields

  • IEC870 - Driver Manual

    BLOCK[2] REQUEST BLOCKS OF INTEGRATED TOTALS (slave, 1189 or 1190, record, object)

    write-only

    The block should be written as a whole (do not write element by element), the block elements indicate the period of records to be retrieved:

    element 0: initial date/time element 1: final date/time

    READING THE BLOCKS: If writing to the request block succeedes, then the request has been accepted. You should receive the data by polling a BLOCK tag with the following parameters:

    B1 = slave B2 = 4 (read from cache) B3 = type (139 or 140)

    - use ASDU 139 in response to request 189 - use ASDU 140 in response to request 190

    B4 = object (9, 10 or 11) use the same object specified in the request If you specify object 9, the block size should be 16, and the elements are:

    0 active power (in) 1 active power (out) 2 reactive power (1st quadrant) 3 reactive power (2nd quadrant) 4 rective power (3rd quadrant) 5 reactive power (4th quadrant) 6 reserve value 1 7 reserve value 2 8 quality of active power (in) 9 quality of active power (out) 10 quality of reactive power (1st quadrant) 11 quality of reactive power (2nd quadrant) 12 quality of rective power (3rd quadrant) 13 quality of reactive power (4th quadrant) 14 quality of reserve value 1 15 quality of reserve value 2

    If you specify object 10, the block size should be 12, and the elements are:

    0 active power (in) 1 active power (out) 2 reactive power (1st quadrant) 3 reactive power (2nd quadrant) 4 rective power (3rd quadrant) 5 reactive power (4th quadrant) 6 quality of active power (in) 7 quality of active power (out) 8 quality of reactive power (1st quadrant) 9 quality of reactive power (2nd quadrant) 10 quality of rective power (3rd quadrant) 11 quality of reactive power (4th quadrant)

    If you specify object 11, the block size should be 6, and the elements are:

    0 active power (in)

  • IEC870 - Driver Manual

    BLOCK[2] REQUEST BLOCKS OF INTEGRATED TOTALS (slave, 1189 or 1190, record, object)

    write-only

    1 reactive power (1st quadrant) 2 reactive power (4th quadrant) 3 quality of active power (in) 4 quality of reactive power (1st quadrant) 5 quality of reactive power (4th quadrant)

    The block timestamp indicates the measuring time. The quality fields are a bit mask where:

    bit 0: U units (0=kWh/kVarh 1=MWh/MVarh) bit 1: AL power failure bit 2: INT Intrusismo bit 3: MP parameters modified bit 4: VH time verification bit 5: CY overflow bit 6: CA device synchronized bit 7: IV invalid value

    VERIFYING THE REQUEST STATUS: You should also define a PLC tag to detect when all data has been read:

    N1 = slave N2 = 4 (read from cache) N3 = type (189 or 190, use the same value as the request) N4 = object (9, 10 or 11) use the same object specified in the request

    This tag reports the causes of transmission received with ASDU 189 or 190. It also reports a special value -1 indicating that all events (ASDU 139 or 140) have been returned by the driver, indicating that the request has finished.

    BLOCK[2] REQUEST EVENTS (slave, 1102, record, 0) write-only Writing to this block tag sends a request with ASDU 102 to activate the sending of events from the device. record indicates the type of events to be sent:

    52 section 1: power-on and tension below limits 53 section 2: clock synchronization and time change 54 section 3: parameter changes 55 section 4: internal errors 128 section 5: intrusion events 129 section 6: communication events 130 section 7: events of private password 131 section 8: events of Contract I 132 section 9: events of Contract II 133 section 10: events of Contract III

    The block should be written as a whole (do not write element by element), the block elements indicate the period of records to be retrieved:

    element 0: initial date/time element 1: final date/time

  • IEC870 - Driver Manual

    BLOCK[2] REQUEST EVENTS (slave, 1102, record, 0) write-only READING THE EVENTS: If writing to the request block succeedes, then the request has been accepted. You should receive the data by polling a BLOCK tag with the following parameters:

    B1 = slave B2 = 4 (read from cache) B3 = 1 (ASDU 1) B4 = 0

    The block elements are:

    element 0: sva element 1: spq element 2: spi - the block timestamp contains the event timestamp

    The following table summarizes the most common values for SPA and SPQ:

    SPA SPQ Record Description

    1 1 52 System restarted (lost data prior to the restart)

    1 2 52 Restart due to power outage (data not lost)

    3 0 52 Out of power (tension below limits)

    7 9 53 Time changed (contains previous time)

    7 11 53 Time changed (contains new time)

    7 2 53 Out of sync (the device is out of sync with a significative time difference in relation to the RM station)

    15 0 54 Parameters changed

    16 0 130 Private password modified

    18 1 128 Warning: intruders

    18 2 129 Warning: connected to a CM

    18 3 129 Warning: connected to a TPL

    18 4 129 Loss (SPI=1) or recovery (SPI=0) of communications with GPS

    19 0..127 55 Internal error (SPQ depends on manufacturer)

    15 21 131 Parameters changed for Contract I

    15 22 132 Parameters changed for Contract II

    15 23 133 Parameters changed for Contract III

    7 21 131 Invoice closed by command (Contract I)

    7 22 132 Invoice closed by command (Contract II)

    7 23 133 Invoice closed by command (Contract III)

    18 21 131 Warning: established connection for Contract I

    18 22 132 Warning: established connection for Contract II

    18 23 133 Warning: established connection for Contract III

    The SPI element will be 1 to indicate the presence of the event, and SPI=0 in cases where it is necessary to indicate the end of event (ex: SPA=7, SPQ=2) VERIFYING THE REQUEST STATUS: You should also define a PLC tag to detect when all events have been received:

  • IEC870 - Driver Manual

    BLOCK[2] REQUEST EVENTS (slave, 1102, record, 0) write-only N1 = slave N2 = 4 (read from cache) N3 = 102 (ASDU 102) N4 = 0

    This tag reports the causes of transmission received with ASDU 102. It also reports a special value -1 indicating that all events (ASDU 1) have been returned by the driver, indicating that the request has finished.

    TAG SET DEVICE CLOCK (slave, 1181, 0, 0) write-only Write to this tag to set the device clock using ASDU 181. The value written is added to the current system time (of the computer) and sent to the device. So, if you write 0.0, then the device clock will be set to the current system time.

    TAG READ MAE ID (slave, 1212, register, 0) read-only This tag returns a string containing the MAE ID. The register parameter can be:

    - 134 for Contract I - 135 for Contract II - 136 for Contract III

    Is is implemented using the following ASDUs of the ZIV protocol: - ASDU 212 (read parameters request) with LNGi = 20, CNJi = 5 and GRPi = 4 - ASDU 211 (parameter transmission) where the AJSi field contains a 20 character string,

    this string is the MAE ID returned in the tag value If the read fails, the log file should indicate the cause of the error (cot field):

    - 14: ASDU not available (the slave does not recognize this ASDU) - 13: the specified register does not exist or is not available - 55: the parameters do not exist or were incorrectly specified

  • IEC870 - Driver Manual

    APPENDIX I Data Types for IEC 870-5-101 and 104 This appendix lists the data types supported by the IEC driver when using the IEC 870-5-101 or IEC 870-5-104 protocols.

    Monitor Data Types This section lists the data types available in monitor direction. These data types can be addressed by the N3 parameter with the following tag types (read-only): 4 READ EVENT FROM CACHE 1 READ CURRENT VALUE FROM CACHE 101..116 READ INTERROGATION GROUP (*) If the IV and/or NT flags are present on the quality indicator of the received data, the driver reports these flags in the Quality of the read value. If IV is set, then the tag quality is OPC_QUALITY_CONFIG_ERROR (4). The IV flag takes precedence over NT (if both are present, then only IV is reported) If NT is set, then the tag quality is OPC_QUALITY_NOT_CONNECTED (8). Otherwise the reported quality is OPC_QUALITY_GOOD (192).

    1 M_SP_NA_1 Single-point information without time tag

    Value: 0 = OFF (SPI=0) 1 = ON (SPI=1) (*) IV and NT are returned on tag quality (**) SB and BL are not used

    2 M_SP_TA_1 30 M_SP_TB_1 (from IEC 870-5-104) Single-point information with time tag (contains timestamp)

    Value: 0 = OFF (SPI=0) 1 = ON (SPI=1) (*) IV and NT are returned on tag quality (**) SB and BL are not used

    3 M_DP_NA_1 Double-point information without time tag

    Value: 0 = indeterminate state 1 = determinate state OFF 2 = determinate state ON 3 = indeterminate state *** the value may be converted to a boolean (0=OFF, 1=ON) depending on the configuration of the DIQ data type (see the driver Interrogation page)

    Terry

    Terry

  • IEC870 - Driver Manual

    (*) IV and NT are returned on tag quality (**) SB and BL are not used

    4 M_DP_TA_1 31 M_DP_TB_1 (from IEC 870-5-104) Double-point information with time tag (contains timestamp)

    Value: 0 = indeterminate state 1 = determinate state OFF 2 = determinate state ON 3 = indeterminate state *** the value may be converted to a boolean (0=OFF, 1=ON) depending on the configuration of the DIQ data type (see the driver Interrogation page) (*) IV and NT are returned on tag quality (**) SB and BL are not used

    5 M_ST_NA_1 Step position information

    Value: -64 to 63 (VTI = value with transient state indication) (*) IV and NT are returned on tag quality (**) T, SB, BL and OV are not used

    6 M_ST_TA_1 32 M_SP_TB_1 (from IEC 870-5-104) Step position information with time tag (contains timestamp)

    Value: -64 to 63 (VTI = value with transient state indication) (*) IV and NT are returned on tag quality (**) T, SB, BL and OV are not used

    7 M_BO_NA_1 Bitstring of 32 bit

    Value: DWORD (BSI = Binary state information, 32 bit unsigned integer) (*) IV and NT are returned on tag quality (**) SB, BL and OV are not used

    8 M_BO_TA_1 33 M_BO_TB_1 (from IEC 870-5-104) Bitstring of 32 bit with time tag (contains timestamp)

    Value: DWORD (BSI = Binary state information, 32 bits) (*) IV and NT are returned on tag quality

    Terry

    Terry

  • IEC870 - Driver Manual

    (**) SB, BL and OV are not used

    9 M_ME_NA_1 Measured value, normalized value

    Value: -1.0 to 1.0-2-15 (double) (NVA = Normalized value) (*) IV and NT are returned on tag quality (**) SB, BL and OV are not used

    10 M_ME_TA_1 34 M_ME_TD_1 (from IEC 870-5-104) Measured value, normalized value with time tag (contains timestamp)

    Value: -1.0 to 1.0-2-15 (double) (NVA = Normalized value) (*) IV and NT are returned on tag quality (**) SB, BL and OV are not used

    11 M_ME_NB_1 Measured value, scaled value

    Value: -3276.8 to 3276.7 (double) (SVA = Scaled value) the scale is fixed, the values read are multiplied by 0.1 (*) IV and NT are returned on tag quality (**) SB, BL and OV are not used

    12 M_ME_TB_1 35 M_ME_TE_1 (from IEC 870-5-104) Measured value, scaled value with time tag (contains timestamp)

    Value: -3276.8 to 3276.7 (double) (SVA = Scaled value) the scale is fixed, the values read are multiplied by 0.1 (*) IV and NT are returned on tag quality (***) SB, BL and OV are not used

    13 M_ME_NC_1 Measured value, short floating point number

    Value: float (IEEE STD 754 = Short floating point number) (*) IV and NT are returned on tag quality (**) SB, BL and OV are not used

    14 M_ME_TC_1 36 M_ME_TF_1 (from IEC 870-5-104) Measured value, short floating point number with time tag (contains timestamp)

    Terry

  • IEC870 - Driver Manual

    Value: float (IEEE STD 754 = Short floating point number) (*) IV and NT are returned on tag quality (**) SB, BL and OV are not used

    15 M_IT_NA_1 Integrated totals

    Value: LONG (BCR = Binary counter reading, 32 bit signed integer) (*) IV is returned on tag quality (**) CA, CY and are not used

    16 M_IT_TA_1 37 M_IT_TB_1 (from IEC 870-5-104) Integrated totals with time tag (contains timestamp)

    Value: LONG (BCR = Binary counter reading, 32 bit signed integer) (*) IV is returned on tag quality (**) CA, CY and are not used

    17 M_EP_TA_1 38 M_EP_TD_1 (from IEC 870-5-104) Event of protection equipment with time tag (contains timestamp)

    Value: 0 = indeterminate state 1 = OFF 2 = ON 3 = indeterminate state *** the value may be converted to a boolean (0=OFF, 1=ON) depending on the configuration of the SEP data type (see the driver Interrogation page) (*) IV and NT are returned on tag quality (**) SB, BL, EI and are not used

    18 M_EP_TB_1 39 M_EP_TE_1 (from IEC 870-5-104) Packed start events of protection equipment with time tag (contains timestamp)

    Value: BYTE (SPE = Start event of protection equipment) bit 0 = GS bit 1 = SL1 bit 2 = SL2 bit 3 = SL3 bit 4 = SIE bit 5 = SRD (*) IV and NT are returned on tag quality

    Terry

  • IEC870 - Driver Manual

    (**) SB, BL, EI and relay duration time are not used

    19 M_EP_TC_1 40 M_EP_TF_1 (from IEC 870-5-104) Packet output circuit information of protection equipment with time tag (contains timestamp)

    Value: BYTE (OCI = output circuit command of protection equipment) bit 0 = GC bit 1 = CL1 bit 2 = CL2 bit 3 = CL3 (*) IV and NT are returned on tag quality (**) SB, BL, EI and relay operating time are not used

    20 M_PS_NA_1 Packet single-point information with status of change detection

    Value: DWORD (SCD = Status + status change detection) bits 0..15 = status bits 16..31 = status change detection (*) IV and NT are returned on tag quality (**) SB, BL and OV are not used

    21 M_ME_ND_1 Measured value, normalized value without quality descriptor

    Value: -1.0 to 1.0-2-15 (double) (NVA = Normalized value)

    70 M_EI_NA_1 End of initialization

    Value: BYTE (COI = Cause of initialization) 0 = local power switch on 1 = local manual reset 2 = remote reset (*) the flag is not used

    103 C_CS_NA_1 Indication of a received Clock Synchronization Command

    Value: new system date/time

    Command Data Types This section lists the data types available in command direction. These data types can be addressed by the N3 parameter with the following tag types (write-only): 10 SELECT 11 EXECUTE 12 DEACTIVATE SELECTION 20 SELECT / SHORT PULSE

  • IEC870 - Driver Manual

    21 EXECUTE / SHORT PULSE 22 DEACTIVATE SELECTION / SHORT PULSE 30 SELECT / LONG PULSE 31 EXECUTE / LONG PULSE 32 DEACTIVATE SELECTION / LONG PULSE 40 SELECT / PERSISTENT OUTPUT 41 EXECUTE / PERSISTENT OUTPUT 42 DEACTIVATE SELECTION / PERSISTENT OUTPUT (*) The S/E (select/execute) and QU fields of the COMMAND QUALIFIER, as well as the CAUSE OF TRANSMISSION (activation/deactivation) are filled by the driver according to the following table:

    Command (N1) S/E QU COT

    SELECT 1 (Select) 0 (no additional definition) 6 (cot_act)

    EXECUTE 0 (Execute) 0 (no additional definition) 6 (cot_act)

    DEACTIVATE SELECTION 0 (Execute) 0 (no additional definition) 8 (cot_deact)

    SELECT / SHORT PULSE 1 (Select) 1 (short pulse duration) 6 (cot_act)

    EXECUTE / SHORT PULSE 0 (Execute) 1 (short pulse duration) 6 (cot_act)

    DEACTIVATE / SHORT PULSE 0 (Execute) 1 (short pulse duration) 8 (cot_deact)

    SELECT / LONG PULSE 1 (Select) 2 (long duration pulse) 6 (cot_act)

    EXECUTE / LONG PULSE 0 (Execute) 2 (long duration pulse) 6 (cot_act)

    DEACTIVATE / LONG PULSE 0 (Execute) 2 (long duration pulse) 8 (cot_deact)

    SELECT / PERSISTENT OUTPUT 1 (Select) 3 (persistent output) 6 (cot_act)

    EXECUTE / PERSISTENT OUTPUT 0 (Execute) 3 (persistent output) 6 (cot_act)

    DEACTIVATE / PERSISTENT OUTPUT 0 (Execute) 3 (persistent output) 8 (cot_deact)

    45 C_SC_NA_1 Single command

    Value: 0 = OFF (SCS=0) 1 = ON (SCS=1)

    46 C_DC_NA_1 Double command

    Value: 0 = not permitted 1 = OFF 2 = ON 3 = not permitted *** the value may be used as a boolean (0=OFF, 1=ON) depending on the configuration of the DCO data type (see the driver Interrogation page)

    47 C_RC_NA_1 Regulating step command

    Value: 0 = not permitted 1 = next step LOWER 2 = next step HIGHER 3 = not permitted *** the value may be used as a boolean (0=LOWER, 1=HIGHER) depending on the configuration of the RCO data type (see the driver Interrogation page)

    Terry

  • IEC870 - Driver Manual

    48 C_SE_NA_1 Set-point command, normalized value

    Value: -1.0 to 1.0-2-15 (double) (NVA = Normalized value)

    49 C_SE_NB_1 Set-point command, scaled value

    Value: -3276.8 to 3276.7 (double) (SVA = Scaled value) the scale is fixed, the values written are multiplied by 10

    50 C_SE_NC_1 Set-point command, short floating point number

    Value: float (IEEE STD 754 = Short floating point number)

    51 C_BO_NA_1 Bitstring of 32 bits

    Value: DWORD (BSI Binary state information, 32 bit unsigned integer)

    58 C_SC_TA_1 (from IEC 870-5-104) Single command with time tag

    Value: 0 = OFF (SCS=0) 1 = ON (SCS=1)

    59 C_DC_TA_1 (from IEC 870-5-104) Double command with time tag

    Value: 0 = not permitted 1 = OFF 2 = ON 3 = not permitted *** the value may be used as a boolean (0=OFF, 1=ON) depending on the configuration of the DCO data type (see the driver Interrogation page)

    60 C_RC_TA_1 (from IEC 870-5-104) Regulating step command with time tag

    Value: 0 = not permitted 1 = next step LOWER 2 = next step HIGHER 3 = not permitted *** the value may used as a boolean (0=LOWER, 1=HIGHER) depending on the configuration of the RCO data type (see the driver Interrogation page)

  • IEC870 - Driver Manual

    61 C_SE_TA_1 (from IEC 870-5-104) Set-point command, normalized value with time tag

    Value: -1.0 to 1.0-2-15 (double) (NVA = Normalized value)

    62 C_SE_TB_1 (from IEC 870-5-104) Set-point command, scaled value with time tag

    Value: -3276.8 to 3276.7 (double) (SVA = Scaled value) the scale is fixed, the values written are multiplied by 10

    63 C_SE_TC_1 (from IEC 870-5-104) Set-point command, short floating point number with time tag

    Value: float (IEEE STD 754 = Short floating point number)

    64 C_BO_TA_1 (from IEC 870-5-104) Bitstream of 32 bits with time tag

    Value: DWORD (BSI Binary state information, 32 bit unsigned integer)

    Other Data Types Used Internally by the Driver This section lists the data types used internally by the driver. 100 C_IC_NA_1 Interrogation Command

    Used internally with the READ INTERROGATION GROUP tags (N2/B2=101 to 116) to activate the general interrogation procedure. Also used in the auto-interrogation process configured in the Extras dialog

    101 C_CI_NA_1 Counter Interrogation Command

    Used with the REQUEST AND/OR FREEZE INTEGRATED COUNTERS tags (N2=3).

    103 C_CS_NA_1 Clock synchronization command

    Used internally with the TESTCLOCK SYNCHRONIZATION tag (N2=2). 104 C_TS_NA_1 107 C_TS_TA_1 (from IEC 870-5-104) Test Command

    Used internally with the TEST LINK tag (N2=1104) when the driver is in master mode. In slave mode, the driver also responds to test commands sent by the controlling station.

  • IEC870 - Driver Manual

    Data Types Not Implemented by the Driver This section lists the data types not implemented by the driver. 102 C_RD_NA_1 Read command

    105 C_RP_NA_1 Reset process command

    106 C_CD_NA_1 Delay acquisition command

    110 P_ME_NA_1 Parameter of measured values, normalized value

    111 P_ME_NB_1 Parameter of measured values, scaled value

    112 P_ME_NC_1 Parameter of measured values, short floating point number

    113 P_AC_NA_1 Parameter activation

    120 F_FR_NA_1 File ready

    121 F_SR_NA_1 Section ready

    122 F_SC_NA_1 Call directory, select file, call file, call section

    123 F_LS_NA_1 Last section, last segment

    124 F_AF_NA_1 ACK file, ACK section

    125 F_SG_NA_1 Segment

    126 F_DR_TA_1 Directory

  • IEC870 - Driver Manual

    APPENDIX II Selections from the IEC 870-5-101 standard The following selections were made from IEC 870-5-101: 1) Physical Layer

    - The network configurations supported by the driver are point-to-point or multiple point-to-point through a standard COM port.

    2) Link Layer 2.1) Only the unbalanced transmission mode is supported, the driver is always the

    MASTER and the other devices are SLAVES. 2.2) The frame format chosen was FT1.2 (see 6.2.4.2 of IEC 870-5-1) 2.3) The address field A of the link can be configured as one or two octets

    3) Application Layer and user process 2.1) The packing order for application data fields is mode 1 (see 4.10 of IEC 870-5-4), low

    order octets are sent first, high order octets are sent last 2.2) The ASDU CAUSE OF TRANSMISSION field can be configured as one or two octets 2.3) The ASDU COMMON ADDRESS field can be configured as one or two octets 2.4) The ASDU INFORMATION OBJECT ADDRESS field can be configured as one, two or

    three octets (altough the driver can only use 16 bits of the address) 2.5) The TYPE IDENTIFICATIONs supported by the driver are listed in APPENDIX I. 2.6) The DECIMAL POINT POSITION used for converting SCALED VALUES (SVA) is 10-1,

    values received from the devices are multiplied by this unit, values sent to the devices are divided by this unit.

  • IEC870 - Driver Manual

    APPENDIX III Data Types for IEC 870-5-102 This appendix lists the data types supported by the IEC driver when using the IEC 870-5-102 protocol.

    Monitor Data Types This section lists the data types available in monitor direction. These data types can be addressed by the N3 parameter with the following tag types (read-only): 4 READ EVENT FROM CACHE 1 READ CURRENT VALUE FROM CACHE (*) If the IV and/or NT flags are present on the quality indicator of the received data, the driver reports these flags in the Quality of the read value. If IV is set, then the tag quality is OPC_QUALITY_CONFIG_ERROR (4). The IV flag takes precedence over NT (if both are present, then only IV is reported) If NT is set, then the tag quality is OPC_QUALITY_NOT_CONNECTED (8). Otherwise the reported quality is OPC_QUALITY_GOOD (192).

    1 M_SP_NA_2 Single-point information with time tag (contains timestamp)

    Value: 0 = OFF (SPI=0) 1 = ON (SPI=1) (*) SPQ is not used

    2 M_IT_TA_2 Accounting integrated totals, four octets each

    3 M_IT_TB_2 Accounting integrated totals, three octets each

    4 M_IT_TC_2 Accounting integrated totals, two octets each

    5 M_IT_TD_2 Periodically reset accounting integrated totals, four octets each

    6 M_IT_TE_2 Periodically reset accounting integrated totals, three octets each

    7 M_IT_TF_2 Periodically reset accounting integrated totals, two octets each

    8 M_IT_TG_2 Operational integrated totals, four octets each

    9 M_IT_TH_2 Operational integrated totals, three octets each

    10 M_IT_TI_2 Operational integrated totals, two octets each

    11 M_IT_TK_2 Periodically reset operational integrated totals, four octets each

    12 M_IT_TL_2 Periodically reset operational integrated totals, three octets each

    13 M_IT_TM_2 Periodically reset operational integrated totals, two octets each

    Value: DWORD (CR2, CR3 or CR4 Integrated Total)

  • IEC870 - Driver Manual

    0 = OFF (SPI=0) 1 = ON (SPI=1) (*) IV is returned on tag quality (**) CA, CY and are not used (***) SIGNATURE is not supported and should not be present on the frame

    70 M_EI_NA_2 End of initialization

    Value: BYTE (COI = Cause of initialization) 0 = local power switch on 1 = local manual reset 2 = remote reset (*) the flag is not used

  • IEC870 - Driver Manual

    Driver Version History

    Version Date Author Comments

    v2.21 2006-08-18 F. Englert - fixed: the FCB bit sent in the 101 and 102 master protocols is inverted (Case 7286)

  • IEC870 - Driver Manual

    Version Date Author Comments

    v2.20 2006-08-11 F. Englert - documentation fixed: sample E3 script for handling command indication didnt work (Case 5452) - the driver now logs events that are discarded when the cache becomes full (more than 100 events for a single object) (Case 6563) - fixed: incorrect timestamp (zero) is sent for the IEC 870-5-104 types in slave mode (Case 6564) - fixed: the Slave polling rate configuration has no effect (Case 6570) - fixed: a timestamp marked as invalid (IV=1) makes the data value invalid too (Case 6666) - extensive testes were made on the driver master and slave protocols, and some minor issues resolved (Case 6798)

    - fixed: the driver is using a fixed 1 second timeout (instead of the value configured in the App Layer Timeout parameter) when it needs to send a command and the application layer is busy (doing General Interrogation, for example), causing the command to fail (Case 6848) - fixed: the timestamps used by the driver may be modified by one millisecond when passed to and from the supervisory (Case 7256) this fix also requires E3 v2.5 Build 131 and IOKit v1.13

    - Added support to command ASDUs 48 (C_SE_NA_1), 49 (C_SE_NB_1), 50 (C_SE_NC_1) and 51 (C_BO_NA_1) (Case 5361) - Added support to the IEC 870-5-104 Slave protocol. This includes support to the command ASDUs 58 (C_SC_TA_1), 59 (C_DC_TA_1), 60 (C_RC_TA_1), 61 (C_SE_TA_1), 62 (C_SE_TB_1), 63 (C_SE_TC_1), 64 (C_BO_TA_1), and also the Test Command using ASDU 107 (C_TS_TA_1) (Case 5506) - Implemented a series of updates to the ZIV protocol: mass reads using ASDUs 122/123; new block format for Sag/Swell reads using ASDU 254 and records 221 to 230; added VTCD parameters adjust using ASDU 206; added reading of tensions and current sequences using ASDU 254 and record 210; retested the whole ZIV protocol (Case 5846) - Modified the VTCD adjust block on the ZIV protocol in order to meet the new protocol definition (Case 6561) - Added the Modify the timestamp on received values: option to the Interrogation Page (Case 6562) - Added support to the Clock Synchronization Command (respond to ASDU 103: C_CS_NA_1) on the Slave protocols (101 and 104). Also added the Commands Page (Case 6826) - Added support to the IEC 870-5-104 Master protocol (Case 7259)

  • IEC870 - Driver Manual

    Version Date Author Comments

    v2.19 2005-01-17 F. Englert - added option to set the COMMON ADDRESS different from the LINK ADDRESS (Case 4364) - solved: the driver doesnt support slave addresses above 127 when using one octet for the slave address (Case 4766)

    - solved: the driver doesnt recognize incoming CC1 packets as ACK packets (Case 5210) - solved: the IEC 104 data types are returning the timestamp as the tag value (Case 5211) - solved: the ZIP READ CONFIGURATION BLOCK 2 tag (B2=1141) is not working (Case 5212) (*) the driver was recompiled with IOKit v1.08 to support turning the log On/Off in runtime

    v2.18 2004-07-28 F. Englert - solved: the driver wasnt sending general interrogation data in blocks (master/unbalanced mode only) (Case 4238)

    - solved: the driver (slave mode only) wasnt resending the last frame when it received a frame with an incorrect FCB (Case 4276) - added option to select the response type (Respond with) (Case 3741) - the IEC 870-5-104 data types are now supported in the pre-defined data list returned in the General Interrogation (Case 4035)

    v2.17 2004-06-09 F. Englert - added retries to the link layer (Case 3937)

    v2.16 2004-05-04 F. Englert - modified default application timeout (from 4000 to 4 seconds) (No Case Assigned) - added the Add timestamp to interrogation data option (Case 3608) - added option to handle the DIQ, DCO, RCO and SEP data types as Booleans (Case 3609)

    v2.15 2004-04-01 F. Englert - added Remove timestamp from interrogation data option (Case 3506) - added support to the IEC 870-5-104 data types transported in the IEC 870-5-101 protocol (the 104 protocol IS NOT implemented) (Case 3419) - translated documentation to portuguese (Case 3568)

    v2.14 2004-02-20 F. Englert - timestamps sent by the driver are incorrect (it is using the current computer time) (Case 3385)

  • IEC870 - Driver Manual

    Version Date Author Comments

    v2.13 2004-01-29 F. Englert - Double-point commands (DCO) and Single Event of Protection Equipment (SEP) now use the four possible states (intermediate(0), OFF(1), ON(2), and indeterminate(3)) instead of just a Boolean indicating the On/Off state (Case 3214) - The driver is not responding Test Link commands (func=2) received in Slave/Balanced state (Case 3231) - Added the Interrogation page. It allows configuration of the list of objects returned in the General Interrogation (Slave mode only) (Case 3284) - Added Test Link tag (Slave/Balanced mode only), this tag sends a test link command to the master and returns 1 if the command is successfull (Case 3285) - problem solved: the driver would hang sometimes in Slave/Balanced mode when it received a message from the server while trying to send a message to the same server (Case 3286)

    v2.12 2004-01-08 F. Englert - Double-point data (M_DP_NA_1 and M_DP_TA_1) now returns all four possible states (intermediate(0), OFF(1), ON(2) and indeterminate(3)) instead of just a Boolean indicating the On/Off state (Case 3214) - added option to enable/disable using the CC1 frame instead of the ACK frame to send an acknowledgement to the master station in balanced mode (Case 3215)

    v2.11 2003-12-19 F. Englert - added support to external commands in Slave mode (Case 3211)

    v2.10 2003-12-18 F. Englert - implemented IEC 870-5-101 SLAVE in Balanced mode (Case 195)

    V2.09 2003-12-02 F. Englert - slaves are not created anymore while the driver is offline (Case 3039)

    V2.08 2003-11-27 F. Englert - implemented IEC 870-5-101 SLAVE (Case 195)

    V2.07 2003-11-18 F. Englert - listen mode is now working properly (it was not recognizing values received in listen mode) (Case 2960)

    V2.06 2003-11-13 F. Englert - the driver now reports errors in the tag quality if it loses connection while in Listen Mode (Case 2935)

    V2.05 2003-11-07 F. Englert - added quality to the MASS MEMORY read (see B2=1189 or 1190) (Case 2893)

    V2.04 2003-11-05 F. Englert - added READ MAE ID tag (N2=1212) for ZIV slaves

    V2.03 2003-09-29 F. Englert - improved log for application level messages

    V2.02 2003-08-11 F. Englert - documentation updated to reflect the ZIV extensions

    V2.01 2002-07-29 F. Englert - driver ported to the new IOKit. - added support to IEC 870-5-102 and ZIV extensions