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 12, 2016 at 10:18 am #1539MohanadOdemaParticipant
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 ?
August 12, 2016 at 11:35 am #1540MikhailModeratorApparently 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.August 12, 2016 at 11:38 am #1541MikhailModeratorI recommend to create input channels to show current values of hour and minute variables in order to control them.
August 12, 2016 at 7:24 pm #1542MohanadOdemaParticipantI 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=0August 13, 2016 at 6:44 am #1543MikhailModeratorPlease describe how do you send command to set hour?
August 13, 2016 at 6:48 am #1544MikhailModeratorI 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?August 13, 2016 at 6:54 am #1545MikhailModeratorIs 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.
August 17, 2016 at 6:19 am #1546MohanadOdemaParticipantI 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 🙂
August 17, 2016 at 8:12 am #1547MikhailModeratorThank 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.
August 21, 2016 at 11:18 am #1553MohanadOdemaParticipantNo 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.
August 22, 2016 at 5:46 am #1556MikhailModeratorCmdVal works if you use it within a formula of output channel. The formula fires when you send a command related to the output channel.
December 5, 2020 at 9:20 am #7669hethongscada62ParticipantDear Mr.Mikhail,
Could you let me know how to install the Automatic Control module on Raspberry Pi4?
Thanks and best regardsDecember 6, 2020 at 7:15 am #7672MikhailModeratorHello,
Just copy the module files into /opt/scada/ScadaServer
Do you configure Rapid SCADA on RPi4 using Windows?December 11, 2020 at 3:10 am #7708hethongscada62ParticipantDear Mr.Mikhail,
No, I am configuring the Rapid SCADA on RPi4 using Linux.
Thanks a lotDecember 11, 2020 at 8:04 am #7710hethongscada62ParticipantDear Mr.Mikhail,
No, I am configuring the Rapid SCADA on RPi4 using Linux. How will i do?
Thanks -
AuthorPosts
- You must be logged in to reply to this topic.