manjey73

Forum Replies Created

Viewing 15 posts - 601 through 615 (of 856 total)
  • Author
    Posts
  • in reply to: Write multiple modbus register FC=16 #8050
    manjey73
    Participant

    Some devices may not respond if no ID is specified, even over TCP

    in reply to: Internal server error (500) #8045
    manjey73
    Participant

    https or not to https, that is the question?
    🙂

    in reply to: Get data from excel into DAT files #8041
    manjey73
    Participant

    If you create the parameter in the same way as you checked this example, the file will be created ? If yes, try using the API

    in reply to: Write multiple modbus register FC=16 #8040
    manjey73
    Participant

    00 Unit identifier 0x00 (0)

    Specify in the database, in addition to the IP address, also the address for the RTU mode, if the device has the ability to poll on the 485 interface or just 1

    in reply to: Get data from excel into DAT files #8029
    manjey73
    Participant

    Mikhail promised to implement this in the next version of Scada. Now you can try using Grafana for these purposes

    in reply to: Get data from excel into DAT files #8022
    manjey73
    Participant

    Status write “2”

    in reply to: Entering Data Into A Table #8006
    manjey73
    Participant

    https://imgbb.com/upload

    BB-Code full and paste IMG

    in reply to: ScadaAdmin on Linux #8003
    manjey73
    Participant

    I installed rapidscada on a Debian 10 VPS server with a public IP address

    Some remote objects are also connected to this server with the installed Communicator via 4G networks

    On the server, raise l2tp/IPsec
    packages – strongswan (ipsec) and xl2tp

    The remote communicator transmits data to the Scada server and at the same time has an IP address in the VPN network. By connecting to the server as an l2tp client from a Windows PC you can access remote communicators both via SSH and to download projects

    I use a Raspberry Pi (Zero) for remote Communicators and can prepare an image with version 5.8.2 by spending a little time over the weekend deleting my server’s keys and passwords. Would you be interested ?

    in reply to: Entering Data Into A Table #7983
    manjey73
    Participant

    output channel – SetVal(43,Cmd)
    input channel 43 – Val(43) and in table “output channel” set 43, channel is Calculated

    in reply to: Transfer File from Computer to Rpi #7928
    manjey73
    Participant

    Only for the initial installation and migration of driver libraries, for example. Edit the Instance name and key for the Agent. Otherwise, the project is transferred using the Agent from Windows to Linux without problems.

    WinSCP and SSH connection are enough to copy and install files.

    in reply to: Continuing a calcuation after restart ? #7920
    manjey73
    Participant

    I do not know how advanced it is, it is better of course to use third-party applications for organizing RAM disk, which independently saves data to disk. Unlike tmpfs, as there are some limitations.

    For example var stuffed into tmpfs does not allow xrdp to run

    in reply to: Continuing a calcuation after restart ? #7917
    manjey73
    Participant

    1st input channel use the formula – LoadRet()

    Channels that require saving – Retain(Val(43))
    Retain(here there can be a formula that returns necessarily double)

    In the last channel, the formula – SaveRet()
    65535 use the formula – SaveRet()

    Any solution can lose value during a hard reboot, but if the variables do not change often, then you can use different options.

    • This reply was modified 4 years, 9 months ago by manjey73.
    in reply to: Continuing a calcuation after restart ? #7916
    manjey73
    Participant

    Retain Formula for writing a variable to a file retain.txt

    string pathRet = @"/opt/scada/ScadaServer/Config/retain.txt";
    Dictionary<int, double> DictRet = new Dictionary<int, double>();
    public double Retain (double ret)
    {
    DictRet[CnlNum] = ret;
    return ret;
    }

    Example of applying the formula in the input channel database. Retain(Val(150))
    The control channel can contain setval(150, Cmd)

    The lowest input channel uses the load_retain formula
    Recording in the loadret channel()

    bool initRet = false;
    double LoadRet()
    {
    if (!initRet)
    {
    
    if (System.IO.File.Exists(pathRet))
    {
    string[] RetLoad = System.IO.File.ReadAllLines(pathRet, Encoding.UTF8);
    for (int i = 0; i < RetLoad.Length; i++)
    {
    SetVal(Convert.ToInt32(RetLoad[i].Substring(RetLoad[i].IndexOf("[")+1, RetLoad[i].IndexOf(", ")-(RetLoad[i].IndexOf("[")+1)),10),Convert.ToDouble(RetLoad[i].Substring(RetLoad[i].IndexOf(", ")+2,RetLoad[i].IndexOf("]")-(RetLoad[i].IndexOf(", ")+2))));
    }
    initRet = true;
    }
    
    }
    return Convert.ToDouble(initRet);
    }

    Executed once at server startup

    The most recent channel uses the save_retain formula
    Entry in the saveret channel formula()

    double SaveRet()
    {
    string[] RetSave = new string[DictRet.Count];
    bool eq = false;
    for (int i = 0; i < DictRet.Count; i++)
    {
    RetSave[i] = Convert.ToString(System.Linq.Enumerable.ElementAt(DictRet, i));
    }
    
    if (!System.IO.File.Exists(pathRet))
    {
    System.IO.File.WriteAllLines(pathRet, RetSave, Encoding.UTF8);
    return 0;
    }
    else
    {
    string[] RetOld = System.IO.File.ReadAllLines(pathRet, Encoding.UTF8);
    eq = System.Linq.Enumerable.SequenceEqual(RetOld, RetSave);
    if (!eq)
    {
    System.IO.File.WriteAllLines(pathRet, RetSave, Encoding.UTF8);
    }
    }
    return Convert.ToDouble(eq);
    }

    The path to Raspberry specify your own in the first formula.
    An example file retain.txt

    [450, 23]
    [451, 51]
    [452, 51,5]
    [453, 46]

    The first digit is the channel number, the second is the channel value.
    The file is written when the variable specified as Retain is changed.
    You can also initialize the necessary variables when starting the server.

    For changing variables in the process of work, but which need to be saved, it is better to add probably another timer and record no more than x minutes. I think so.
    For configuration variables that rarely change, you can use as-is.

    in reply to: Continuing a calcuation after restart ? #7914
    manjey73
    Participant

    On Raspberry, I used formulas to save and read channel data to a file. Since the values fall into RAM (tmpfs)

    in reply to: modbus data after restart scada (historian trends) #7884
    manjey73
    Participant

    Насколько знаю, это доступно только пользовательским командам протокола, которых нет в драйвере. Так что не совсем ясен сам вопрос ?
    з.ы. а почему на английском сайте ?

Viewing 15 posts - 601 through 615 (of 856 total)