liltecca

Dynamic wedge with borders that change with tag values

15 posts in this topic

Hello, has anyone had success in creating a wedge with borders that change due to its assigned tags? Attempting to create a range on a gauge using wedge, but am unsure how to approach this considering it wouldn't be rotating the wedge around a point but rather changing the size of the wedge. 

Share this post


Link to post
Share on other sites

i am guessing you are trying to make a custom HMI object but i cannot figure out why would border need to change and why would that need to depend on assigned tag instead of tag value.

one should be able to accomplish by scaling (height/width). 

what software you are using? 

Share this post


Link to post
Share on other sites

I'm interested in this as well, for a different purpose.

I want the shaded portion of a circle to change based on tag values. My goal is to visually show the programmable cam switch settings that can be adjusted at runtime. I've been working with AB PV+, Red Lion Crimson 3/3.1, and Automation Direct C-More. Ironically, the C-More has a gauge type control that comes the closest, as long as my starting point is fixed at one of the 90° cardinal points. If i could rotate the object at runtime to a random value, that would work perfectly for what I want to do, but....alas....

This is basically what I want to do:
 

CamDiagram.JPG

Share this post


Link to post
Share on other sites

That would be rather easy in Ignition's Vision client with the Paintable Canvas.  (For "easy" varying with Java Swing and Jython skills....)

Share this post


Link to post
Share on other sites

@panic mode: yes, i'm using factorytalk view studio SE. The edges of the wedge (picture a speedometer/semicircle) would change according to the tag's analog value to show a range as the values changed (using wedge instead of lines so that there is color inside). I'm assuming that I will be needing to create a script but none of the properties that show up when using vba code seem to allow manipulation of the borders themselves (all properties would apply to the whole wedge). I figured i could use four semicircle wedges overlayed one another with rotation manipulation to make it seem like a speedometer (some wedges would be used to hide the others by making them the same color as the background) but was wondering if there was a way to do it with a single object using a vba script. Apologies if something isn't clear, i'm very inexperienced and beginning stages of learning. 

Share this post


Link to post
Share on other sites

@Joe E. , very similar concept to what i'm attempting to accomplish, mine would ideally be a semicircle. 

Share this post


Link to post
Share on other sites

well that is one of the reasons we went away from integrated solutions built around industrial HMIs and use industrial PCs with our own software. they are usually comfortable and learning curve is short but one has to live with limitations. for us it meant initially we had to develop more but - it is up to us what we do with it and that means everything is possible. no more limitations like screen size or resolution, number of displays, number of tags, type of controls available etc. when something is needed but not already there, we create it. once done it can be used many times and in any project.

 

Share this post


Link to post
Share on other sites

What platform do you use for development? Did you write your own drivers for connecting to the PLCs or use someone else's?

Share this post


Link to post
Share on other sites

VisualStudio....

initially it would be the 3rd party driver/ActiveX/SDK as this is the fastest way to get results. but that is something we rarely do today. just about all are done internally, either from scratch or by using open source or SDK if and when vendor offer it. many devices use simple protocols that are easy to reverse engineer. 

the usual application would be some GUI software that has many simultaneous connections to different devices (PLCs, robots, other PCs, CNCs, RFIDs etc.). and if don't want to waste the time on something new (fieldbus etc), we just add the option (driver or hardware) to one of the system components (PLC or robot) as we can already talk to those.

Share this post


Link to post
Share on other sites

in DotNet one could use PathGeometry and ArcSegment. to go beyond 180deg property IsLArgeArc would need to be set to true

btw, have not seen it in years but it looks like required level of customization for something like this may be possible with factorytalk view studio SE as well. what properties are exposed for objects like arc or wedge?

Share this post


Link to post
Share on other sites

Hmmm....I may have some time soon to tinker around in VS. We only have FTV ME, not SE, so I can't check that out.

Share this post


Link to post
Share on other sites

@panic mode I've decided to go the route of using visual studio and then dotnet to create the moving wedge edges to show range. I'm also inexperienced with visual studio, although it was easier creating the gauge object as opposed to factorytalk. Would the ability to move the arc/wedge edge be implemented in dotnet, and the gauge simply created in visual studio? All of the videos for gauges in visual studio only have a rotating arrow with a stagnant scale to show what range the data is in (green, yellow, red) and not an updating range, so I wasn't sure. 

Share this post


Link to post
Share on other sites

@panic mode @Joe E. These are the arc/wedge properties, none of which I've found would allow for manipulation of only the edges instead of the whole objects (I did manage to use VBA for expansion of the graphic as a whole)

 

Screenshot 2023-06-28 090254.png

Screenshot 2023-06-28 090212.png

Share this post


Link to post
Share on other sites

those are just shared properties.

clicking on radio button 'All properties' should show longer list... 

 

Share this post


Link to post
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