Follow along for an enriching discussion with our CEO, Peter Herweck, and industry leaders for a captivating Global Keynote at #InnovationSummit Paris 2024. Watch recording and join the #ImpactMaker movement!️
[Imported] How to use internal variables in script?
EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
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 InviteCancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2019-11-0512:30 PM. Last Modified: 2023-05-0312:37 AM
[Imported] How to use internal variables in script?
>>Message imported from previous forum - Category:Scripts and Tips<< User: mchartrand, originally posted: 2018-10-23 17:08:00 Id:174 This is a re-posting from the obsoleted (October 2018) "Schneider Electric Telemetry & SCADA" forum.
_________________
**_jiramancio: Say I have an internal long variable named "GenChoice", and I want to incorporate it in my script. Do I have to use a code to call it in my script? And if so, what code is it. I want to use "GenChoice" to store a value: GenChoice = InputBox("Enter number") And once a number is entered, I would display the value of the variable in the mimic._**
_______
geoffpatton: I have done this using a Form to set a variable in the script and then set the Internal Variable to the script variable.
**_jiramancio: Does this apply to all types of variables? I tried to use this in my code but it didn't work. It says "the passed data type cannot be accepted for this item"._**
________________________
geoffpatton: For variables yes it should other than a constant variable, because it is a constant.
You probably need to make it a String or an Integer to be right type. CStr(value) CInt(Value)
_______________
bevanweiss: What's the full use-case here?
You should keep in mind that ClearSCADA is a multi-user environment, so storing a value into the database (against an internal long) will be shared across all users, and not specific to a single user.
If you want this to be specific to a single user, and not shared across all users, then you might want to consider using the Registry script / animation methods.