2 Replies Latest reply on Nov 14, 2018 1:56 PM by Roger Palmen

    PI Vision Custom Symbol Shapes


      I'm trying to create what is called a Duval Triangle (link: A Software Implementation of the Duval Triangle Method - IEEE Conference Publication ) within Vision using JavaScript and HTML canvasing. Currently the program draws out the triangle using html canvas and then uses PI AF data to plot and connect the points in a line on the graph. On update, it clears the canvas and re-draws everything. This is causing a lot of delay processing data, and eventually the program stops working. I dont think this was the best way to approach it. Ideally, I want a static background that will contain the Duval Triangle itself. As PI Values update and come in, older values will be removed as new ones are added, similar to a line graph. Has anyone had experience developing custom objects that accomplish a similar task effectively?



      Here is a screen cap of what it looks like in the current stage within PI Vision. The lines inside with points 1 to 3 would move as new data is added. Everything else would remain static.Dtriangle.JPG


      Thank you

        • Re: PI Vision Custom Symbol Shapes
          Roger Palmen

          Not sure why this isn't working for you. I also have a custom symbol that draws using the HTML5 canvas, and clears and re-draws on every dataUpdate (thus every 5 seconds). No performance problems there, the data processing is minor, the arithmetic is simple, so an easy task for the browser.


          For more complex symbols requesting a lot of data over the PI Web API i do tend to use lower the update frequency to lower the performance impact on both the browser and PIWebAPI, but that's not really applicable here.