
ElecSparky (Customer) asked a question.
Create X/Y Graph in Cmore 9.02
I am working on a boiler heating system and have a 10 point reset curve, outdoor temp and desired water temperature. I wonder if the line chart object can be set up to show/plot the variables as the user enters them.
Wonder if this has been done or can this be manipulated somehow in a different way.
There is not a good way to do this in 9.02. It is possible but if you REALLY need to, create a scatterplot by drawing your own X-Y axes and putting 10 small Circle objects on the 0,0 coordinate. Then in the Animation tab for each of the circles, you can assign the X and Y coordinates to the "Axis Animation" "X-Axis Tag" and "Y-axis tag" In your PLC or event manager, you'll need a Math statement to scale the value of each coordinate since the X and Y axes tag will be measured in pixels (the length of the X and Y axes). The Y axis points will also need to be multiplied by -1 since the screen pixels start at 0,0 in the top left corner and count up as you move down the screen.
The result will be 10 dots that land on their respective X and Y coordinates.
The same approach could be done with Line animations, but more math would be needed to adjust the position, length and rotation angle of each line.
Ya', I have realized this is not very user friendly or an easier way to do this. Been trying to make this work for a while. Hopefully this will be looked at in a new rev.
It is on our list, but it is not a request I hear about often. I'd love to hear some more customer feedback about how this is used.
I built a test and while it was tedious, it did work. Draw two lines for the X/Y axes. Their intersection is the 0,0 coordinate
Add 10 lines 1px in height and 2px wide(copy/paste), then select all and set them up with the property list. The property list is helpful since it makes it easy to adjust settings for all the lines at once. Set the Left and Top coordinate at 0,0 on your chart.
Add tags for the right end coordinate for each line and a tag for the start coordinate for the first line. These should be read from the PLC. Also internal tags for the length and angle of each line. It helps to create the tags for the first line, then export the tag list, edit it in excel, the reimport. Finally add an internal ym tag for each point (ym0, ym1...)
Each line required three Math actions in event manager. Each event can handle 16 actions, so create 2 events with the same trigger. First ym0 = y0 * -1 to adjust for the pixel direction on the screen. The second math action to calculate the angle of the line:
( DEG ( ATAN ( ( <ym0> - <ym1> ) / ( <x1> - <x0> ) ) ) + 360 ) MOD 360
and a third to calculate the length (simple Pythagorean:)
SQRT ( ( <x1> - <x0> ) ^ 2 + ( <ym0> - <ym1> ) ^ 2 )
I created events for one line in event manager, then exported it to Excel and built out the rest - then re-imported.
All of this will redraw every time the event trigger is true. If you'd like a sample project, let me know what version you are working with and I'm happy to send it to you.
I am working with 9.02 and would like to see a copy. Looks like what you did is a bit over my head. But would love to have a solution. This will be replacing a Viessmann boiler control and they show the reset curve like that. Nice for the operator to have a visual. Thanks so much.