Graphing from continually changing list

Discuss issues and ideas you have to configuring displays with PowerVision
kcampbell
Posts: 3
Joined: Mon Dec 10, 2012 10:08 am

Graphing from continually changing list

Post by kcampbell » Wed May 06, 2015 7:13 pm

I come from a Codesys background and I'm trying to achieve something similar to their trace functionality. This is the first project I have worked on using PowerVision and still trying to get the hang of everything. I have succeeded in achieving close to the desired results but feel it will take a big hit on performance once there is more to the project. I have attached the murphyconfig that shows a sample of this and i'm hoping I can get ideas as to how to achieve this but more efficiently. Any tips and tricks are appreciated. Thanks
Attachments
Sample Graph.zip
(677.94 KiB) Downloaded 15 times
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Graphing from continually changing list

Post by stalley » Fri May 08, 2015 8:50 am

Hello kcampbell,

Welcome to the world of PowerVision! Looks to me that you have made a great start.

I noticed in your initialization method there is a for loop at the very end. All it does is the ListManagerSetPosition(). The only thing the ListManagerSetPosition() is set the list current position pointer. In the loop you are just resetting that "pointer". I just wonder if you have left a line of code out or if you really need it.

I'm not familiar with the Codesys trace capability, so I'm not sure what data you will be graphing. Are you tracking certain parameters to view historic data? If so, will the data actually change at 50 ms?

If you are concerned about CPU usage and memory, there are system variables, Cpu.FreeMemory and Cpu.Usage, that you can watch.

We are anticipating a release of a beta 2.8 version in the next month, it has some internal changes that has shown to improve performance on the displays.

Again, welcome and good luck! If you have further questions or comments, please let us know how we can help.
Sara Talley
Software Engineer
Enovation Controls
kcampbell
Posts: 3
Joined: Mon Dec 10, 2012 10:08 am

Re: Graphing from continually changing list

Post by kcampbell » Fri May 08, 2015 11:09 am

Thanks for the response stalley,

As for that extra line of code I was never able to get the graph to update without going through and pointing to each location in the list. Maybe it was just an issue that I ran into before and I should go back and revisit it.

The trace in Codesys is basically just a history over time on a graph and is currently how they show it on their custom hardware that they make in house. The customer is reading the data every 8msec so I actually would like faster than 50msec but that is something I will focus on later. Maybe gather information in the 10msec loop and update the display every 100msec or something. Right now i'm going through all the challenges/issues that might arise and getting them out of the way. The current scope would have 5x of these graphs, all with different input values. 3 feedbacks and 2 setpoints.

My next challenge is setting up serial communication. Hopefully there are good examples on here to look at as I have never touched serial before.