manjey73

Forum Replies Created

Viewing 15 posts - 46 through 60 (of 856 total)
  • Author
    Posts
  • manjey73
    Participant

    return (Timestamp.Minute >= 0 && Timestamp.Minute < 6) && (……)

    manjey73
    Participant

    The time has a Minutes parameter, so you can check for >=0 && <=30 in the script.
    and in addition to checking the required hour.

    manjey73
    Participant

    There are scripts that perform functions every hour. For example, returning a value to the channel EveryHour(() => Val(101))
    Here, the channel in which you wrote this script returns the value from channel 101.

    Instead of Val(101) maybe your function will check the hour value of 6,8, 10, and so on and return the desired value if it matches.

    You can also use a time trigger in Auto Control Module

    manjey73
    Participant

    Add it to the script table.
    In the Calculated channel, write the input formula CheckHour(8, 20)

    manjey73
    Participant
    public double CheckHour(int hourLow, int hourHigh)
    {
    bool res = false;
    if(DateTime.Now.Hour >= hourLow && DateTime.Now.Hour < hourHigh) res = true;
    return Convert.ToDouble(res);
    }

    I specifically convert to double and apply public double so that I can apply the script inside another script.

    Instead of DateTime.Now you can apply DateTime.UtcNow on the situation. You can also remove the hourLow and High ads and specify the required hours instead. But it looks more versatile this way.
    I haven’t checked it in action.

    manjey73
    Participant

    It seems to me that you need to do all this inside some kind of script with the return of the value through return.

    public bool MyFunc()
    {
    bool res = false;
    if(hour() >= 8 && hour() < 20) res = true;
    return res;
    }

    And what exactly is hour() here?

    • This reply was modified 2 months ago by manjey73.
    manjey73
    Participant

    if(hour() >= 8 && hour() < 20) – That’s right, but what comes next is completely incomprehensible to the language. , 1, 0)

    What did you want to get with your record? an analog ? 1:0 ???

    in reply to: Auto Control Module Configuration Errors #16746
    manjey73
    Participant

    It seems to be easy to switch between these versions by simply copying files without affecting the Config folder (I do this). And updating all modules and other relevant ones.

    I recommend 6.4.1 – now there is no need to create your own windows to display the PC code, and you can use a regular window with your own PC code file and your own links in the registration window 🙂

    in reply to: Auto Control Module Configuration Errors #16745
    manjey73
    Participant

    Rapid SCADA 6.2.0 (27.01.2024)
    Server 6.2.0.0

    Apparently, your Scada version is still 6.2.0

    in reply to: Auto Control Module Configuration Errors #16744
    manjey73
    Participant

    There was a similar error when switching from version 6.3.X to 6.4.x, or even when switching to 6.3.X, some methods changed there. And it’s possible that your module version doesn’t match the kernel version.
    Check the version history in the documentation

    in reply to: Installation errors #16743
    manjey73
    Participant

    NetFramework 4.8 and Dotnet 8 are different systems.
    You need to install two components from dotnet 8 according to the installation description.
    Current version 8.0.18

    https://dotnet.microsoft.com/en-us/download/dotnet/8.0

    Hosting Bundle and .NET Desktop Runtime 8.0.18

    in reply to: Installation errors #16738
    manjey73
    Participant

    What errors are indicated during installation?

    in reply to: Register reading with Modbus TCP #16724
    manjey73
    Participant

    Well, use Modpoll as shown in the device documentation. If he answers, try to compare why he is not responding in scada.

    Also try to read just one element with the command 02
    Also check the InputRegisters reading.

    • This reply was modified 2 months, 1 week ago by manjey73.
    • This reply was modified 2 months, 1 week ago by manjey73.
    in reply to: Register reading with Modbus TCP #16722
    manjey73
    Participant

    Judging by the images from the Modpoll configuration documentation, everything seems to be the same, but your device simply does not respond to one of the commands.
    Perhaps the manufacturer changed something in the new version and did not update the documentation.
    If this command was supported, but you got the wrong address, the device would give an error response. Try polling one register from 0 using Holding Registers

    in reply to: Reading event log from modbus device #16718
    manjey73
    Participant

    Another example of event generation from the driver

    You probably need to make a derived driver for events from the device. Connect the DrvModbus driver as required. As a channel, make something like an indicator of the presence of an event to save the time of occurrence in the database. Maybe an event counter.
    If the events that have occurred are sequentially arranged in the event buffer, and their sequence may be different, this is probably the best option. Creating a list of events should probably be done through for(foreach) and selecting them from the list of possible ones.

Viewing 15 posts - 46 through 60 (of 856 total)