Grafana (backend) and Rapid SCADA

Forum Home Forums Development and Integration Grafana (backend) and Rapid SCADA

Viewing 15 posts - 1 through 15 (of 26 total)
  • Author
    Posts
  • #7453
    OtavioF
    Participant

    Hello!

    Recently I’ve built a plugin that’s similar to the SimpleJson-database used on the GrafanaDataProvider app. The difference is the support for alarms and other notifications. Here’s the source code: https://github.com/HadesArchitect/simple-json-backend-datasource

    However, I’m having trouble running it, because there is some kind of conflict with Rapid SCADA. Whenever I run it using the data source, the communication service stops working.

    Here’s the ScadaCommSvc.log:

    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> ScadaCommService 5.2.0.1 is started
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Load device library: KpModbus.dll
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Connect to SCADA-Server "localhost"
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ERR> Incorrect SCADA-Server response to version request
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Disconnect from SCADA-Server
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ERR> Unable to start operation due to SCADA-Server communication error.
    Delay before trying again

    When I run with the standard SimpleJson-database, everything runs smoothly.

    Any ideas of what might be happening?

    Thank you in advance

    #7458
    Mikhail
    Moderator

    Hello,

    Could you also post here a part of the SCADA-Server log file? Let’s check how the server behaves in this period of time.

    #7459
    Mikhail
    Moderator

    SCADA-Server uses TCP port 10000 for incoming connections. You should check that other software does not occupy it.

    #7473
    OtavioF
    Participant

    Hello!

    The SCADA-Server log at the same period of time is like this:

    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> ScadaServerService 5.1.2.1 is started
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Check the existence of the data directories is completed successfully
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Check the existence of the configuration database files is completed successfully
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Input channels are read from the configuration database. Active channel count: 81
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Ouput channels are read from the configuration database
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Users are read from the configuration database
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Formulas are read from the configuration database
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> The formulas source code has been compiled
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Connection listener is started
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Start server
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Current data are loaded

    It seems that there is nothing wrong with Server. When checking Instance Status, Server status its “Normal”, but Communicator appears “Error”.

    #7475
    Mikhail
    Moderator

    Hello,

    Could you explain how does your plugin work?
    It may help to find out why it affects interaction between Server and Communicator.

    #7494
    OtavioF
    Participant

    Hi!

    I’m not the author of this plugin. I believe the way it works should be close to the original Simple Json database used to develop the GrafanaDataProvider app. The difference is that this plugin has support for alerts and annotations, so it’s a “backend” database plugin.

    I think I’ll have to analyze the source code of the plugin and try to identify what’s causing the conflict.

    #7497
    Mikhail
    Moderator

    Hi,

    Simple Json makes a request to the GrafanaDataProvider app in a particular format. This JSON must have specified data fields. And Simple Json expects a response that have strictly specified JSON.

    Another Grafana plugin likely make request in JSON, but having other data fields.

    #7499
    OtavioF
    Participant

    Hello.

    I think I found the problem and its on the TCP port. The plugin after build generates an .exe file that, when its running, I ran the CurrPorts (software to monitor the TCP/UDP ports) and the plugin’s exe is using the TCP port 10000.

    I’ll have a look at the source code to see if I can change it without messing with the RapidScada. If I can’t find it, I’ll change RapidScada’s settings and see if it works.

    I’ll report back with news (let’s hope they’re good ones)

    #7500
    OtavioF
    Participant

    Indeed there was a conflict with the TCP ports. Now I’m able to access the Web application and there’s no error whatsoever on RapidScada.

    Now I’m trying to display the values on Grafana. Maybe now it’s the problem that you mentioned before, about request’s format to GrafanaDataProvider.

    I’ll send updates when there is any.

    #7501
    OtavioF
    Participant

    I hope flooding with updates on this matter is not against the rules of the forum. hehehe

    After changing RapidScada’s port to 10001 (which includes ScadaWeb, GrafanaDataProvider and within Administrator), Grafana is finally receiving data!

    However, it’s fetching the wrong minute .dat file.

    2020-11-05 15:45:40 Receive input channel 298 trend from SCADA-Server. File: m010101.dat

    The fetched file should be m201105.dat

    #7503
    Mikhail
    Moderator

    Hi,
    Updates are useful here.
    Do you use Visual Studio? If yes, you could debug GrafanaDataProvider and find why it gets the wrong date. I suppose, it is got from the JSON request.

    #7511
    OtavioF
    Participant

    Hi,
    I don’t have Visual Studio on this PC yet. After I install it, I’ll try to debug and will get back with updates.

    Thank you for all your help, Mikhail

    #7512
    OtavioF
    Participant

    Something to think about: I’ve tested the database with the Fake Simple Json Datasource and its working flawlessly.

    #7724
    OtavioF
    Participant

    Hello!

    Could you describe how to debug the GrafanaDataProvider on Visual Studio? I got it running on my PC, Google’d some how-to but no success.

    #7729
    Mikhail
    Moderator

    Hi,
    Compile the app in Debug configuration and copy DLL to the destination.
    Then open Debug – Attach to process – w3wp.exe

Viewing 15 posts - 1 through 15 (of 26 total)
  • You must be logged in to reply to this topic.