Automatic Control Module integration

Forum Home Forums Understanding the Software Automatic Control Module integration

Viewing 15 posts - 16 through 30 (of 38 total)
  • Author
    Posts
  • #1539
    MohanadOdema
    Participant

    I figured it out! Apparently the calculated channel data never appears correctly in the Scada Comm device data which I was using to check the data changes. It only appears in Scada Web. Thanks.

    I think for comparing with the parameters of the output channel. The formula for the input channel should be something like this.

    double CheckTotalTime(int hour, int minute)
    {
    DateTime nowDT = DateTime.Now;
    if ((nowDT.Hour == hour) && (nowDT.Minute == minute))
    return 1;
    else
    return 0;
    }

    Now how can I send the hour and minute parameters from the output channel to my flag channel ?

    #1540
    Mikhail
    Moderator

    Apparently the calculated channel data never appears correctly in the Scada Comm device data which I was using to check the data changes. It only appears in Scada Web.

    Definitely 🙂

    Now how can I send the hour and minute parameters from the output channel to my flag channel ?

    Add the variables into Formulas table:

    int hour = 0;
    int minute = 0;
    

    Add the code into Formulas table:

    double SetHour()
    {
      hour = (int)CmdVal;
      return double.NaN;
    }
    

    Use the above formula for an output channel.
    Note: I don’t test code which I write in this forum. It’s just a direction for experiments.

    #1541
    Mikhail
    Moderator

    I recommend to create input channels to show current values of hour and minute variables in order to control them.

    #1542
    MohanadOdema
    Participant

    I created an input channel and wrote in its formula ‘hour’. I created another input channel to display the CmdVal of the output channel which uses SetHour().

    However, the variable hour is never assigned the CmdVal. It sticks with the initial value that I used to define it.

    Something is not allowing the variables to be overwritten with the CmdVal. SetHour() function is written exactly like you stated.

    https://www.dropbox.com/s/r153hva9vfi6o0m/F1.png?dl=0
    https://www.dropbox.com/s/l1kvpukurjmtdj8/F2.png?dl=0
    https://www.dropbox.com/s/5ln5pt0cksfjosd/F3.png?dl=0
    https://www.dropbox.com/s/gjn5f7huzh1s1wk/F4.png?dl=0

    #1543
    Mikhail
    Moderator

    Please describe how do you send command to set hour?

    #1544
    Mikhail
    Moderator

    I created another input channel to display the CmdVal of the output channel which uses SetHour().

    What is the number of that channel on the screenshots?
    How do you expect to behave for input channels 61, 62? Are they received from your device?

    #1545
    Mikhail
    Moderator

    Is is possible to write variables to log.
    Add formula:

    void WriteToLog(string s)
    {
      using (System.IO.StreamWriter writer = 
        new System.IO.StreamWriter(@"C:\SCADA\mylog.log", true, Encoding.UTF8))
      {
        writer.WriteLine(s);
      }
    }
    

    Then you can use WriteToLog(hour.ToString()) within other formulas.

    #1546
    MohanadOdema
    Participant

    I fixed it. The problem was with this line hour = (int)CmdVal;

    The variable is never assigned the CmdVal.
    However, I displayed the output channel in a new input channel and added this formula to the input channel;

    Double assign ()
    {hour = (int)Cnl;
    return Cnl;}

    Thanks Mikhail for your help 🙂

    #1547
    Mikhail
    Moderator

    Thank you for the info ))
    Did you use the formula with CmdVal in OUTPUT channel?
    How do you set a new value from UI?

    • This reply was modified 7 years, 8 months ago by Mikhail.
    #1553
    MohanadOdema
    Participant

    No I did not use any formulas for the output channels. They already change the values of the input channels whom on which I added the previous formula.

    I added two dynamic texts one for minutes and the other for hours. I added the action send command for each and Each one is mapped to the correspondent output and input channels.

    #1556
    Mikhail
    Moderator

    CmdVal works if you use it within a formula of output channel. The formula fires when you send a command related to the output channel.

    #7669
    hethongscada62
    Participant

    Dear Mr.Mikhail,
    Could you let me know how to install the Automatic Control module on Raspberry Pi4?
    Thanks and best regards

    #7672
    Mikhail
    Moderator

    Hello,

    Just copy the module files into /opt/scada/ScadaServer
    Do you configure Rapid SCADA on RPi4 using Windows?

    #7708
    hethongscada62
    Participant

    Dear Mr.Mikhail,
    No, I am configuring the Rapid SCADA on RPi4 using Linux.
    Thanks a lot

    #7710
    hethongscada62
    Participant

    Dear Mr.Mikhail,
    No, I am configuring the Rapid SCADA on RPi4 using Linux. How will i do?
    Thanks

Viewing 15 posts - 16 through 30 (of 38 total)
  • You must be logged in to reply to this topic.