Ask our Experts
Didn't find what you are looking for? Ask our experts!
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Search in
Link copied. Please paste this link to share this article on your social media post.
Posted: 2019-11-05 12:30 PM . Last Modified: 2023-05-03 12:37 AM
>>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.
Server.SetOPCValue ".GenChoice.Value", ScriptVariable
____________
**_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.
Link copied. Please paste this link to share this article on your social media post.
You’ve reached the end of your document
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.