Jump to content

Converting a Condition to a Boolean Signal

John Cox

Recommended Posts

  • Seeq Team

A common analytics need is to create a signal with numerical values that are based on an existing condition. Users often want to translate a condition (on/off, good data/bad data, running/down, etc.) to a numerical value to be used in calculations. For example, a user may want to multiply a process signal by a 0/1 value based on when the process is down/running. This technique can also be used to replicate "if" logic or "if / else" logic, where different values are returned depending on if the condition is true/false. 

Converting a condition to a signal value can be easily accomplished in Seeq using the Formula Tool and the splice function. Here is an example where we convert a condition to a signal of 0s and 1s:


1. Use the Value Search Tool to create a HOT condition for time periods when the Temperature signal is > 90 degrees F:



2. Use the Formula Tool to convert the HOT condition to a 1 (when condition is true) and a 0 (when condition is false):



3. View the results in the trend. The new signal in lane 2 has a value of 1 when the HOT condition is true. Otherwise, the signal is 0.



Additional Information

Using Conditions and the Splice Function to Replace If Statements

Content Verified DEC2023

Link to comment
Share on other sites

  • Synjen Marrocco changed the title to Converting a Condition to a Boolean Signal


This topic is now archived and is closed to further replies.

  • Create New...