Calculated input/output channels

Forum Home Forums Understanding the Software Calculated input/output channels

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #17041
    oley
    Participant

    Hi,

    I need a control algorithm based on data:
    – beginPeriod : DateTime
    – endPeriod : DateTime
    – value : double

    The user should be able to set those three channels and based on the values automatic control module should set another physical device channel.

    I have created (DataType:double, Format:DataTime) calculated/output channel, which I can modify from the view, but it does not store this value.

    #17042
    manjey73
    Participant

    to enter the time into the channel, with the Time format, an output formula is needed.

    #17043
    manjey73
    Participant

    Output script GetStrDtToUtc(CmdDataStr) the format of the command “Date and Time”
    Input script Val() the format “Date and Time”

    in table script

    public double GetStrDtToUtc(string dt)
    {
    SetVal(CnlNum, EncodeDate(DateTime.Parse(dt).ToUniversalTime()));
    return EncodeDate(DateTime.Parse(dt).ToUniversalTime());
    }
    #17044
    manjey73
    Participant

    A calendar should be called to enter the time and date.

    #17045
    oley
    Participant

    Hi,

    thank you, it works.
    Another question: how to setup channel, which will be an Off-On and use it with toggle and led on a scheme view?

    #17046
    Mikhail
    Moderator

    Hi,
    It’s simple.
    Set the output formula to SetData()
    Channel type is calculated/output.

    #17061
    oley
    Participant

    Hi,

    I figured it out myself before I read the answer. Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.