Calculated input/output channels Forum Home › Forums › Understanding the Software › Calculated input/output channels This topic has 6 replies, 3 voices, and was last updated 1 day, 2 hours ago by oley. Viewing 7 posts - 1 through 7 (of 7 total) Author Posts September 15, 2025 at 1:09 pm #17041 oleyParticipant 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. September 15, 2025 at 2:38 pm #17042 manjey73Participant to enter the time into the channel, with the Time format, an output formula is needed. September 15, 2025 at 2:44 pm #17043 manjey73Participant 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()); } September 15, 2025 at 2:45 pm #17044 manjey73Participant A calendar should be called to enter the time and date. September 15, 2025 at 5:16 pm #17045 oleyParticipant 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? September 16, 2025 at 3:03 pm #17046 MikhailModerator Hi, It’s simple. Set the output formula to SetData() Channel type is calculated/output. September 17, 2025 at 9:30 am #17061 oleyParticipant Hi, I figured it out myself before I read the answer. Thanks! Author Posts Viewing 7 posts - 1 through 7 (of 7 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In