manjey73

Forum Replies Created

Viewing 15 posts - 286 through 300 (of 974 total)
  • Author
    Posts
  • in reply to: InitScripts() use #15914
    manjey73
    Participant

    If you look at CalcEngine.cs, then InitScripts() goes first and only then SetData.
    When the server is started, this code is compiled every time.
    Using SetData inside Initscripts, do you encounter any errors?

    in reply to: InitScripts() use #15913
    manjey73
    Participant

    Perhaps InitScripts() is intended for other things. And at this point, formulas like setData may not be valid yet.

    in reply to: InitScripts() use #15912
    manjey73
    Participant

    Explain for which types of channels do you want to set the values to 0 when the server starts?

    Show the settings of these channels

    in reply to: Formul #15910
    manjey73
    Participant

    Commas are most likely a number separator display format related to the OS regional settings.

    in reply to: Formul #15907
    manjey73
    Participant

    If this is the input channel from the device, you need to use Cnl/10

    Cnl, CnlVal double Channel value transmitted to Server before the calculation

    Script documentation

    in reply to: InitScripts() use #15904
    manjey73
    Participant

    I may be wrong, but it seems enough to specify Val() in the input formula and SetVal(CnlNum, Cmd) in the output, and when the Server starts, the channel will be 0.0, and after entering your value

    For Calculated/Output channels

    • This reply was modified 1 year, 8 months ago by manjey73.
    in reply to: InitScripts() use #15894
    manjey73
    Participant
    // Set the default setpoint value.  
    // For channels of the Calculated/output type
    public CnlData GetDefaultData(double val)
    {
      return Stat() > 0 ? Data() : NewData(val, 1);
    }
    
    // For a channel with the Integer data type 
    public CnlData GetDefaultDataInt(long val)
    {
      return Stat() > 0 ? Data() : NewData(BitConverter.Int64BitsToDouble(val), 1);
    }

    If I understood correctly, you want to initialize some variables.
    Here are the formulas that Mikhail once proposed.

    Formulas are used in the Input. GetDefaultData(1)
    SetVal(CnlNum, Cmd) is used for the output formulas

    • This reply was modified 1 year, 8 months ago by manjey73.
    in reply to: execute some external app from the web interface #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.

    in reply to: execute some external app from the web interface #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.

    in reply to: execute some external app from the web interface #15873
    manjey73
    Participant

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

    in reply to: execute some external app from the web interface #15871
    manjey73
    Participant
    manjey73
    Participant

    Couldn’t fit in one directory 🙂

    in reply to: Modbus TCP Device ID #15826
    manjey73
    Participant

    Addressing – start with 0 or 1
    It is possible to specify byte permutation for 4 and 8 byte data

    in reply to: New Scheduler Module V6.0.0.0 #15814
    manjey73
    Participant

    I’m talking about the presentation table, two channels with the same tag code name are not displayed
    there 🙂

    And there is no need to talk about the channel, which is an output channel and has its own unique tag code.

    in reply to: modbus device communication error #15812
    manjey73
    Participant

    You can probably create a calculated channel with the right length to accommodate your message. Specify it as Format = String.
    Specify that these channels are not saved in the database, so as not to waste space. And write a script that will write a line with your message into this channel when the signal = 1 is in the form of an ascii or unicode string.

    You can also add new enumeration text in auxiliary tables – formats. For example, for each device that you will have. It will most likely be

    it seems there are educational videos on youtube. There is also a Documentation section on the website.

    • This reply was modified 1 year, 8 months ago by manjey73.
Viewing 15 posts - 286 through 300 (of 974 total)