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

We Value Your Feedback!
Could you please spare a few minutes to share your thoughts on Cloud Connected vs On-Premise Services. Your feedback can help us shape the future of services.
Learn more about the survey or Click here to Launch the survey
Schneider Electric Services Innovation Team!

Local Variable

AVEVA Plant SCADA Forum

A support forum for AVEVA Plant SCADA (formerly Citect SCADA). Share new and exciting product information, connect, learn, and collaborate with the ecosystem of Plant SCADA Users. AVEVA Plant SCADA a reliable, flexible and high-performance Supervisory Control and Data Acquisition software solution for industrial process customers. This forum is to connect, share, learn and collaborate new and exciting product information. Feel free to join and share to your Ecosystem of Plant SCADA Users.

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
  • Industrial Automation
  • AVEVA Plant SCADA Forum
  • Local Variable
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
olivier_vallee
Lt. Commander olivier_vallee
28
Oncom
Commander Oncom
6
BevanWeiss
Spock BevanWeiss
2
RoozeeR
Lt. Commander RoozeeR Lt. Commander
2
View All

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to AVEVA Plant SCADA Forum
MelsecMan
Crewman MelsecMan
Crewman

Posted: ‎2023-03-14 06:57 AM

0 Likes
8
2052
  • 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: ‎2023-03-14 06:57 AM

Local Variable

Hi Friends!

Can someone explain to me?

Why this is not possible in a button script or Cicode script function?

 

TL_SVCountHlp = TL_SVCount;

 

TL_SVCountHlp is a Local Variable type INT.

TL_SVCount is a IO variable type INT.

 

Labels
  • Labels:
  • Scripting - Cicode
  • Tags:
  • english
Reply

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

  • All forum topics
  • Previous Topic
  • Next Topic
Replies 8
stuartm
Ensign stuartm
Ensign

Posted: ‎2023-03-14 07:24 PM

0 Likes
1
2031
  • 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: ‎2023-03-14 07:24 PM

Hello,

What makes you think it is not possible? All things being equal, it should be possible. Are you getting some sort of error, or is it simply not working?

 

Stuart

Reply

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

MelsecMan
Crewman MelsecMan
Crewman

Posted: ‎2023-03-14 11:43 PM

In response to stuartm
0 Likes
0
2019
  • 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: ‎2023-03-14 11:43 PM

Simply not working.

I can assign a constant to the local variable, but not a IO variable value.

 

Reply

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

Juan
Commander Juan
Commander

Posted: ‎2023-03-15 06:13 AM

0 Likes
1
1992
  • 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: ‎2023-03-15 06:13 AM

Hi,

 

Displays the two variables on the screen and presses the button, checks if the value of the local variable is updated with the IO variable.

 

You may have some problems:
1- That the IO variable is not being read due to communication problems.
2- That the value of IO is cache and not the current one.

 

If this test works, remove the variables from the screen and create a cicode function something like this:

INT
Function ReturnValue( INT vIO)
return vIO;
END

 

call it from the button:
vLocal = ReturnValue( vIO);

 

If it doesn't work, you should use the tag subscriptions functions.

 

Regards,

Juan

Reply

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

stuartm
Ensign stuartm
Ensign

Posted: ‎2023-03-15 06:22 AM

0 Likes
0
1989
  • 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: ‎2023-03-15 06:22 AM

You could also trace the values of the tags out to the syslog and ensure they are working

for example, put this in a function:

DebugMsgSet(1);  // turns on debug logging

DebugMsg("Before " + TL_SVCountHlp:#.# + "," + TL_SVCount:#.#);  // sends the current values to the syslog

TL_SVCountHlp = TL_SVCount;

DebugMsg("After " + TL_SVCountHlp:#.# + "," + TL_SVCount:#.#);  // sends the current values to the syslog

 

You could try doing a tagread:

 

Real rTagValue;

rTagValue = TagRead(TL_SVCount);

DebugMsgSet(1);  // turns on debug logging

DebugMsg("rTagValue " + rTagValue:#.#);  // sends the current values to the syslog

 

And see what pops out.

 

 

 

 

 

 

Reply

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

MelsecMan
Crewman MelsecMan
Crewman

Posted: ‎2023-03-15 06:27 AM

In response to Juan
0 Likes
0
1988
  • 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: ‎2023-03-15 06:27 AM

Hi!

I have both values on display, IO-variable is updating, the local variable not.

A cyclic event calls my Cicode function with the assignment.

I have verified that that the function is executed.

I'am not on site. I will try your strange funcion 🙂 and read about "subscriptions" later.

/Stefan

 

Reply

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

AntonioIacoviello
Crewman AntonioIacoviello Crewman
Crewman

Posted: ‎2023-03-15 10:26 AM

0 Likes
0
1975
  • 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: ‎2023-03-15 10:26 AM

Are you using Multiprocess?

Local variables have the scope in the process instance and will be not shared across processes.
If you use single process the behavior that you are experiencing may change.

Reply

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

MelsecMan
Crewman MelsecMan
Crewman

Posted: ‎2023-03-16 07:44 AM

1 Like
0
1962
  • 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: ‎2023-03-16 07:44 AM

This crazy function solved my problem:

 

INT
Function ReturnValue( INT vIO)
return vIO;
END

 

/Thanks!

Reply

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

m-plc-2023
m-plc-2023
Cadet

Posted: ‎2023-03-22 09:44 AM

0 Likes
0
1881
  • 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: ‎2023-03-22 09:44 AM

I quickly tried this on a test project that I have and seems to work fine, I dont see any issue.

Reply

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

Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
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