Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84739members
354163posts

Point update from a web page data

EcoStruxure Geo SCADA Expert Forum

Find out how SCADA systems and networks, like EcoStruxure Geo SCADA Expert, help industrial organizations maintaining efficiency, processing data for smarter decision making with IoT, RTU and PLC devices.

paudel
Ensign
Ensign
0 Likes
9
1818

Point update from a web page data

Hi gurus!

 

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?

 

9 Replies 9
BevanWeiss
Spock
Spock
0 Likes
8
1778

Re: Point update from a web page data

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.

 

https://www.vbsedit.com/html/f1741259-9501-478b-bad6-36039a057410.asp

https://stackoverflow.com/questions/23074430/how-to-run-vbscript-from-command-line-without-cscript-w...

 


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
paudel
Ensign
Ensign
0 Likes
7
1747

Re: Point update from a web page data

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?

BevanWeiss
Spock
Spock
0 Likes
6
1739

Re: Point update from a web page data

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.


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
paudel
Ensign
Ensign
0 Likes
5
1720

Re: Point update from a web page data

Hi Bevan,

 

Thanks for the heads up about the DDK. 

 

Going back to the VBscript option; dont you have to install VB6 or VB.Net on the server? 

sbeadle
Janeway Janeway
Janeway
0 Likes
1
1715

Re: Point update from a web page data

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")) )

.

 

 

paudel
Ensign
Ensign
0 Likes
0
1708

Re: Point update from a web page data

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. 

BevanWeiss
Spock
Spock
0 Likes
2
1702

Re: Point update from a web page data

No, VBscript is NOT Visual Basic, nor is it VB.NET

It's part of the Windows Scripting Host environment

https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc738350(v=ws....)

 


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
paudel
Ensign
Ensign
0 Likes
1
1699

Re: Point update from a web page data

Hi Bevan, 

 

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?

BevanWeiss
Spock
Spock
0 Likes
0
1682

Re: Point update from a web page data

https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc738350(v=ws....

 

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.

https://community.exchange.se.com/t5/Geo-SCADA-Expert-Forum/Imported-Accessing-Automation-Interface-...

 


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..