Library features

IEC 61850 ACSI services supported by the library

The following table gives an overview of the IEC 61850 ACSI (Abstract Communication Service Interface) services supported by the library.

Abbreviations used:
AA – application association
TP – two-party application association (MMS over TCP/IP or Unicast Sampled Value on top of Ethernet)
MC – Multicast application association (GOOSE or SV using multicast messages on top of Ethernet)

 ServicesAA: TP/MCClient (C)Server (S)Comments
Server
S1ServerDirectoryTPYY
Application association
S2AssociateTPYY
S3AbortTPYY
S4ReleaseTPYY
Logical Device
S5LogicalDeviceDirectoryTPYY
Logical Node
S6LogicalNodeDirectoryTPYY
S7GetAllDataValuesTPY (1)Y(1) by using multiple read requests
Data
S8GetDataValuesTPYY
S9SetDataValuesTPYY
S10GetDataDirectoryTPYY
S11GetDataDefinitionTPYY
Data set
S12GetDataSetValuesTPYY
S13SetDataSetValuesTP--not yet supported
S14CreateDataSetTPYYyes, domain , VMD, or association specific
S15DeleteDataSetTPYY
S16GetDataSetDirectoryTPYY
Substitution
S17SetDataValuesTPYYrequires application support
Setting group control
S18SelectActiveSGTPYYsince version 0.8.2
S19SelectEditSGTPYY
S20SetSGValuesTPYY
S21ConfirmEditSGValuesTPYY
S22GetSGValuesTPYY
S23GetSGCBValuesTPYY
Reporting
Buffered Report Control Block (BRCB)
S24ReportTPYY
S24-1data-change (dchg)YY
S24-2quality-change (qchg)YY
S24-3data-update (dupd)YY
S25GetBRCBValuesTPYY
S26SetBRCBValuesTPYY
Unbuffered Report Control Block (URCB)
S27ReportTPYY
S27-1data-change (dchg)YY
S27-2quality-change (qchg)YY
S27-3data-update (dupd)YY
S28GetURCBValuesTPYY
S29SetURCBValuesTPYY
Logging
S30GetLCBValuesTPY (1)Y(1) using the standard read service
S31SetLCBValuesTPY (1)Y(1) using the standard write service
S32QueryLogByTimeTPYY
S33QueryLogByEntryTPYY
S34GetLogStatusValuesTPY (1)Y(1) using the standard read service
Generic Substation Event model (GSE)
GOOSE-Control-Block
S35SendGOOSEMessageMCYYSupport for GOOSE subscriber and publisher
S36GetReferenceTP--
S37GetGOOSEElementNumberTP--
S38GetGoCBValuesTPYY
S39SetGoCBValuesTPYY
GSSE-Control-Block
S40SendGSSEMessageMC--GSSE is deprecated with Edition 2 of IEC 61850
S41GetReferenceTP--
S42GetGSSEElementNumberTP--
S43GetGsCBValuesTP--
S44SetGsCBValuesTP--
Transmission of Sampled Value Model (SVC)
Multicast SVC
S45SendMSVMessageMC-Y
S46GetMSVCBValuesTPYY
S47SetMSVCBValueTPYY
Unicast SVC
S48SendUSVMessageTPY
S49GetUSVCBValuesTPYY
S50SetUSVCBValuesTPYY
Control
S51SelectTPYY
S52SelectWithValueTPYY
S53CancelTPYY
S54OperateTPYY
S55Command-TerminationTPYY
S56TimeActivated-OperateTPYY
File transfer
S57GetFileTPYYsince version 0.7.1
S58SetFileTPYYsince version 1.0
S59DeleteFileTPYYsince version 0.7.3
S60GetFileAttributeValuesTPYYsince version 0.7.1
Time
T1Time resolution of internal clock1ms1ms
T2Time accuracy of internal clockdepending on application
T3Supported TimeStamp resolution1ms1ms

35 thoughts on “Library features

    1. Michael Zillgith Post author

      You don’t need a special Ethernet switch. These are just required to ensure real-time requirements in a LAN. To test GOOSE you can use 2 computers connected by Ethernet. You can also test GOOSE communication between different virtual machines on the same host or between a virtual machine and the host computer.

      Reply
  1. Men-Shen Tsai

    Thanks. I ran goost_publisher on Beaglebone Black (sudo ./goost_publisher_example) and goost_subscribe (sudo ./goost_subscriber_example eth0) on Raspberry PI. The two boards are connected to the same switch. On the subscriber console, the debug messages show:
    GOOSE message:
    —————-
    APPID: 4096
    LENGTH: 101
    APDU length: 93
    GOOSE message ignored due to wrong APPID value

    How can I fix the problem??

    Thanks.

    Reply
    1. Michael Zillgith Post author

      goose_subscriber_example was not intended to be used with the goose_publisher_example but with server_example_goose. The goose_publisher_example uses another APPID.

      You can change the line

      GooseSubscriber_setAppId(subscriber, 1000);

      to

      GooseSubscriber_setAppId(subscriber, 0x1000);

      Then it will show that GOOSE messages are received when DEBUG is activated.

      Reply
  2. Men-Shen Tsai

    Thanks. It worked if I ran the goose server on BBB and subscriber on RasPi. But if I ran the programs another way, i.e., goose server on RasPi and subscriber on BBB, I got “Invalid PDU size”. The kernel of BBB is 3.8.13 and RasPi is 3.13.3. The Ethernet driver might cause the problem. I will check it up.

    Reply
  3. Wojciech

    Hi,

    I ran “server_example1” or “server_example2” or “server_example3” on PC with Ubuntu 10 32 bit. On other PC, I ran programs (industry programs from other manufactures to testing connections) to connect with these examples and its is OK, but the problem is with General Interrogation (GI) reports. In order to work GI properly, I have to enable report, disable and again enable. Then GI starts working.

    These industry programs from other manufactures (Schneider, Omicron), work properly with other devices/programs with IEC61850.

    Best Regards,

    Wojciech

    Reply
    1. Michael Zillgith Post author

      Thanks. I could identify the problem and will provide a fix with the next release.

      Reply
  4. Men-Shen Tsai

    I am trying to modify server_example_goose to pass the binary/status with time tag. I added few lines of code in the while(running) loop:

    uint64_t timestamp = Hal_getTimeInMs();
    IedServer_lockDataModel(iedServer);

    IedServer_updateBooleanAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_SPCSO1_stVal, status);
    status= !status;
    IedServer_updateUTCTimeAttributeValue(iedServer,IEDMODEL_GenericIO_GGIO1_SPCSO1_t, timestamp);

    IedServer_unlockDataModel(iedServer);

    However, it has no effect of the values in goose frame. The subscriber always shows null value as

    GOOSE message:
    ----------------
    APPID: 1000
    LENGTH: 125
    APDU length: 117
    parseGoosePayload()
    Found gocbRef
    gocbRef is matching!
    Found timeAllowedToLive 1500
    Found dataSet
    Found timestamp t: 327
    Found stNum: 1915
    Found sqNum: 1
    Found simulation: 0
    Found confRev: 2
    Found ndsCom: 0
    Found number of entries: 4
    Found all data with length: 12
    found boolean
    value: (null)
    found boolean
    value: (null)
    found boolean
    value: (null)
    found boolean
    value: (null)
    GOOSE event:
    stNum: 1915 sqNum: 1
    timeToLive: 1500
    timestamp: 1404646593593

    What do I need to do so I can pass a binary value with time stamp using GOOSE?

    Thanks.

    Reply
    1. Michael Zillgith Post author

      Sorry but I cannot reproduce the problem. For me transmission of timestamp works. Is the timestamp included in the data set?

      Reply
  5. Men-Shen Tsai

    The content of time tag is correct; but the value (Boolean in this case) shows NULL even I had specifically called IedServer_updateBooleanAttributeValue() to specify the binary value.

    Reply
  6. Zhang Ye

    My project is a embedded system which using blackfin(ADSP-BF536).Could I use the libiec61850? I need to wirte my own HAL,right ?
    The second problem is how many resources about hardware the libiec61850 will be cost ? RAM cost ? ROM cost ?
    Thank you very much.

    Reply
  7. Men-Shen Tsai

    To use the report function, I modified server_example3.c as following:

    while (running) {
    uint64_t timestamp = Hal_getTimeInMs();

    t += 0.1f;

    float an1 = sinf(t);
    float an2 = sinf(t + 1.f);
    float an3 = sinf(t + 2.f);
    float an4 = sinf(t + 3.f);

    IedServer_lockDataModel(iedServer);

    IedServer_updateFloatAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn1_mag_f, an1);
    IedServer_updateUTCTimeAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn1_t, timestamp);
    IedServer_updateFloatAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn2_mag_f, an2);
    IedServer_updateUTCTimeAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn2_t, timestamp);
    IedServer_updateFloatAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn3_mag_f, an3);
    IedServer_updateUTCTimeAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn3_t, timestamp);
    IedServer_updateFloatAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn4_mag_f, an4);
    IedServer_updateUTCTimeAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn4_t, timestamp);


    if (an1 > 0.8) status = true; else status = false;
    IedServer_updateFloatAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_SPCSO1_stVal, status);
    IedServer_updateUTCTimeAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_SPCSO1_t, timestamp);
    IedServer_updateFloatAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_Ind1_stVal, status);
    IedServer_updateUTCTimeAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_Ind1_t, timestamp);


    IedServer_unlockDataModel(iedServer);
    Thread_sleep(100);
    }

    In the client, I enabled the report function by setting simpleIOGenericIO$LLN0$RP$EventsIndexed01$RptEna to true.

    The SPCSO1$stVal is updated accordingly. But the time stamp, SPCSO1$t, is never updated. To compare the values, Ind1 is polled every 500 mS. The stVal and t of Ind1 are updated accordingly.
    Question: What do I need to do so the time stamp can also be updated?

    Thanks.

    Reply
    1. Michael Zillgith Post author

      I wonder why you are using the IedServer_updateFloatAttributeValue to update the SPCSO1.stVal since this is defined to be a boolean value and not as a float. Anyway the timestamp update should work. Do you mean the timestamp is really not updated – so doing a read the value doesn’t change? Or do you mean the report is not triggered when t changes?

      Reply
  8. Varun Nalwa

    The Library works flawlessly on my Windows7 machine for MMS.
    Addition of Winpcap also allowed to read/write GOOSE messages!
    No problems whatsoever…
    Awesome work!
    Thanks!

    Reply
  9. leshich

    Hi!
    It would be very intresting to see the implementation of services SendMSVMessage/SendUSVMessage of the IEC61850-9-2. Sending analog voltage/current measures in real-time over Ethernet might be a popular task. Do you have such a plan?
    Thanks.

    Reply
    1. Michael Zillgith Post author

      Thanks for the hint. Support for IEC 61850-9-2 is in the pipeline. So expect this to be part of one of the next upcoming releases.

      Reply
  10. John Steink

    Hello,
    I’m starting to change some examples codes. I’m working on Linux.
    I usually feel more confortable using an IDE, and I’m using Qt Creator (3.5.1) at the moment.

    Do you use any IDE at all on Linux?

    Opening an existing project with CMakeLists.txt has not been straightforward.
    For instance, .h files are not seen. I’d need to include them manually.

    Also, I’m no able to use code completion, function highlighting etc.

    In short, how do you usually code in Linux for the libIEC project, please?

    Tx in advance

    Reply
    1. Michael Zillgith Post author

      Hi,
      I am using eclipse. Setting up a project manually with existing code is quite easy. But I use the IDE only as an editor with powerful code completion and refactoring capabilities. For building/debugging I use make, gdb and other command line tools. Actually I am using cmake only to build the project files for the visual studio tools on windows.

      Reply
      1. Vladimir

        Hello,

        I started to work with libiec library some time ago. I follow the same way, like you. I use eclipse and create project with option “Makefile Project with Existing Code”. Everything is fine. But. I would like to add functionality from new C++ release. I mean C++11 standard. Please, explain how to do this.

        Thanks!

        Reply
  11. Memo

    Hi, I am setting up server – client examples for testing goose messages. The libraries work fine with loopback but when I am trying to send the messages to eth0 I am not receiving on the other side. I have the server running on a Ubuntu (virtual machine) and the client on raspberry pi. I am using wireshark to track the messages but even when the server is sending the packages there is nothing in the client side…what could be the problem? I am using server_example_goose with goose_subscriber.

    thank you

    Memo

    Reply
    1. Michael Zillgith Post author

      Hi! It is difficult to say. The GOOSE messages contain VLAN tags when sent. Maybe the “virtual switch” of your VM is blocking it. You can use a tool like tcpdump to check if messages arrive at the raspberry pi.

      Reply
      1. Memo

        Thank you for your replay…just one more question for now..do I need to open a ssh channel between Pi and my virtual machine in order to get the messages from the server? If I start the client from my computer using ssh I am able to get the goose messages and drop the client-server connections once I stop any of the services…I was expecting this to happen the same way if I start client and server on each side, separately….

        Reply
  12. muthana

    Hi,
    When I try to use the Beagle demo example it gives me the fault “Segmentation fault” ?
    can you please inform what should I do I search a lot but many reason and solution nothing work!

    thanks

    Reply
    1. Michael Zillgith Post author

      Hi, I have seen that the static_model.c/.h files of the demo are not up to date.

      You have to recreate them by entering the demos/beaglebone folder and call

      java -jar ../../tools/model_generator/genmodel.jar beagle_demo.icd

      Reply
  13. Andrew

    Excuse me, can you help me? I don`t undastand how i can subscribe to more than one report.
    For example : in you example code client_example_reporting.c
    we subscribe only one report and than we waiting recive report

    while (running) {
    Thread_sleep(10);

    IedConnectionState conState = IedConnection_getState(con);

    if (conState != IED_STATE_CONNECTED) {
    printf(“Connection closed by server!\n”);
    running = 0;
    }
    }

    How we can subscribe to the next report ?
    I think we must use some thread, Is it true?
    May be Do you have some example ?

    Thank you for your concern.

    Reply
    1. Michael Zillgith Post author

      Hello Alexis,
      the IEEE 1588 is referenced by the new IEC 61850-9-3 document but not specified there. It is stated to be a “profile” specifying the subset of IEEE 1588 to be used in conjunction with some IEC 61850 applications. An IEEE 1588 implementation is not part of the library. It has to be implemented by third-party hardware/software.

      Reply
  14. Alexis Burbano

    Thanks Michael,

    This library is a great job. I’m working for get clock syncronization together libiec61850.

    Reply
  15. Abdelbacet

    Hi ,
    What are the defects of using the threadless operation modes.
    Did you encourage me to use it or to use the other modes .

    Reply
  16. Alexis Burbano

    Hi Michael,

    I understand the relation between client and server,but I have a question about if with this library a Server can transmit some data to other Server (communication between same level servers).
    Thanks.

    Reply
    1. Michael Zillgith Post author

      Hi Alexis,
      IEC 61850/MMS is a client/server protocol only. If a “server” application wants to access other server’s data it has to implement a client.

      Reply
      1. Alexis Burbano

        Hi Michael,
        When you say “it has to implement a client”, you mean about a independent client? or a client inside a server?.

        Thank for you answer.

        Reply
        1. Michael Zillgith Post author

          I meant your server application has to use the client API to connect to another server. In this case your application is client and server but there are two different MMS/TCP connections

          Reply
  17. Phiphat Tanapornchinpong

    I use Raspberry Pi 3 with libiec61850 .I do every thing in Readme file .I use Wireshark program for detect GOOSE Signal or SV Signal from Raspberry .I don’t see any GOOSE or SV Protocol from Wireshark

    Or Wireshark program can not do that ?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *