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!

Determining Which Logic Program Has Priority for Execution

Geo SCADA Knowledge Base

Access vast amounts of technical know-how and pro tips from our community of Geo SCADA experts.

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
  • Knowledge Center
  • Geo SCADA Knowledge Base
  • Determining Which Logic Program Has Priority for Execution
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 Labels
Top Labels
  • Alphabetical
  • database 32
  • Web Server and Client 31
  • WebX 19
  • Request Form 18
  • Lists, Events & Alarms 16
  • ViewX 15
  • Application Programming 12
  • Setup 12
  • Telemetry 8
  • Events & Alarms 7
  • Lists 7
  • Mimic Graphics 7
  • Downloads 6
  • Support 5
  • IoT 5
  • SCADA 5
  • Geo SCADA Expert 5
  • Drivers and Communications 4
  • Security 4
  • DNP 3 3
  • IEC 61131-3 Logic 3
  • Trends and Historian 2
  • Virtual ViewX 2
  • Geo Scada 1
  • ClearSCADA 1
  • Templates and Instances 1
  • Releases 1
  • Maps and GIS 1
  • Mobile 1
  • Architectures 1
  • Tools & Resources 1
  • Privacy Policy 1
  • OPC-UA 1
  • Previous
  • 1 of 4
  • Next
Latest Blog Posts
  • OPC UA - Driver and Server
  • Requirements for Generating a Valid OPC UA Server Certificate
  • Load Events Using LoadRecord and LoadRecords
  • Geo SCADA Embedded Component Licenses
  • Geo SCADA 2023 Known Issues
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
Anonymous user
Not applicable
‎2021-06-09 12:44 PM
0 Likes
0
872
  • Bookmark
  • Subscribe
  • Email to a Friend
  • Printer Friendly Page
  • Report Inappropriate Content

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

‎2021-06-09 12:44 PM

Determining Which Logic Program Has Priority for Execution

Originally published on Geo SCADA Knowledge Base by Anonymous user | June 09, 2021 09:44 PM

📖 Home  Back  
The Logic engine is single threaded. This means that ClearSCADA only runs one Logic program at a time. To protect Logic programs from being affected by poorly written Logic programs that cannot execute correctly, ClearSCADA includes an Instruction Limit. The Instruction Limit prevents programs with infinite loops from 'locking out other programs.

A Logic program will run:
  • At regular intervals (On Interval). The intervals are defined in the Logic program's configuration.

  • At regular intervals but only if its inputs have changed (On Interval with Input Change Detection enabled) The intervals are defined in the Logic program's configuration.

  • At regular intervals only if the source of the Trigger has changed value (the Trigger is a value that is not used as an input in the Logic program). The source of the value is defined in the Trigger setting of the Logic program's configuration.

  • At regular intervals only if the trigger has changed value and the Logic program's inputs have changed.

  • When its inputs are processed (On Input Processed). Each point or variable update is queued and the Logic program will run once for each input update. The input updates are queued according to the time at which the server receives the updated values.

  • When it is triggered by a change to a value in the database

  • When the Execute action/method is triggered by a user, master station schedule, script, VB program etc.


When a Logic program is due to run, it is added to an execution queue. If there are no other Logic programs waiting in the queue, the Logic program will run immediately. However, if there are other Logic programs in the queue or another Logic program is already running at that time, the Logic program will not be executed immediately - it waits in the queue. When the running Logic program has executed successfully, the next Logic program in the queue is run. The queue orders the Logic programs according to the times at which they were intended to run.

It is rare for Logic programs to still be running when another Logic program is set to run. This is due to the Instruction Limit setting for Logic programs preventing the programs from taking an excessive amount of time to run. It also prevents Logic programs with infinite loops from 'locking' out other programs.

Each Logic program can be allocated a Priority number (0 by default). If multiple Logic programs are set to run at the same time, the Priority numbers of the Logic programs are used to determine the order in which the Logic programs are run. ClearSCADA will run the Logic program with the lowest Priority number first. The Priority number is only used when multiple Logic programs are set to run at the same time. At all other times, the Logic programs are run according to the time at which they were added to the execution queue.

If there are Logic programs set to run at the same time and these programs also have the same Priority numbers, ClearSCADA will run the Logic programs according to the amount of time for which they have been queued. The Logic program that has been queued the longest will be executed first.

Example



There are three Logic programs: ST Program 1, ST Program 2, and ST Program 3. ST Program 1 has a Priority number of 3, ST Program 2 has a Priority number of 5 and ST Program 3 has a Priority number of 0. All of the ST Programs are scheduled to run at 10:00.

A Function Block Diagram named 'FBD 6' has a Priority number of 0 and is scheduled to run at 10:01.

At 10:00, ClearSCADA runs ST Program 3 as it has the lowest Priority number (0). When ST Program 3 has run, ClearSCADA will run ST Program 1 as it has a Priority number of 3, and when ST Program 1 has run, ClearSCADA will run ST Program 2 as that has the highest Priority number (5).

ST Program 2 is not run until 10:02. The Function Block Diagram 'FBD 6' has not been executed, despite being scheduled to run at 10.01 and having a lower Priority number than ST Program 2. This is because ST Program 2 was scheduled to run before 'FBD 6'. The Priority number is only used if Logic programs are scheduled to run at the same time.

Go: Home Back

Author

Biography

Anonymous user

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

  • Back to Blog
  • Newer Article
  • Older Article
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