Martin Pieronek Posted February 28, 2023 Share Posted February 28, 2023 Good afternoon, Is it possible to create a Seeq formula from Seeq Data Lab. I am trying to find a quick way of mass creating formulas for many Seeq tags. For example if I have 50 temperature tags: TI-101, TI-102, …. TI-150. Now suppose I’d like to create 50 formulas where I am calculating the temperature rate of change for each of the tags above: $a.derivative(), where $a is the temperature tag. Once this is done I have 10 more plants to do. I’d rather not spend a long time copying and pasting formulas. I was thinking if I can have a code set up in Seeq Data Lab, then I can automate the process. I am also open to any other suggestions you may have. Link to comment Share on other sites More sharing options...
Thorsten Vogt Posted March 1, 2023 Share Posted March 1, 2023 Hi Martin, yes, this is possible with SDL. Here is an example: # Search for signals signals = spy.search({"Name":"cdt158*"}) Result: metadata = signals.copy() # Specify new Name by creating one based on the Original Name metadata["OriginalName"] = metadata["Name"] metadata["Name"] = "Derivative of " + metadata["Name"] # Attach column with Seeq Formula metadata["Formula"] = "$signal.derivative()" # Attach column with parameters for the Formula metadata["Formula Parameters"] = "$signal =" + metadata["ID"] # Remove ID Column, otherwise Seeq will try to update the original signal and not create a new one metadata = metadata.drop(columns=["ID", "OriginalName"]) The metadata DataFrame looks like this: # Push metadata to Seeq spy.push(metadata=metadata, worksheet="METADATA") When opening the link that spy.push generated, you can view the results within Workbench: Let me know it this works for you. Regards, Thorsten Link to comment Share on other sites More sharing options...
Martin Pieronek Posted June 23, 2023 Author Share Posted June 23, 2023 Awesome! Thank you so much! You are a life saver!! Link to comment Share on other sites More sharing options...
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