Force Y Position to be static in Vision

Guys, I'm struggling here. First job with Ignition, potentially more to come, but it just falls flat on it's face with animation which is big in the industry I'm in.

I have a coil (red circle) as it grows, I want the line to follow it.
I've already written my own python routine to normalize data coming in and scaling it to pixels. (Feature request btw, every other HMI lets you set the range on an animation)
image

I have created custom properties that scale my coil diameter and translate it to the line. It adjusts x, y, height, width, and angle.

Y, actually does not need adjusted. All my math seems to check out. If I enter my max diameter, my red circle grows to it's max, and the line, IF it would stay in the proper position in the Y, would actually work. Instead I get this
image

Mind you, my Y position, is actually tied to a custom property which is giving me the value the line needs to be at
image
image
StripYPos is calculated to be 405, which is what Y SHOULD be displaying. Instead Its at 430
image
It just gets ignored by Vision.

Any ideas? Customer isn't going to be happy if we can't figure this one out.

Instead of trying to manually align lines (which is only going to end in frustration), considering using a Paintable Canvas component to draw your lines, circles, etc:

This is basically your best bet in terms of animation specifically within Vision.

2 Likes

What is happening to the y position as the diameter approaches max? Does it look ok all the way up until the max is reached, and then suddenly jumps down to the wrong spot?

The y position is always just wrong. As other things calculate and move, the Y increases.

It shouldn't. I want it to stay static. I've keyed it in manually, it changes. Ive done an expression that basically states, y=405

And yet as the other parameters change, exactly as they should, the Y changes. If it would stay static, i'd be in good shape

If Y is supposed to be static, why the expression?

Y of the floating line should always be the y position of the horizontal line.

Was just trying ideas to see something stick. Ignition just keeps changing it.
Is there a way to make it static?

Agreed.

Why does it keep changing?

I put this as my Y, changed my coil diameter, and the Y position changed on its own

I do not see properties for the center/anchor point of an object?

Bind the y of the floating line to the y of the horizontal line.
Bind x to the centerline of the circle.

Here'a window to play with.
test_coil_2024-04-03_1231.zip (7.4 KB)

Do not adjust the angle.

Sorry, got called out the shop floor. Adjusting the angle changes the x and y positions. Recipe for
a headache, as you've already seen.

However, if you draw a line at an angle the endpoints are in the opposite corners of the box that bounds it, and the angle is zero.

From there you only need to adjust the height. X / Y / Width stays constant.

Good call. Will attempt it this way