I made a normal trend using this code displaying the average measurement value and scaling the Y-axis automatically to predefined values (arguments).
I call the function from a button and in the input property of the button - up action - up-command like: loadZoomTrend_loc_for("TR_201_FluxHoogte", S201_fh_Min, S201_fh_Max);
FUNCTION loadZoomTrend_loc_for (STRING strTrenTagF, REAL intSchaal0F, REAL intSchaal100F) // Avg waarde TrnSetPen(31, 1, strTrenTagF); SleepMS(20); //Y-axis scale automatic REAL Range = intSchaal100F - intSchaal0F; REAL Avg = (intSchaal100F + intSchaal0F)/2; REAL ScaleMax = Avg + Range*2; REAL ScaleMin = Avg - Range*2; SleepMS(20); TrnSetScale(31, -1, 0, ScaleMin); SleepMS(20); TrnSetScale(31, -1, 100, ScaleMax); SleepMS(20); //X-as span TrnSetSpan(31,3600); //28800 = 8 uur / 21600 = 6 uur / 14400 = 4 uur / 7200 = 2 uur / 3600 = 1 uur SleepMS(20); END
This works great but I have some limitations regarding this trending output.
Now I want to do the same in process analyst using also cicode function.
How do I do that?
Thanks for your support.