Skip to main content
InSource Solutions

TN WW225 Combining Multiple Conditions Into One Script

InSource_Logo_Transparent.png

Description

 

This article from InSource demonstrates a method of combining multiple conditions into one condition script by utilizing IF..THEN statements. 

  • Author: Justin Benton    
  • Published: 02/21/2019
  • Applies to: System Platform 2014 R2 SP1 and Above

Details

If you need to create condition scripts for a high number of tags, creating a new condition for each tag could be potentially very time consuming and could possibly force the application to work that much harder. In order to potentially lighten the work load and usage of the application and machine, here is a method of combining multiple conditions into one condition script.

clipboard_eb5a025348386621d5fffb7c7b44f8f5f.png

In this set up, Tag1, Tag2, and Tag3 are going to be used in the condition to take action when true. Using the OR operator to link them in the same condition, but keeping the actions independent, unlike with an AND operator.

 

The IF..THEN statements built into the script area turn on each of the "CAMs", based on whether or not any of the tags in the condition are true. This is a high level concept that can be manipulated many ways. You can use AND operators in the condition as well as setting multiple condition types to the condition script itself. This is could be a less time consuming way to set up a high number of conditions depending on what action needs to take place in the IF..THEN statement, rather than creating a condition of each tag. Notice the comment field, you could also separate your conditions by area, this can be useful for troubleshooting.

 

  • Was this article helpful?