Skip to content

danyill/oscd-tp-multicast-naming

Repository files navigation

OpenSCD Plugin: TP Multicast Naming Editor

This plugin is intended to allow multicast addressing to meet Transpower requirements.

  • This is a plugin for open-scd-core, the core editor engine for OpenSCD.

  • This plugin is a web component and follows the open-wc recommendations.

  • This plugin uses the Apache License and is intended for you to use, study, share and improve.

Feel free to log issues to request fixes, improvements or new features.

It allocates Sampled Value and GOOSE communications addressing based on the user selecting items in a table with filtering allow by message type, protectin system and primary system bus.

MAC Addresses
  • The first user-allocated octet is allocated to 00 for Prot1 and 01 for Prot2 for SMV and GSE traffic.

  • MAC addresses are assigned to be unique and up to 255 are allowed.

APP IDs

For GSE Traffic:

  • Prot1 (as defined by a device whose last digit is even) trips (as defined by control block names beginning Ctl or Trip) begin at 0x8001 and go to 0x8fff

  • Prot2 (as defined by a device whose last digit is odd ) trips begin at 0x9001 and go to 0x9fff

  • Non-tripping services are allocated between 0x0001 and 0x4fff

For SMV Traffic:

  • Prot1 begins at 0x5000 and go to 0x5fff

  • Prot2 begins at 0x6000 and go to 0x6fff

appID or smvID
  • For GOOSE traffic, this always the IED name a forward slash and the control block name

  • For SV traffic, if the name is "TEMPLATE" it is substituted for the IED name.

  • Otherwise, the smvID is generated with the IED name, a forward slash and the value of smvID.

VLAN Priority
  • All GOOSE tripping messages (as defined by control block names beginning Ctl or Trip) have Priority 6.

  • All other GOOSE traffic is Priority 5

  • All SMV traffic is Priority 6

GSE MinTime and MaxTime
  • All tripping or testing messages (as defined by control block names beginning Ctl or Trip or Test) have a MinTime of 4 ms and a MaxTime of 1000 ms.

  • All other messages have a MinTime of 100 ms and a MaxTime of 1000 ms.

VLAN ID
  • VLANs are allocated on the basis of the control block name for GSE and the smvID for SMV (after the trailing /)

  • They are allocated as pairs for Prot1 and Prot2 at the same time. Prot1 and Prot2 are identified by the IED name ending in an even and odd number respectively.

  • A VLAN is either substation wide or on a per primary system bus basis.

  • Allocation as follows

    Table 1. For a Substation
    Service Type Services Prot1 VLAN Range Prot2 VLAN Range Comment

    P1 to P2 GOOSE

    Nothing as yet.

    1050-1059

    Nothing as yet.

    Conventional Integration

    For interfacing with conventional protection

    1000

    Nothing as yet.

    GOOSE

    ILock, TripCBFail, SPSStn, VReg, AdjBusCouplerInd, SwydLighting, CtlHalfCB

    1006-1049

    2006-2049

    e.g. Interlocking, SPS schemes, event triggering, bus protection CB Fail initiate, voltage regulation, indication across a bus section/coupler, switchyard lighting, breaker and a half installations Trip(CBFail) and ARecl block

    SV

    VTSelStn

    1060-1099

    2060-2099

    e.g. VT Selection, Synch Check and Deadline Charge, Remote Synch.

    Table 2. For a Bus
    Service Type Services Prot1 VLAN Range Prot2 VLAN Range Comment

    P1 to P2 GOOSE

    ARecl, SwgrPos

    50-99

    ARecl Initiate, ARecl Block, Cross tripping if required, Event triggering, ESW indication on GHA LV Incomers

    (Bus and Bay Level) GOOSE (Slow)

    Ind, Test, TCh, SPS

    110-149

    210-249

    Bus protection, bay protections, test signals, tap changing, SPSes within a primary bus

    (Bus and Bay Level) GOOSE (Fast)

    Ctl

    Protection and tripping

    (Bus and Bay Level) SV

    Just the IED name, TEMPLATE, Phase, NCT_UB_ET

    150-199

    250-299

    Bay protections

  • Buses are determine by a Function named BusPhysConnection under a Bay in the Substation section with a name which begins Bus followed by an underscore and the bus name.

    • The bus name attribute is the definition of "bus" in the above.

  • Within the function, there will be a single LPHD for each device (although any logical node reference will do)

  • This will be for Generation 1 substations (at least for this initial design).

    <Bay name="BusA">
    	<ConnectivityNode name="CN_BusA" pathName="XAT/V220/BusA/CN_BusA"/>
    	<Function name="BusPhysConnection">
    		<LNode iedName="XAT_232_P2" ldInst="Application" prefix="" lnClass="LPHD" lnInst="0"/>
    		<LNode iedName="XAT_278_M2" ldInst="Application" prefix="" lnClass="LPHD" lnInst="1"/>
    		<LNode iedName="XAT_T1_M2" ldInst="Application" prefix="" lnClass="LPHD" lnInst="1"/>
    		<LNode iedName="XAT_C3_M2" ldInst="Application" prefix="" lnClass="LPHD" lnInst="1"/>
    		<LNode iedName="XAT_2202_M2" ldInst="Application" prefix="" lnClass="LPHD" lnInst="1"/>
    		<LNode iedName="XAT_252_M2" ldInst="Application" prefix="" lnClass="LPHD" lnInst="1"/>
    		<LNode iedName="XAT_242_M2" ldInst="Application" prefix="" lnClass="LPHD" lnInst="1"/>
    		<LNode iedName="XAT_232_M2" ldInst="Application" prefix="" lnClass="LPHD" lnInst="1"/>
    		<LNode iedName="XAT_220_M2" ldInst="Application" prefix="" lnClass="LPHD" lnInst="1"/>
    		<LNode iedName="XAT_T1_P2" ldInst="Application" prefix="" lnClass="LPHD" lnInst="0"/>
    		<LNode iedName="XAT_C3_P2" ldInst="Application" prefix="" lnClass="LPHD" lnInst="0"/>
    		<LNode iedName="XAT_BusA_P2" ldInst="Application" prefix="" lnClass="LPHD" lnInst="1"/>
    	</Function>
    </Bay>

VLANs can be viewed and exported to another file (to keep allocations consistent between protection systems if files are managed separately). An export to csv of all (or selected) publishing information is provided.

VLAN information is stored within the Communication section as a Private element, in the following form:

<Private type="Transpower-VLAN-Allocation" etpc:updated="2023-08-21 13:01:53 +12:00">
    <etpc:Station/>
    <etpc:Bus>
        <etpc:VLAN etpc:serviceName="Ctl/Ind/Test" etpc:serviceType="GSE" etpc:useCase="Bus" etpc:prot1Id="64" etpc:prot2Id="C8" etpc:busName="BusA"/>
        <etpc:VLAN etpc:serviceName="BusSV" etpc:serviceType="SMV" etpc:useCase="Bus" etpc:prot1Id="96" etpc:prot2Id="FA" etpc:busName="BusA"/>
        <etpc:VLAN etpc:serviceName="Ctl/Ind/Test" etpc:serviceType="GSE" etpc:useCase="Bus" etpc:prot1Id="65" etpc:prot2Id="C9" etpc:busName="BusB"/>
        <etpc:VLAN etpc:serviceName="BusSV" etpc:serviceType="SMV" etpc:useCase="Bus" etpc:prot1Id="97" etpc:prot2Id="FB" etpc:busName="BusB"/>
    </etpc:Bus>
</Private>

Follow the steps in Loading the Plugin. Once the plugin is loaded:

  1. The plugin provides a menu option. Go to the menu in the top left and click on the plugin name.

  2. Then click enabled and then "Close".

    configure the plugin is initially disabled Chromium
  3. In either the publisher or subscriber view, click on the settings icon (a cog) and check that "Allow External Plugins" is checked.

  4. The plugin will automatic add or remove subscriptions as required.

Open SCD core allows plugins to be loaded from a URL.

You can click on this link to trial this plugin.

In this view it is without theming and only presents this plugin along with the open and save plugins.

  1. The latest core is available at https://openscd.github.io/open-scd/.

  2. Go to Menu  Add plugins…​

  3. Select Cancel - this is an editor plugin.

  4. Select OK to required a loaded document.

  5. Choose a plugin name of 'TP Multicast Naming'.

  6. Choose a plugin icon of 'link'

  7. Provide a plugin source URI of: https://danyill.github.io/oscd-tp-multicast-naming/oscd-tp-multicast-naming.js

  8. Click OK on the summary, it should indicate the parameters previously entered.

  9. Open a file and enjoy!

  1. Clone this project:

    $ git clone https://github.com/danyill/oscd-tp-multicast-naming
  2. Install dependencies

    $ npm i
  3. Start up a demo server

    $ npm run start
  4. Open in your browser locally at http://localhost:8000/demo/

Tip
OpenSCD is transitioning to use of open-scd-core, these instructions will require updating at the end of this transition.
  1. Open your OpenSCD distribution or use https://openscd.github.io.

  2. Create a custom extension by going to menu  Extensions  Add Custom Extension.

  3. Enter the name 'TP Multicast Naming', select 'Menu entry' and enter https://danyill.github.io/oscd-tp-multicast-naming/oscd-tp-multicast-naming.js as the URL.

    This is the URL of the bundle built by CI and is always the latest pre-release version of this plugin.

    screenshot add extension
    Figure 1. OpenSCD Add Custom Extension Screen
  4. Click on Add.

  5. This plugin is now available in the menu entry.

  1. Within the current OpenSCD distribution, plugins are stored in the public/js/plugins.js folder. Each plugin appears in the following form:

    {
        name: 'TP Multicast Naming', // (1)
        src: 'https://danyill.github.io/oscd-tp-multicast-naming/oscd-tp-multicast-naming.js', //  (2)
        icon: 'sim_card_download', // (3)
        default: true, // (4)
        kind: 'menu', // (5)
        requireDoc: true, // (6)
        position: 'middle' // (7)
      }
    1. Name of the plugin which appears in the editor menu at top of screen

    2. URL which can be a local or remote resource. For a local resource, begins without a forward slash, e.g. plugins/oscd-tp-multicast-naming/dist/oscd-tp-multicast-naming.js. In this case what is shown is loading a plugin from the build process.

    3. A material icon, see others at Material Symbols and Icons

    4. Whether the plugin is enabled by default or has to be enabled in the plugins menu

    5. The type of plugin, either menu or editor. This is an editor plugin.

    6. Whether a document must be loaded for this plugin to be available

    7. A string, either top, middle or bottom to give a location in the menu. Otherwise inferred from the order in the file relative to other plugins.

  2. You need to copy an entry like the above, ensure the src URL resolves and the plugin should be loaded when the distribution is built.

  3. If you are building locally you likely need to run an npm run bundle command in each plugin to make the dist folder, containing a single JavaScript file with the plugin available to OpenSCD.

Within an OpenSCD core distribution, plugins are also loaded from a json file with a slightly different schema.

  1. Typically the distribution will be served from a static web page and within the web page there will be a plugins property declared on an open-scd object, for instance:

    link:demo/index.html[role=include]
  2. This plugin is an editor plugin, editor plugins are an array of JSON of the following form:

    {
      "name": "TP Multicast Naming", // (1)
      "translations": { // (2)
        "de": "Kommunikationsexport",
        "pt":"Exportação de Comunicações"
      },
      "icon": "sim_card_download", // (3)
      "active": true, // (4)
      "requireDoc": true, // (5)
      "src": "/dist/oscd-tp-multicast-naming.js" // (6)
    }
    1. Name of the plugin which appears in the editor menu at top of screen

    2. Translations of the plugin name as required using standard locale names.

    3. A material icon, see others at Material Symbols and Icons

    4. Whether the plugin is enabled by default or has to be enabled in the plugins menu

    5. Whether a document must be loaded for this plugin to be available

    6. URL which can be a local or remote resource. For a local resource, begins with a forward slash, e.g. plugins/oscd-tp-multicast-naming/dist/oscd-tp-multicast-naming.js. In this case what is shown is loading a plugin from the internet using the continuous integration build process.

  3. You need to copy an entry like the above, ensure the src URL resolves and the plugin should be loaded when the distribution is built.

  4. If you are building locally you likely need to run an npm run bundle command in each plugin to make the dist folder, containing a single JavaScript file with the plugin available to OpenSCD.

To scan the project for linting and formatting errors, run

npm run lint

To automatically fix linting and formatting errors, run

npm run format

To execute a single test run:

npm run test

To run the tests in interactive watch mode run:

npm run test:watch

For most of the tools, the configuration is in the package.json to reduce the number of files in your project.

If you customize the configuration a lot, you can consider moving them to individual files.

To run a local development server that serves the basic demo located in demo/index.html

npm start

© 2023 Daniel Mulholland

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published