execute some external app from the web interface

Forum Home Forums Understanding the Software execute some external app from the web interface

Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #15870
    fischerp
    Participant

    Hello,
    I would like to call the function contained in Utility Pack 6.0 for creating a CSV file (CsvExport.exe) from the UI. Is this possible? Possibly even in such a way that the file name, time period and channel number are transferred directly when the function is called?

    #15871
    manjey73
    Participant
    #15872
    fischerp
    Participant

    Thank you for your answer, unfortunately I can’t do much with it because I don’t speak Russian.
    Obviously I need to embed the code that Mikhail shows in the linked post somewhere. Is that correct?
    Where?
    And how do I then access the function?

    #15873
    manjey73
    Participant

    There are always online translators, which we use successfully, I also don’t know English well 🙂

    #15874
    manjey73
    Participant

    online translation

    You can add Scripts to the table

    public double StartProcess()
    {
      Process.Start(@"C:\SCADA\1.bat");
      Console.WriteLine(DateTime.UtcNow.ToString());
      return 1.0;
    }

    and call this function in the output formula of the channel.
    Starting an external process is an unsafe action.

    #15875
    manjey73
    Participant

    translation of the readme for the module

    Extension for launching external applications from RapidScada v.6.2.1.1

    ModAbcLogicConfig.xml – a file for configuring the extension.
    – AppObject – Settings for launching the application (each application has its own settings).
    – – Input Channel – The channel number in Scada. The extension reads the value in the channel (it should be 0 or 1), 0 – does nothing, 1 -launches the application.

    #15882
    Mikhail
    Moderator

    Hello,
    The general algorithm is as follows:
    1. Send a command via the web interface.
    2. In a channel, use an output formula that executes a script.
    3. As shown above, the channel’s output formula should run a command like Process.Start(@"C:\SCADA\1.bat");

    Ask for more details if needed.

    #15883
    Mikhail
    Moderator

    Note that executing external scripts is not secure. They can hang, or can be modified by an intruder. It’s better to interact with other services via API or industrial protocols.

    #16857
    Anonymous
    Inactive

    Thank you very much for info!

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