manjey73

Forum Replies Created

Viewing 15 posts - 76 through 90 (of 974 total)
  • Author
    Posts
  • in reply to: Evento de perda de comunicação – Rapid SCADA 6.2.2 #17709
    manjey73
    Participant

    The service channel with the Status tag works only when the Communicator starts one or another driver. When polling is turned off, this channel does not work.

    Probably using the Status signal from the Communicator when the line is running. But in principle, no one prevents you from duplicating the status of the channel(s) when the server turns it into an invalid state and turns it gray (you need to see what kind of status number it becomes, but it seems to be 4)

    My solution is on an additional calculation channel with a timer.
    For example, we added input channel 110 to the Device with the Status tag code.

    I am adding an additional channel 111 – Calculated – The input formula for the TON timer

    TON(ValRel(-1), 2, Val(), "m")

    TON(IN, PT, Q, “min”) – IN – The value of the controlled channel can be explicitly specified as Val(110)
    PT – A unit of time, for example, if in minutes 2
    The Q channel for the control output, if the formula is used by itself, it is necessary to specify the current channel Val() – these difficulties appeared when I had to make two timers in one formula, more on that later
    “m” – Specifies what the units of time are s, m, h, or sec, min, hour are allowed -see the formula
    The timer index can be omitted when used in the
    channel, by default = 0. If you use multiple timers inside other functions, you can use multiple timers by adding indexes to them and assigning internal variables to them.

    The formula in the Script table

    // IEC timers and others
    public static long Ticks()
    {
    DateTime now = DateTime.Now;
    long time = now.Ticks/10000;
    return time;
    }
    
    protected class UtilTimer
    {
    public long et;
    public bool flag;
    public bool q;
    }
    
    protected Dictionary<string, UtilTimer> TonTimer = new Dictionary<string, UtilTimer>();
    
    // Timer with a delay of turning on TON
    public double TON(double IN, double PT, double Q, string str = "", int idx = 0)
    {
    var ut = new UtilTimer() {et = 0L, flag = false, q = false};
    string keys = $"{CnlNum}_{idx}"; // The key is the channel number plus the timer index, zero by default.
    
    long ET  = 0L;
    long _pt = Convert.ToInt64(PT);
    bool q   = Q > 0;
    bool _in = IN > 0;
    string s = str.ToLower();
    
    if (s == "s" || s == "sec") _pt = Convert.ToInt64(PT) * 1000;
    if (s == "m" || s == "min") _pt = Convert.ToInt64(PT) * 60000;
    if (s == "h" || s == "hour") _pt = Convert.ToInt64(PT) * 3600000;
    
    if (!TonTimer.ContainsKey(keys))
    {
        TonTimer.Add(keys, ut);
    }
    
    if (!_in)
    {
        TonTimer[keys].q = false;
        TonTimer[keys].flag = false;
        TonTimer[keys].et = 0L;
    }
    else
    {
        if (!TonTimer[keys].flag)
    {
        TonTimer[keys].flag = true;
        TonTimer[keys].et = Ticks();
    }
     else
     {
         if (!q) ET = Ticks() - TonTimer[keys].et;
     }
     if (ET >= _pt) q = true;
     TonTimer[keys].q = q;
    }
    q = TonTimer[keys].q;
    return Convert.ToDouble(q);
    }
    // Returns the channel value relative to the current channel.
    public double ValRel(int offset)
    {
      return Val(CnlNum + offset);
    }

    And now we are setting up some other actions for the channel channel with a timer.
    When using the Automatic Control Module, you can do without these formulas, but for me it is not always convenient. Moreover, I use the timer for solving other tasks.

    in reply to: Evento de perda de comunicação – Rapid SCADA 6.2.2 #17697
    manjey73
    Participant

    @isabellacog What exactly is the goal?

    for example, I make a calculation channel for the input channel of the Status Communicator and make a timer script to eliminate false alarms in case of short-term reading errors.

    You can also check some channel for status =4, if I’m not mistaken, and also make a timer to skip false alarms. Or without a timer, if the server sets this status only after a certain time.

    in reply to: Evento de perda de comunicação – Rapid SCADA 6.2.2 #17686
    manjey73
    Participant

    We need to look at the logs of the Communicator and the Server, what does it say?

    in reply to: Evento de perda de comunicação – Rapid SCADA 6.2.2 #17683
    manjey73
    Participant

    Show the channel settings with the Status tag again

    in reply to: Evento de perda de comunicação – Rapid SCADA 6.2.2 #17681
    manjey73
    Participant

    21 – Input, data type – double or empty
    Formula (script) none
    Format – Normal-Error in table Normal; Error

    in reply to: Evento de perda de comunicação – Rapid SCADA 6.2.2 #17679
    manjey73
    Participant

    Status works differently, if it returns 1, it means an error. There is a Normal-Error Format for this.

    in reply to: Evento de perda de comunicação – Rapid SCADA 6.2.2 #17669
    manjey73
    Participant

    The formula is really weird and seems useless. What exactly do you want to do with the channel data?

    in reply to: Evento de perda de comunicação – Rapid SCADA 6.2.2 #17667
    manjey73
    Participant

    Just manually create an input channel in the device with the Status tag code in the database. Channel value 0 = Normal, 1 = Error

    in reply to: Evento de perda de comunicação – Rapid SCADA 6.2.2 #17665
    manjey73
    Participant

    There is a Status service tag for devices in the Communicator. This is probably the best solution.

    in reply to: Multipule tags chart #17648
    manjey73
    Participant

    Use ChartPro

    in reply to: I can’t open or Edit Mimic Files. #17646
    manjey73
    Participant

    Use temporary keys for Mimic on the Windows development computer and that’s it. Then, when you commit the project to a Linux server where the keys are permanent, everything will work.

    manjey73
    Participant

    In the Format table, add an enumeration for your values, for example 0=Stop, 1=Start, etc.
    Stop; Start; Pause; Manual
    Then turn on the script execution in the channel and add your enumeration to the format.
    This will be a pop-up command window with 4 buttons.
    If you want to draw 4 separate buttons, then you probably have to act differently. For example, make 4 separate output channels for one command tag code and write the required value in each output formula, and indicate “Send command immediately” on the mnemonic

    in reply to: Backup strategy for distributed system #17572
    manjey73
    Participant

    on local systems, you can use rapidgate, it allows you to synchronize data like. as well as perform the download on command.

    in reply to: Scada webstation not getting open #17569
    manjey73
    Participant

    The scada core itself is free and open source. There have always been paid components that you can do without, except in some cases.

    someone installed dancing and tambourine on Winows 7. but in general, yes, it’s better to use Windows 10 or 11.

    in reply to: Dynamic text- forbid/ allow the writing/ input #17559
    manjey73
    Participant

    You can send a Double.NaN in cases where the command should not pass, or cause an exception in the command with the message that commands are failed only in manual mode.

Viewing 15 posts - 76 through 90 (of 974 total)