manjey73

Forum Replies Created

Viewing 15 posts - 751 through 765 (of 856 total)
  • Author
    Posts
  • in reply to: Modbus TCP – One Element value gives 4 Digital Inputs, #4385
    manjey73
    Participant

    GetBit (a,b)

    a – channel data number from which you want to check the required bit
    b – is the number of the bit to be checked from 0 to 64 considering that the database always has a double representation. But in fact, if you read one register, you can actually check only from 0 to 15 for example

    > 0 ? 0; 1 this entry you do the inversion if it is necessary

    Not quite boolen, all variables RapidScada converts to double, this is a feature of the database implementation. However sometimes it is a hindrance 🙂 your perception is, Yes, a boolean.

    Use C# help on MSDN

    • This reply was modified 6 years, 12 months ago by manjey73.
    • This reply was modified 6 years, 12 months ago by manjey73.
    • This reply was modified 6 years, 12 months ago by manjey73.
    in reply to: Modbus TCP – One Element value gives 4 Digital Inputs, #4381
    manjey73
    Participant

    Well, I told you why you had a mistake. You need to check how to call the formula.

    Getbit GetBit and it is a different name

    • This reply was modified 6 years, 12 months ago by manjey73.
    in reply to: Any questions about Rapid SCADA and Raspberry Pi #4376
    manjey73
    Participant

    The formula name must be entered correctly, as specified in the formula itself

    public double GetBit(double val, int n)
    {
        UInt64 uintVal = (UInt64)val;
        return (uintVal >> n) & 1;
    }

    GetBit

    And so it is necessary to write for all formulas

    • This reply was modified 6 years, 12 months ago by manjey73.
    in reply to: Decimal Places in Elastic Report #4368
    manjey73
    Participant

    D.D only for displaying numbers. The database gets the full number

    in reply to: Chart – samples on the timeline #4367
    manjey73
    Participant

    <Param name=”WriteMinPer” value=”60” descr=”Период записи минутных срезов, с” />

    See settings of this file ScadaServerSvcConfig.xml but in this way you will increase the database in size

    in reply to: Modbus TCP – One Element value gives 4 Digital Inputs, #4344
    manjey73
    Participant

    Read the channel as unsigned.
    Then add calculation channels and use the GetBit formula in them

    Read the register as HoldingRegisters and then apply the formula in virtual channels

    • This reply was modified 7 years ago by manjey73.
    in reply to: Hysteresis on input channel… #4338
    manjey73
    Participant

    Sorry, all timer formulas still need Tiсks formula to work

    public static long Ticks()
    {
    DateTime now = DateTime.Now;
    long time = now.Ticks/10000;
    return time;
    }

    Without this formula, all timers will give an error, and since the formula timers are different, but use the same calculation of the difference, the Ticks made a separate formula

    • This reply was modified 7 years ago by manjey73.
    • This reply was modified 7 years ago by manjey73.
    in reply to: Slow communication speed #4326
    manjey73
    Participant

    Yes, the register should be read once and then on the basis of the input channel of this register to apply the formula GetBit in settlement channels. You really spend a lot of time on the same type of reading.

    in reply to: Slow communication speed #4319
    manjey73
    Participant

    Then it turns out that you have everything right. 480 parameters this is clearly more than Modbus can allow with a single request. Try to separate the query groups so that the parameters you change are often in separate groups. That is to make a logical separation.

    in reply to: Slow communication speed #4317
    manjey73
    Participant

    To set the settings property is an extraordinary interview after sending the command.

    Also change the poll method to group, where possible

    in reply to: Hysteresis on input channel… #4294
    manjey73
    Participant

    In this case, you do not need a hysteresis and just a timer with a delay off. TOF with time of 20 seconds.

    int[] TofNum = new int[1];
    long[] TofST = new long[1];
    bool[] TofFlag = new bool[1];
    public double Tof(double TofIn, double TofPT)
    {
    long ET = 0L;
    long tof_pt = Convert.ToInt64(TofPT);
    bool q = Val(CnlNum) > 0;
    bool tof_in = TofIn > 0;
    
    int res = Array.IndexOf(TofNum, CnlNum);
    if (res == -1)
    {
    res = TofNum.Length;
    Array.Resize(ref TofNum,  res+1);
    Array.Resize(ref TofST,   res+1);
    Array.Resize(ref TofFlag, res+1);
    TofNum[res] = CnlNum;
    }
    
    if (tof_in)
    {
    q = true;
    TofFlag[res] = true;
    TofST[res] = 0L;
    ET = 0L;
    }
    else
    {
    if (TofFlag[res])
    {
    TofFlag[res] = false;
    TofST[res] = Ticks();
    ET = 0L;
    }
     else
     {
       if (q) ET = Ticks() - TofST[res];
     }
     if (ET >= tof_pt) q = false;
    }
    return Convert.ToDouble(q);
    }

    Add in the Formula of the Administrator

    Configure the calculated channel formula – Tof(controlled channel, 20000)

    in reply to: AB driver integration for micrologix and micro800 series #4180
    manjey73
    Participant

    C# can call functions of libraries written in C++ like. Not sure, but if I’m not mistaken, it is achieved using DllImport

    in reply to: Display and Set the String Value for tag #4113
    manjey73
    Participant

    You use a standard command, and it takes numeric values. Probably it is necessary to use a binary command and convert the string representation to hex with a formula ?Maybe that’s the reason.

    in reply to: Scada development #4100
    manjey73
    Participant

    You can, that’s how I wrote the driver to work with GPIO on Raspberry

    in reply to: ScadaSchemeEditor – Button use #4086
    manjey73
    Participant

    in WEB Main menu-Configuration-Require password when sending command

Viewing 15 posts - 751 through 765 (of 856 total)