Forum Replies Created
-
AuthorPosts
-
JW
ParticipantArchitecture of my latest approach is listed below, which seems working. the configuration should be less complicated than the approach mentioned in previous replies.
---Nginx:80 | ---Nginx:443---apache2-scada:8080
Note: because embedding http content in iframe (such as External URL on Interface, or Dashboard) of https site will not work, so I redirect all http request to https. the site becomes https only. The content being embedded need to be changed to https too.
I only tested demo project will a few different External URL on interface at the moment.
I will make a procedure in detail and update here later. (Friday night or weekend)
JW
Participantby enabling ssl of apache2 itself, the https site show error msg of
error updating current/hourly data
Is it the Mono-WCF bug stopping scada with apache2 https?Why would we need Nginx + Mono FastCGI?
Apache2:80--->apache2-scada:80 | Apache2:443--->Nignx:8008---fastcgi:9000-----apache2-scada:80
I am thinking about the following method, is there any obstacle or bug stopping it from working? I will have a try and update my result here.
Nginx:80--->apache2-scada:8080 | Nginx:443--->apache2-scada:8080
JW
ParticipantCase 5 : -20,None,None,20
when val is -1, the channel stat will become 12 and color will turn light blue.
no event (correct, as it should)In future version, if some limit is not set, not just the related event not appear, the related stat should not appear, considering other channel may use, is it?
case like this, there should be only stat of 11,13,15.
JW
Participantusing kumajaya’s nginx fastcgi method, the demo project works well.
I am testing more complicated projects currently.
The first issue I encounter URL in Interface table not working properly. (something like the grafana integration)I tested 2 URL format:
– scadaserverip:5000/example (other web running on the same scada server)
– other.example.comthey can be loaded correctly when I open browser on server. but when i open browser on other clients, the content frame can’t load the URL page.
Is it because of the scadasweb or fastcgi or just the proxy setting?
JW
ParticipantUsually I need to provide a server machine and a GUI client machine to the customer. The customer will run the webpage of scada 24*7 on the client I provided, and occasionally on their own computer.
For some project, I used a server with GUI to simplify hardware setup and save cost.
It did cause some problems. Lesson learned. I think I will switch back to separated server + GUI Client setup for upcoming projects.
For GUI client, Windows pc maybe better option at the moment. When upload project can be done from Linux client, then I can switch to Linux GUI client.
JW
ParticipantThanks Mikhail, the problem is solved. the formula below can keep the result until n consecutive errors.
public Dictionary<int, int> ChannelErrors = new Dictionary<int, int>(); double NStepVal(int n) { if (!(ChannelErrors.ContainsKey(CnlNum))) {ChannelErrors[CnlNum] = 0;} if (CnlStat == 0) { if (ChannelErrors[CnlNum] >= n) {return double.NaN;} else {return Val();} } else {return CnlVal;} } int NStepStat(int n) { if (!(ChannelErrors.ContainsKey(CnlNum))) {ChannelErrors[CnlNum] = 0;} if (CnlStat == 0) { if (ChannelErrors[CnlNum] >= n) {ChannelErrors[CnlNum] = 0; return 0;} else {ChannelErrors[CnlNum] = ChannelErrors[CnlNum] +1; return 1;} } else {ChannelErrors[CnlNum] = 0; return CnlStat;} }
JW
ParticipantIn administrator – Instances – Server – Saving parameters, you can choose the save interval for minute data.
The options available options can be as low as per 30s.
in the project folder, you edit the following file,
Instances/Default/ScadaServer/Config/ScadaServerSvcConfig.xml
change the following line<Param name=”WriteMinPer” value=”60″ descr=”Minute data writing period, sec” />
fill in value=”1″.
It will save data in ArchiveDAT/Min folder per 1 second on my test.
But be very careful, I am not sure if there will be any negative impact.
I suspect it can slow down or even crash the server when you download minute report or plot chars.JW
ParticipantYou can easily start and stop services by *.sh files that are already in the scada directory and subdirectories.
Talking about download and upload, do you mean performing this actions locally on the target server or remotely?Adding a CLI command/scripts that can upload project locally would be very helpful. then I can make a local GUI/CLI utilizing those scripts.
I suppose, it’s possible to develop a web plugin to do all of these functions. Especially for start, stop and upload.
This would be even better.
For some project that server and sensor are in a LAN without public WAN IP / NAT, end user can monitor SCADA in LAN, but I will need to use TeamViewer remote desktop to provide support if needed. The operation on TeamViewer is more like local operation instead of remote operation.
(at some extreme case, the customer doesn’t not allow physical access nor remote access. I have to send they the project file and instruct them how to upload it. Uploading via mono ScadaAdmin.exe is usable, but can be success / fail very randomly. which may look very weird to the customer.)
JW
ParticipantThanks manjey73 for your help. I actually did similar things on one project a while ago with pi 3. So the image is not needed. When the server has public IP, things are simpler.
But when the server has no public IP, e.g. on 4G or inside Lan but not NAT, it become not convenient, unless I set another VNP server on cloud.
JW
ParticipantHi Mikhail,
I did 3 tests listed below.
Currently, when lower/upper alarm limit is set, no matter what previous stat it was (including unreliable and undefine state), as long as it goes into normal stat, it will trigger a normal event.
I though there were 2 set of separated alarm logic, but don’t know where does unreliable falls into.
– Event on limit: stat 11/12/13/14/15
– Event on undefine: 0/1 / (5?)But seems actually they are somewhat related.
1.
Write Event + Event on Undefined + Lower + Upper Alarm Limit
normal status, unreliable status, undefined status, normal status
there are:
– Undefined event when changed from unreliable to undefined;
– Normal event when changed from undefined to normal
https://drive.google.com/file/d/1DaZV7JnzTr0qfDgxGLfRBrs5YH25rmlz/view?usp=sharing2.
Write Event + Event on Undefined + Lower + Upper Alarm Limit
normal status, unreliable status, normal status
there is:
– Normal event when changed from unreliable to normal
https://drive.google.com/file/d/1kYIYr07C0QjAZkhsf3iOQbPMWJaSlyD5/view?usp=sharing3.
Write Event + Event on Undefined
normal status, unreliable status, normal status
there is:
– No event
https://drive.google.com/file/d/1pm_0ebgHjRSWiU_L25jLD2YnuQCaECiz/view?usp=sharingJW
ParticipantHi Mikhail,
I made a formula using your approach, which worked for reducing the chance of false Undefined Event.
But it has a Normal Event when from “Unreliable” to “Normal”. is there any way not to trigger the normal event?
One way I can think of is to
1. set one channel n1 using 2step value and stat
2. set another channel n2 using Val(n1)
but it’s not convenient to do this if I have lot’s of sensordouble TwoStepVal()
{
if (CnlStat == 0)
{
if (Stat() == 5 || Stat() == 0) { return double.NaN;}
else {return Val();}
}
else {return CnlVal;}
}int TwoStepStat()
{
if (CnlStat == 0)
{
if (Stat() == 5 || Stat() == 0) { return 0;}
else {return 5;}
}
else {return CnlStat;}
}JW
ParticipantThis question is originated from the challenge of remote support for some project. Here are some of my experience and consideration. Hope it can provide some info for you to consider what to do with the ScadaAdmin on Linux in the future development.
For project installation, we usually need to provide HMI/GUI hardware (client pc, monitor…). For some project, we provide remote support with 4G mobile network + Teamviewer (because normal 4g sim doesn’t provide fixed public IP).
For the server setup and remote support, I tried the following options. Each of them have pros and corns, I haven’t decide which one to use for future projects.
Linux server with GUI
This will save cost and simplified installation. Linux server is easier to manger than windows server.
But when I need to remote update the project, I have to connect with teamviewer, send the updated project file, then use the not full functioning ScadaAdmin on linux.
User GUI operation may affect the server.Window server
This solve the no problem updating scada.
But sometimes the windows server is not as convenient to manage, if I need to run other service along with SCADA.
User GUI operation may affect the server.Linux server + Windows Client
Easy to manage server and no problem updating scada.
User GUI operation will not affect the server.
More hardware and higher cost.Recently, I tried 4G simcard with fixed public IP, which enables me to upload scada project to the server directly from my PC from any where (and other benefits such as SSH/VNH…), no matter what server setup I am using.
The fixed public IP plan can be very expensive.
At some remote locations, maybe only 1 ISP have good mobile signal, but that ISP doesn’t provide fixed public IP plan.In summary,
Editing projects on Linux is not necessary and should be avoided.
While Start/Stop of server/communicator and Download/Upload project file, via command line / GUI would be useful.JW
ParticipantHave you thought about splitting the template? It would make a polling session shorter. Short template is better in case of communication errors, because it’s don’t needed to request 49 groups again if the 50th group is failed.
requesting 30 groups (50 signal/group) works fine most of the time and takes less than 0.1s, since the communication is from localhost(scada) to localhost(another software on same server).
The main issue I am facing is that, if I enabled Event on Undefined for those sensors, there will be Events / Alarms of undefined channel (disconnected sensor), and Event of resumed normal within next request.
JW
ParticipantWhen I try to set delay to 20 or 50ms, it become even worse. it can never finish a complete request cycle of 50 element groups.
This is strange. Delay just does Thread.Sleep(50) after receiving an answer from a device.
I try this setting again, but it works fine today. And I can’t reproduce the problem. it maybe not the cause.
JW
ParticipantI am thinking about the following parameters.
number of request retry on error: 3
Currently, scada comm retry with in the same TCP connection.
when reply from request is mis-aligned, retrying seems meaning less, because the header will never match again. then after 3 times, it set the element groups as undefined, then restart a new TCP session. the comm resumed normal on new TCP connection. but a false alarm already trigged.
thus this setting doesn’t increase the tolerance for comm error on this case.Is it possible to have an other option to retry on new TCP connection, or count the error on failed TCP connection other than request?
Then either starting from the previous failed element group or starting all over again.
When the comm fails on 3 connection, then set the failed element groups to undefined.
This should have more tolerance for comm error.StayConneceted: True / False
by default, it’s set to true.
when set to false, scada comm use new TCP session for each request cycle.
But I am not able to test will it change the handling of retry. will it retry on the same TCP connection or new TCP connection? if scada comm retries on new TCP connection , then it should solve my problem. but I guest this parameter does not affect the retry handling. -
AuthorPosts