Jump to content

Create Individual Capsules for Batches that Match Prefix


Recommended Posts

  • Super Seeqer

Great question through the support portal today I am going to try to generalize for everyone. 

Quote

 I have a batch reactor that contains a tag that identifies the product(x) and batch number (y) in the format xxxx - yyy. I would like to create individual capsules for each batch that matches product xxx 

This requires joining two conditions and I am going to show how to do it in a using the simple tools and then how to combine it all together into one formula. 

Step 1 - Create a Value Search which matches you product code ABC. Once trick here is to search for "ABC*"  that will return string results for anything starting with ABC and ending with any other series of characters. The * is part of Regex notation which you can use when searching strings inside the Value Search tool  - https://support.seeq.com/space/KB/146637020/Regex%20Searches 

image.png

Step 2 - Create a Condition for each batch using formula and the toCondition() function. This will create a capsule every time the value of our string signal changes.

$mp.toCondition()

image.png

Step 3 - Combine conditions together using the Composite Condition Tool and the intersection join

image.png

Alternate Single Formula - Combine the steps in a multi-line formula

$AllBatches = $mp.toCondition()
$ProductRuns = $mp.contains("ABC")

$AllBatches and $ProductRuns

image.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...