Jump to content

Formula deleted when asset is swapped


Recommended Posts

To fill in the gaps between invalid signal values, I use the .validvalues() function, which works very well. But when I swap assets, that function portion of the formula gets deleted. Is there anyway to keep the function portion but just swap the asset signal? 

image.png.c5923f28909a05df2ca5f3c0b456543b.png

Link to comment
Share on other sites

  • Seeq Team

Hi Tyler,

Is the item that you are editing in the asset tree directly? If so, when you swap, you're swapping to new items that you haven't edited that probably just include the original $signal formula. If that's the case, you have two options:

1. Edit the formulas for each of the equivalent items (if it's an asset group, that may be easy to edit all of the items. If not, this may be tedious)

2. The easier method in my mind is to create a separate calculation on top of the item in the tree. If you use the item in the tree and then do the $signal.validvalues() in a signal pointing at the item in the tree, it will then swap and perform that same validvalues to each item in the tree when swapped.

Basically, if there's an equivalently named item in the other asset tree, it will swap to that specific item rather than applying the formula you set. If you build a formula on top of the item in the tree, it will then instead swap the items in the tree and apply whatever formula you create on top of the items in the tree.

Link to comment
Share on other sites

45 minutes ago, Joe Reckamp said:

Hi Tyler,

Is the item that you are editing in the asset tree directly? If so, when you swap, you're swapping to new items that you haven't edited that probably just include the original $signal formula. If that's the case, you have two options:

1. Edit the formulas for each of the equivalent items (if it's an asset group, that may be easy to edit all of the items. If not, this may be tedious)

2. The easier method in my mind is to create a separate calculation on top of the item in the tree. If you use the item in the tree and then do the $signal.validvalues() in a signal pointing at the item in the tree, it will then swap and perform that same validvalues to each item in the tree when swapped.

Basically, if there's an equivalently named item in the other asset tree, it will swap to that specific item rather than applying the formula you set. If you build a formula on top of the item in the tree, it will then instead swap the items in the tree and apply whatever formula you create on top of the items in the tree.

Thanks for the input! Does seeq have any guidance on how those formulas are built on top of the item in the tree? When I got to Asset Group Editor Mode, I dont see any tools where I could create a formula over a group of signals. 

Link to comment
Share on other sites

  • Seeq Team

Hi Tyler,

What I mean by a formula built on top of the item in the tree is to not create the formula in Asset Group Editor Mode, but once you have the asset group built, add the item from the tree to the display, then simply use the formula tool to make a formula referencing that item from the asset group. As long as you are creating a NEW formula and not editing the one that's in the Asset Group, it will build on top of the asset group item. 

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...