MikeRay

VBA Double Variable Overflow Error

Discussion created by MikeRay on Aug 8, 2014
Latest reply on Aug 13, 2014 by Gregor

Hi There,

 

I am developing some screens for a customer in ProcessBook. These screens are related to compressors and are to show a plot of compressor performance in terms of flow vs. head (representing the work done in compressing the gas).

 

The requirement is to have overlaid on top of the actual data a set of six static curves to represent the manufacturer ideal performance of the compressor running at different speeds. My customer has 21 compressors and does not use AF so I have built a structure in the MDB and am working with module relative displays in ProcessBook version 3.2.3.0.

 

I have used and extended the approach described by Andreas here: https://vcampus.osisoft.com/bloggers_place/b/andreas/archive/2010/06/30/overlay-a-characteristic-curve-in-an-xy-plot.aspx I have the static curve data stored in an Excel file rather than an Access database and its accessed by 6 ODBC datasets. I have seven XY plots, one for the actual data and one each for the characteristic curves. The code works fine to combine the XY plots but I am having an issue with getting them to all zoom in sync.

 

I have the 6th static curve always on top and hook on to its 'zoom' event. Then I am trying to get the new absolute max and min scales from it and passing them down to the other XY plots in the stack. the problem I having now is that, intermittently one of the double variables holding the min and max scale setting is showing "Overflow" when I'm debugging and causes an "Overflow" error when I'm trying to assign it to the other curves in the stack.

 

I just wanted to see if anyone has had this problem before, maybe in a different context or maybe with the same code. It does happen with the unaltered code from the original vCampus article and also my modified version. Also the code from the original vCampus article produces an intermittent error with a pop up saying "Invalid Argument". I have checked the event log and there are no matching events to these. Also there is nothing I can see in the PI logs (however I have no way to view the contents of the *.dat files in the "PIPC\LOG" directory due to the customer laptop being so locked down).

 

I have attached screenshots of the ProcessBook file in action and also the errors describe above. I have also attached the MDB structure config file, excel file for the static curve data and the ProcessBook file itself.

 

Any input would be greatly appreciated.

 

Thanks,

 

Mike.

 

5282.Sep.jpg

 

0511.overlay.jpg

 

7288.OverflowDebug.jpg

 

3036.OverflowDialog.jpg

 

5265.InvalidArg.jpg

 

 

 

 

 

 

 

 

Attachments

Outcomes