Seeq Team John Cox Posted July 19 Seeq Team Posted July 19 Does Seeq have lookup table functionality? I know that I can use the .splice() function to vary values based on conditions, but I would like to, as one example, implement a table with product codes and and produce a target value signal which varies based on product code.
Seeq Team Solution John Cox Posted July 19 Author Seeq Team Solution Posted July 19 (edited) Yes, Seeq has lookup table functionality directly in Seeq Formula and tables with more than 2 columns are supported. See this article for complete details: https://support.seeq.com/kb/latest/cloud/lookup-tables. Here is an example Formula which "looks up" a Machine Status string value based on a numeric Machine Error Code signal. The "keyColumn" in the lookup table is therefore column A, and the "targetColumn" is column B: $table = lookupTable( "[ [1, 'Normal'], [2, 'No current'], [3, 'Unstable voltage'], [4, 'Liquid detected'], [5, 'Sensor failure'], [6, 'Overheating'] ]", InterpolationMethod.Step) $table .lookup($ErrorCode, 'A', 'B') This screenshot shows implementation of the formula example above. The input to the lookup table is the Machine Error Code signal in lane 1. The resulting Machine Status signal is trended in lane 2: Note that prior to Seeq R66, the lookup functions were prefixed with "experimental": experimental_lookupTable() and experimental_lookup(). For advanced use cases where lookup table values are dynamic in nature, and there is a need to programmatically update the lookup table values in a Seeq Formula, please see this post: Edited July 19 by John Cox
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now