Forum Home › Forums › Understanding the Software › Automatic Control Module integration
- This topic has 37 replies, 3 voices, and was last updated 3 years, 4 months ago by hethongscada62.
-
AuthorPosts
-
August 8, 2016 at 11:42 am #1518MohanadOdemaParticipant
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 ?
August 8, 2016 at 1:13 pm #1519MikhailModeratorHello,
Please describe your task in details. Why do you need it?
August 8, 2016 at 1:21 pm #1520MohanadOdemaParticipantI 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.
August 8, 2016 at 3:05 pm #1521MikhailModeratorIn 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.August 8, 2016 at 4:06 pm #1522MohanadOdemaParticipantI’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 ?
August 8, 2016 at 5:29 pm #1523MikhailModeratorDo 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?August 8, 2016 at 5:31 pm #1524August 8, 2016 at 5:34 pm #1525MikhailModeratorThe simple formula example:
double CheckTime() { DateTime nowDT = DateTime.Now; return nowDT.Hour == 1 && nowDT.Minute == 0 ? 1 : 0; }
August 8, 2016 at 6:15 pm #1526MohanadOdemaParticipantFor 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.
August 8, 2016 at 9:26 pm #1527MohanadOdemaParticipantI’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 ?
August 9, 2016 at 8:11 am #1528MikhailModeratorI mean that you should enter the whole CheckTime() function in Formulas table. Then enter just CheckTime() in Input channels table.
August 9, 2016 at 1:39 pm #1529MohanadOdemaParticipantThat 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.
August 11, 2016 at 8:16 am #1531MikhailModeratorI didn’t write: you have to change channel type to Calculated real.
August 11, 2016 at 7:08 pm #1537MohanadOdemaParticipantEven 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.
August 12, 2016 at 8:09 am #1538MikhailModeratorIt’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 -
AuthorPosts
- You must be logged in to reply to this topic.