Created: 2021-01-10 08:47 PM
I would like to update a point with the help of SOAP interface of a web site. I was able to do that with a VB script on a mimic. But to automate this, I would like to run this script automatically at regular intervals. Is there a way to do that? I am thinking something like logic programs "run at interval" feature.
Or is there a way to invoke the script from a logic program?
Created: 2021-01-12 12:43 AM
As scripting only runs within a ViewX session, and only under the privileges of the user logged into that ViewX session then it's not applicable to 'server run' environments, like logic / schedules etc.
What you could do is use a SYSTEM object to run a VBScript (or other Script Host supported language) item on the server. You'd have to test this out as to whether it will work as desired, and you'd need to use the ClientDLL COM interface (Automation Interface) to have the VBscript access the ClearSCADA / GeoSCADA environment.
Created: 2021-01-17 03:20 PM
Thanks Bevan for the reply.
After posting the query, I was going through the Geo SCADA release notes and I came across DDK feature. Have you tried it? I think I can use DDK for my purpose?
Created: 2021-01-18 12:25 AM
The DDK is a reasonably steep learning curve, and has quite a few 'gotchas'.
I'd recommend trying to avoid using it if you can.
It is absolutely not a 'short cut' to get data into Geo SCADA... it is very much 'the long way around'.. but in certain situations it's the right fit.
I would really recommend using a Schedule, a set of SYSTEM objects, and a VBscript (or other Active Script) if you only need to do a few dozen points.
If you have hundreds of these points to retrieve data for, or you can see lots of other systems also wanting the same thing (and hence you could justify a significant investment of time to work out the bugs in a DDK drive) then the DDK might be a good option.
Steve Beadle does have a github repository with some examples in it. There is also the example included with the DDK.
I'd recommend you have a read through of the DDK documentation. If you understand the why's and what's of how it's all glued together then the DDK might be for you... if you're just hoping to blindly copy-paste code to get a DDK driver working... then you're very mistaken.
Created: 2021-01-19 01:58 AM
You may also wish to consider using Python.
The following example connects, logs in and modifies/checks a value.
Note that it uses the pythonnet module, so install that first with "pip install pythonnet". (Compatible today with Python 3.8, don't try on 3.9 until it is updated).
import clr CS = clr.AddReference("c:\Program Files\Schneider Electric\ClearSCADA\ClearSCADA.Client.dll") import ClearScada.Client as CSClient node = CSClient.ServerNode( CSClient.ConnectionType.Standard, "127.0.0.1", 5481) connection = CSClient.Simple.Connection( "Utility") connection.Connect( node) connection.LogOn( "your-username", "your-password") pointObject = connection.GetObject("Example Projects.Oil and Gas.Transportation.Graphics.End Station.Valve 3.Position Control") pointObject.InvokeMethod("CurrentValue", 3.15) print( "Point set to: " + str(pointObject.GetProperty("CurrentValue")) )
Created: 2021-01-19 03:11 PM
Thanks Sbeadle for the tip.
Where do I get the ClearScada package for python. I tried pip install but it couldn't find it.
I have tried pyodbc package with DSN to run SQL queries but I think i have read SQL queries are not a good way of updating the database. So I was looking for other options.
Created: 2021-01-19 09:31 PM
No, VBscript is NOT Visual Basic, nor is it VB.NET
It's part of the Windows Scripting Host environment
Created: 2021-01-19 09:58 PM
The link is broken.
Anyways I am new to VB scripting and didn't know that I could access dll files from it.
Are there any script examples for doing this?
Created: 2021-01-20 08:51 PM . Last Modified: 2021-01-20 08:57 PM
I suspect either I missed the closing bracket in my copy-paste... or the Exchange site took the closing bracket away...
Try the new link
EDIT: Can confirm it was Exchange stealing my bracket. I had to add it in manually to the URL.
I'm not sure why you'd want to get into the low level DLL world for VBscript, you'd just use CreateObject("Serck.ScxV6Server") to get a server object reference and then call the Connect method on it, all as per the Automation Interface (look in the ClearSCADA / GeoSCADA help for this)
There's lots of references around for the Automation Interface also, you'd just need to mangle them into the right programming language.
Discuss challenges in energy and automation with 30,000+ experts and peers.
Find answers in 10,000+ support articles to help solve your product and business challenges.
Find peer based solutions to your questions. Provide answers for fellow community members!