Products
  • Run Background Programs Using Red Lion Crimson Software

Run Background Programs Using Red Lion Crimson Software


There are times when you need to have some logic running continuously on a Red Lion Crimson device. This Tech Tip will show you several ways to achieve this.

For devices with or without display pages, the program can be called from either the On Tick or On Startup Global actions under the communications area as shown below. Selecting On Tick will execute the program every 1s. Selecting On Startup will run the program once at the device start and will require an endless loop for the program repeat.

In order for the program to release processor time back to Crimson for other tasks, the program should have the Execution Tasks set to Background X. Where X is 1-3 for the 3 background tasks that allow for up to 3 independent task threads. The selection for External Data relates to the reading of tags and what should happen if the data is not available. The Run Anyway check box allows the script to run even if the tag data is not available.

An example program for On Tick would be as follows. This would result in the value of MyTag incrementing by 1 every 1s until it reaches 1500 when it will return to 0 and start incrementing again.

If logic needs to execute faster (or slower) than every 1s, the program can be called On Startup using an endless loop. This loop will execute as fast as possible depending on the requirements of communications and other tasks. This could cause the device to appear sluggish and unresponsive. To avoid this and to control the rate with this logic runs, the Sleep command should be used. This puts the task to sleep for the period inside the braces in milliseconds and frees up the device to attend to other tasks. The Sleep command should only ever be used in a background task. If used in a foreground task it will sleep the device and impact performance.

For devices that have display pages, there are few extra options as shown below. There is very little distinction between On Power Up and On Startup. On Power Up occurs first and On Startup Up is slightly later. The Crimson Help states that the difference between these “does not concern most users”. On Tick is also the same 1s as described earlier and On Update defines an action to be run on each display update.

These methods are valid ways to run repetitive logic that needs to run at a regular interval that cannot be tied to a screen object, user action, or PLC tag value.

For more information on Red Lion Crimson software contact us by clicking here.

Select location
Panasonic PLC Training
PANASONIC PLC FP0R TRAINING 1 DAYS IN BRISBANE INCLUDES AFP0RC14RS + FP0R-CABLE-USB TR-PANA-FP0R-QLD
Increase value Decrease value
Panasonic PLC Training
PANASONIC PLC FP0R TRAINING 1 DAYS IN MELBOURNE INCLUDES AFP0RC14RS + FP0R-CABLE-USB TR-PANA-FP0R-VIC
Increase value Decrease value
Panasonic PLC Training
PANASONIC PLC FP0R TRAINING 1 DAYS IN SYDNEY INCLUDES AFP0RC14RS + FP0R-CABLE-USB TR-PANA-FP0R-NSW
Increase value Decrease value
Panasonic PLC Training
PANASONIC PLC FP0R TRAINING 1 DAYS IN PERTH INCLUDE AFP0RC14RS + FP0R-CABLE-USB TR-PANA-FP0R-WA
Increase value Decrease value
Panasonic PLC Training
PANASONIC PLC FP0R TRAINING 1 DAYS IN ADELAIDE INCLUDES AFP0RC14RS + FP0R-CABLE-USB TR-PANA-FP0R-SA
Increase value Decrease value
Panasonic PLC Training
PANASONIC PLC FPX TRAINING 1 DAYS IN BRISBANE INCLUDES AFPX-C30RD + CBLUSB00 TR-PANA-FPX-QLD
Increase value Decrease value
Panasonic PLC Training
PANASONIC PLC FPX TRAINING 1 DAYS IN MELBOURNE INCLUDES AFPX-C30RD + CBLUSB00 TR-PANA-FPX-VIC
Increase value Decrease value
Panasonic PLC Training
PANASONIC PLC FPX TRAINING 1 DAYS IN SYDNEY INCLUDES AFPX-C30RD + CBLUSB00 TR-PANA-FPX-NSW
Increase value Decrease value
Panasonic PLC Training
PANASONIC PLC FPX TRAINING 1 DAYS IN PERTH INCLUDES AFPX-C30RD + CBLUSB00 TR-PANA-FPX-WA
Increase value Decrease value
Panasonic PLC Training
PANASONIC PLC FPX TRAINING 1 DAYS IN ADELAIDE INCLUDES AFPX-C30RD + CBLUSB00 TR-PANA-FPX-SA
Increase value Decrease value
Mission Critical Industrial Ethernet Course
HIRSCHMANN 1DAY TRAINING MISSION CRITICAL IND ETHERNET INCLUDES (942 291-001) TR-ETH-QLD
Increase value Decrease value
Mission Critical Industrial Ethernet Course
HIRSCHMANN 1DAY TRAINING MISSION CRITICAL IND ETHERNET INCLUDES (942 291-001) TR-ETH-VIC
Increase value Decrease value
Mission Critical Industrial Ethernet Course
HIRSCHMANN 1DAY TRAINING MISSION CRITICAL IND ETHERNET INCLUDES (942 291-001) TR-ETH-NSW
Increase value Decrease value
Mission Critical Industrial Ethernet Course
HIRSCHMANN 1DAY TRAINING MISSION CRITICAL IND ETHERNET INCLUDES (942 291-001) TR-ETH-WA
Increase value Decrease value
Mission Critical Industrial Ethernet Course
HIRSCHMANN 1DAY TRAINING MISSION CRITICAL IND ETHERNET INCLUDES (942 291-001) TR-ETH-SA
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 2 Software
HIRSCHMANN HiOS L2 TRAINING 3 DAYS IN BRISBANE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS2-QLD
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 2 Software
HIRSCHMANN HiOS L2 TRAINING 3 DAYS IN MELBOURNE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS2-VIC
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 2 Software
HIRSCHMANN HiOS L2 TRAINING 3 DAYS IN SYDNEY INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS2-NSW
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 2 Software
HIRSCHMANN HiOS L2 TRAINING 3 DAYS IN PERTH INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS2-WA
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 2 Software
HIRSCHMANN HiOS L2 TRAINING 3 DAYS IN ADELAIDE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS2-SA
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 3 Software
HIRSCHMANN HiOS L3 TRAINING 3 DAYS IN BRISBANE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS3-QLD
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 3 Software
HIRSCHMANN HiOS L3 TRAINING 3 DAYS IN MELBOURNE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS3-VIC
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 3 Software
HIRSCHMANN HiOS L3 TRAINING 3 DAYS IN SYDNEY INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS3-NSW
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 3 Software
HIRSCHMANN HiOS L3 TRAINING 3 DAYS IN PERTH INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS3-WA
Increase value Decrease value
Hirschmann Operating System - HiOS Layer 3 Software
HIRSCHMANN HiOS L3 TRAINING 3 DAYS IN ADELAIDE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-HIOS3-SA
Increase value Decrease value
Network Management (CP2)
HIRSCHMANN NETWORK TRAINING 2 DAYS IN BRISBANE INCLUDES 943 993-471 (Voucher) TR-HIRS-CP2-QLD
Increase value Decrease value
Network Management (CP2)
HIRSCHMANN NETWORK TRAINING 2 DAYS IN MELBOURNE INCLUDES 943 993-471 (Voucher) TR-HIRS-CP2-VIC
Increase value Decrease value
Network Management (CP2)
HIRSCHMANN NETWORK TRAINING 2 DAYS IN SYDNEY INCLUDES 943 993-471 (Voucher) TR-HIRS-CP2-NSW
Increase value Decrease value
Network Management (CP2)
HIRSCHMANN NETWORK TRAINING 2 DAYS IN PERTH INCLUDES 943 993-471 (Voucher) TR-HIRS-CP2-WA
Increase value Decrease value
Network Management (CP2)
HIRSCHMANN NETWORK TRAINING 2 DAYS IN ADELAIDE INCLUDES 943 993-471 (Voucher) TR-HIRS-CP2-SA
Increase value Decrease value
Industrial Ethernet CT1
HIRSCHMANN CT1 TRAINING 2 DAYS IN BRISBANE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT1-QLD
Increase value Decrease value
Industrial Ethernet CT1
HIRSCHMANN CT1 TRAINING 2 DAYS IN MELBOURNE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT1-VIC
Increase value Decrease value
Industrial Ethernet CT1
HIRSCHMANN CT1 TRAINING 2 DAYS IN SYDNEY INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT1-NSW
Increase value Decrease value
Industrial Ethernet CT1
HIRSCHMANN CT1 TRAINING 2 DAYS IN PERTH INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT1-WA
Increase value Decrease value
Industrial Ethernet CT1
HIRSCHMANN CT1 TRAINING 2 DAYS IN ADELAIDE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT1-SA
Increase value Decrease value
Industrial Ethernet CT2
HIRSCHMANN CT2 TRAINING 3 DAYS IN BRISBANE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT2-QLD
Increase value Decrease value
Industrial Ethernet CT2
HIRSCHMANN CT2 TRAINING 3 DAYS IN MELBOURNE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT2-VIC
Increase value Decrease value
Industrial Ethernet CT2
HIRSCHMANN CT2 TRAINING 3 DAYS IN SYDNEY INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT2-NSW
Increase value Decrease value
Industrial Ethernet CT2
HIRSCHMANN CT2 TRAINING 3 DAYS IN PERTH INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT2-WA
Increase value Decrease value
Industrial Ethernet CT2
HIRSCHMANN CT2 TRAINING 3 DAYS IN ADELAIDE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT2-SA
Increase value Decrease value
Industrial Routing CT3
HIRSCHMANN CT3 TRAINING 2 DAYS IN BRISBANE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT3-QLD
Increase value Decrease value
Industrial Routing CT3
HIRSCHMANN CT3 TRAINING 2 DAYS IN MELBOURNE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT3-VIC
Increase value Decrease value
Industrial Routing CT3
HIRSCHMANN CT3 TRAINING 2 DAYS IN SYDNEY INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT3-NSW
Increase value Decrease value
Industrial Routing CT3
HIRSCHMANN CT3 TRAINING 2 DAYS IN PERTH INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT3-WA
Increase value Decrease value
Industrial Routing CT3
HIRSCHMANN CT3 TRAINING 2 DAYS IN ADELAIDE INCLUDES 943 993-471 (VOUCHER) TR-HIRS-CT3-SA
Increase value Decrease value
Products to compare:
Comparing Products