Automatic Control Module integration

Forum Home Forums Understanding the Software Automatic Control Module integration

Viewing 15 posts - 1 through 15 (of 38 total)
  • Author
    Posts
  • #1518
    MohanadOdema
    Participant

    Hello,

    I want to ask about something concerning the automatic control module;

    Is there any possible way to import the trigger parameters into the scheme which I designed for my web page ?

    #1519
    Mikhail
    Moderator

    Hello,

    Please describe your task in details. Why do you need it?

    #1520
    MohanadOdema
    Participant

    I have a time trigger for a certain command. I want to be able to change the time settings for this trigger from my Scada web page on a browser directly without the need to access the control module from the Scada Server.

    #1521
    Mikhail
    Moderator

    In this case you should use another approach:
    Create an input channel as a flag and check time in the channel’s formula. Then create a trigger that fires on the flag value.
    To change the timer counter according to a command you need an output channel.

    #1522
    MohanadOdema
    Participant

    I’m not sure I understood that correctly. Does this flag value represent if the checked time is equal to the real time of my machine ?

    I created the channel but how can I check time in a channel’s formula ?

    #1523
    Mikhail
    Moderator

    Do you need a special time for sending command or just a period of doing it?
    How accurately you need to define a time? Is it enough to set hour only or hour and minutes?

    #1524
    Mikhail
    Moderator

    In formulas you can use DateTime and TimeSpan

    #1525
    Mikhail
    Moderator

    The simple formula example:

    double CheckTime()
    {
      DateTime nowDT = DateTime.Now;
      return nowDT.Hour == 1 && nowDT.Minute == 0 ? 1 : 0;
    }
    
    #1526
    MohanadOdema
    Participant

    For now I need a special time for sending the coomands.

    In my design I want for example at 3:15 open relay switch and 3:30 close relay switch.

    And later if I access my scada site I could cchange those times completely.

    #1527
    MohanadOdema
    Participant

    I’m sorry but I’m feeling lost with using the formulas. Am I supposed to enter the entire function you stated in the formula space as shown in the screenshot ?

    https://www.dropbox.com/s/lh7os44udvtlfuj/formula.png?dl=0

    #1528
    Mikhail
    Moderator

    I mean that you should enter the whole CheckTime() function in Formulas table. Then enter just CheckTime() in Input channels table.

    #1529
    MohanadOdema
    Participant

    That flag channel does not rise to one after several attempts from the code you gave me and even after changing the code and time multiple times.
    double CheckTime()
    {
    DateTime nowDT = DateTime.Now;
    if (nowDT.Hour==15 && nowDT.Minute==30)
    {return 1;}
    else
    {return 0;}
    }

    https://www.dropbox.com/s/su5wakulwacswzs/T1.png?dl=0

    I dont know where the problem is and I still don’t know how I’m going to link the output channel to set the hour and minute values to those in the input channel.

    #1531
    Mikhail
    Moderator

    I didn’t write: you have to change channel type to Calculated real.

    #1537
    MohanadOdema
    Participant

    Even after I changed the channel type to calculated real, the channel value never becomes 1. I’ve tried a lot of approaches for the code and different types for the return variable and still nothing happened.

    I even tried to use the existing function HourBeg() to see if it would return 1 at the beginning of an hour and it didn’t. I don’t know why none of the functions returns 1.

    #1538
    Mikhail
    Moderator

    It’s strange. Did you pass the changes to Server and restart Server service?
    Try simplifying the formula of an input channel.
    First of all, try the formula: 1
    Then try: DateTime.Now.Minute

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