manjey73

Forum Replies Created

Viewing 15 posts - 106 through 120 (of 904 total)
  • Author
    Posts
  • 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 7 months, 3 weeks ago by manjey73.
    • This reply was modified 7 months, 3 weeks 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.

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

    and if the value is 5 but you read 10, will there be an error or just zeros? and how are the events arranged? are these consistent occurrences? how will you identify them?

    in reply to: Unit prefix #16691
    manjey73
    Participant

    The division command for the input channel looks like this Cnl/1000

    in reply to: Multi-Channel Data Trigger #16685
    manjey73
    Participant

    The module does not support multi-channel like. Or no more than 2 in the 6th version. I haven’t watched it for a long time. You can create a Calculated channel for applying any scripts in which you will compare the required channels and only then apply the module to this channel.

    in reply to: Using Internal variables/channels #16676
    manjey73
    Participant

    1. ModDiffCalculator – One of the options that solves this problem.
    2. Channel 1, to save the total reading every hour EveryHour(() => Data(327))
    (Channel 327 – Total Energy from device)
    Channel 2 – EveryHour(() => Val(360) - PrevVal(360)) (Difference. Channel 360 here is Channel 1)

    There may be different approaches.

    in reply to: HourStarted() doesn’t evaluate to true #16666
    manjey73
    Participant

    As the author noted, the delay in hourly formulas can be useful, but here it is necessary to combine the minute with the hour, and this usefulness went sideways 🙂

    in reply to: HourStarted() doesn’t evaluate to true #16663
    manjey73
    Participant
    The reason turned out to be that the HourStarted formula was triggered after 30 seconds, as the hour arrived, and EveryMin was triggered at 0 seconds. The delay in the HourStarted formula is useful in some cases.
    You can update the Scripts table in the Calendar entry to make it work.:

    EveryMin(() => HourStarted() ? 0 : Val() + 1)

    These changes will be included in the project template in the next release.

    • This reply was modified 8 months ago by manjey73.
    in reply to: HourStarted() doesn’t evaluate to true #16662
    manjey73
    Participant

    HourStarted() is running with a delay. The revision of the formulas has apparently not yet been included in the release.

    HourStarted

    Use a translator if you need to understand.

    in reply to: Swapping command values #16661
    manjey73
    Participant

    if you are using an enumeration, then add your own.
    ONN: green; OFF:red
    by analogy, or any other at your discretion

    in reply to: Using Internal variables/channels #16650
    manjey73
    Participant

    SetVal(500.34) does not work, presumably because the Val() formula cannot display the channel value without a status. I also came across this. There is also the Data() formula, but I haven’t tried it yet, somehow it wasn’t necessary. It works a little differently, if I understood correctly.
    You can change the values from the range directly in the channel formula, try using the combined CheckComm formulas inside the SetVal formula as shown above.

    If you plan to use formulas inside other formulas, make it a rule to convert to double yourself, even if returning bool is enough for you. Then it becomes possible.

    in reply to: Using Internal variables/channels #16649
    manjey73
    Participant

    CheckComm – The multiplier formula
    CheckComm1 – The formula is without using a multiplier, in fact, the multiplier is 1 if you use the first one

    in reply to: Using Internal variables/channels #16648
    manjey73
    Participant
    public double CheckComm(double min, double max, double mult, string str = "" )
    {
    if (Cmd < min || Cmd > max) throw new Exception($"The value must be within {min} - {max} {str}");
    return Cmd*mult;
    }
    
    public double CheckComm1(double min, double max, string str = "" )
    {
    if (Cmd < min || Cmd > max) throw new Exception($"The value must be within {min} - {max} {str}");
    return Cmd;
    }
    

    You can also use formulas with verification to control the input parameters.
    I’ve been making universal ones for myself here.

    The method of application in the output formula of the channel

    Output channel
    CheckComm(16, 32, 10, "degrees")

    Calculated/Output
    SetVal(CnlNum, CheckComm(16, 32, 10, "degrees"))

    in reply to: Using Internal variables/channels #16647
    manjey73
    Participant

    Try different options, as different channel processing scripts are required for different tasks.

Viewing 15 posts - 106 through 120 (of 904 total)