ViewOn Symbol

I have created some new symbols to display in viewon but I was wondering if it was possible to do math with some of the input parameters (SetPt - Value) or something like that?

Hi @bboozer,

With the new symbol that you’re adding into viewon can you explain what you mean by the math/input parameters? Are you adding in a custom SVG file or are you working with one that’s already available in ViewON?

-Tim

I have a new one created that has a min, max, value, and setpoint (see below). So instead of entering a Max and Min I want to use the setpoint + X for the max and setpoint – X for the min. Or if I wanted to display value – setpoint.

image003.jpg

Did you create this file? If not you could probably do the same thing with a rectangle using the measure action and some javascript code.

This is a file I created. If I wanted to get rid of the min and max inputs and scale the fill bar based on a range centered around the Setpoint. How could that be done. I didn’t think you could put javascript on a symbol, only views.

BarSetpoint.svg

As an example, here’s a rectangle, you can set the min and max to be a numerical value, or you could have them set to either an Ewon tag or a Viewon tag to control the min/max

For the actual value being read, you could make a ViewON tag that would grab the setpoint value that’s being read and also add the value of x.

You’d need to use some java script code to make the calls to grab the ewon tag value and modify the viewon tag value and add the additional value though

Thanks, I was hoping to make a symbol that would not require an external script per instance. I have this working but ran into one other issue. I am have a rectangle with both a Translation and a Basic Scale animation. When one of the tags change the rectangle will move to the specified location but then it immediately returns to it’s original location then the Basic Scale is applied. When I try the animations separately they work as expected. Can you not have two movement animations on the same object?

That is something that is possible, unfortunately I don’t have any background in developing SVG files to work this way, but you should be able to have multiple animations. I’m not sure if you can have two movement animations at the same time though, I’m going to check this with my colleague in Belgium tomorrow morning to see if there’s a way to do this

I was testing this in a standard view with a basic rectangle. I had three rectangles one with the Translation, one with the Basic Size, and one with both.

I believe the issue is because it’s not able to have a moving reference point to base the scale or translation on. This might need to be done through java as well, but I’ll see if this is something we can do without requiring code.

I wouldn’t have thought this would be a problem since these reference point are relative to the object and not coordinates on the view.

Unfortunately it seems we’re not able to do a scale as well as a translation on the same object through the default animations on ViewON. I’m sure this is something that could be done through Java Script, but I don’t have a reference on how to do this