Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

[Imported] Anyone know how to pass a varialbe to a ST program from a Script

EcoStruxure Geo SCADA Expert Forum

Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • Remote Operations
  • EcoStruxure Geo SCADA Expert Forum
  • [Imported] Anyone know how to pass a varialbe to a ST program from a Script
Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
sbeadle
Kirk sbeadle Kirk
307
AndrewScott
Admiral AndrewScott
95
BevanWeiss
Spock BevanWeiss
89
AdamWoodlandToo
Lt. Commander AdamWoodlandToo
36
View All
Related Products
product field
Schneider Electric
EcoStruxure™ Geo SCADA Expert

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to EcoStruxure Geo SCADA Expert Forum
sbeadle
Kirk sbeadle Kirk
Kirk

Posted: ‎2019-10-25 03:37 PM . Last Modified: ‎2023-05-03 12:39 AM

0 Likes
0
1150
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2019-10-25 03:37 PM . Last Modified: ‎2023-05-03 12:39 AM

[Imported] Anyone know how to pass a varialbe to a ST program from a Script

>>Message imported from previous forum - Category:ClearSCADA Software<<
User: florian, originally posted: 2018-10-24 19:57:45 Id:195
This is a re-posting from the obsoleted (October 2018) "Schneider Electric Telemetry & SCADA" forum.

--------------

**_geoffpatton:_**
**_In my Templates I have a Internal Point that I want Everyone to be able to write to._**
**_Everyone of course does not have Control Rights in my database._**

**_I made a ST program that is configured so that anyone with Read access can Execute it. The ST program can Write the value of the Internal Point using a VAR_INPUT. Since this Variable is not set in the program it prompts the user to enter what the value should be. However I do not like the default prompt._**

**_I want to use a VBScript Form to prompt the user. They enter the value in the form then Press OK._**
**_Then the VBScript does an Execute Method on the ST program passing the value to the parameter._**

**_I cannot get that to work. I have used ST programs to pass a variable to another ST program with the Execute Method so I know that a ST program will accept it. From VBScript I can successfully Execute an ST but I cannot figure out how to pass my value with the Execute._**

**_I am thinking that the obj.Interface.Execute is just lacking the ability to pass variables, but I figured I would ask here before giving up._**

**_Also using security settings is not practical because there are hundreds of instances that would have to have the Security on the Internal Point individually set._**

--------------------------

**_geoffpatton:_**
**_gave it another Go and figured out how to pass the variable, and execute the ST program. However setting a Variable in a ST program looks to be a Control and the Execution Permission does not apply. So Everyone still cannot do what I want._**

**_In a way Adam Woodland is to thank, as I was reading something else he posted, not really related, and realized that I probably needed to use SetVariable with the Execute. I was trying to do it like when an ST executed another ST and you pass the variable with the Execute._**

**_My first try with SetVariable still did not work until I figured out that since it is not one interface call the value was not being saved. So the final piece was editing the ST program and change from using INPUT_VAR to RETAIN VAR_**

**_And since the scripting documentation falls short for things like this, here is the test script_**

**_Function Exec_ST()_**
**_Dim obj_**
**_Set obj = Server.FindObject(Server.GetOPCValue(".ST.FullName"))_**
**_obj.Interface,SetVariable "Variable_Name", Value_**
**_obj.Interface.Execute_**
**_End Function_**

-------------------------

bevanweiss:
Umm...
So set the security within the template to exactly what you want, and then disable the property override on the SecurityACLs for that point.

Blamm... every instance will now have the security that was defined on the Template itself.

I'm sure I've got examples of using Script to pass in VAR_INPUT variables to ST Logic. Just not on my computer here.
Make sure that you're following the Schema for this however, as I don't believe that you can just pass in the number of arguments that you want to, I think the schema defines a fixed Execute call (with like 8 or 16 arguments from memory).

------------------

**_geoffpatton:_**
**_Ah thanks Bevan,_**
**_I have rarely needed to have anything not using inherited security and when I have it has been on one off items. I did not know that security override for SecurityACLs existed, and it did not click when I was looking at the property overrides because I was thinking Security and not Access Control List. Makes complete sense that you can override the list._**

**_Sometimes I get in my own way_**

--------------

AWoodland:
The SetVariable and GetVariable aren't really suitable for this, you should be able to pass in the VAR_INPUT variables using the Execute method in scripting, i.e.

Object.Interface.Execute "Geoff", "Bevan", 0, False

For when the ST is:

VAR_INPUT
User1 : STRING;
User2 : STRING;
SomeNum : DINT;
SomeBool : BOOL;

END_VAR;

---------------

**_geoffpatton:_**
**_I don't know what I actually did before, but when I thought I tried that it did not work. All I can think of is maybe I put a , after the Execute. Like this Tag.Interface.Execute, 1.2_**

**_I abandoned ST anyway now that I understand the ACL override thanks to Bevan. I decided, if I did not really need them, it was a good idea to not add hundreds of ST object to the database._**

 

Labels
  • Labels:
  • SCADA
Reply

Link copied. Please paste this link to share this article on your social media post.

  • All forum topics
  • Previous Topic
  • Next Topic
Replies 0
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of