Citect trends

krishy

Member
Join Date
Jul 2013
Location
Moon
Posts
2
I wonder how to solve this issue in Citect 7.30

The trends are configured and working correctly. But the scales after launch are horrible. Is there any way to set the scale to a default?
 
You must set the scale for the "Tag" that is being trended.
Set the raw and engineering to the values required.
If you want the trend for that tag to show a max of 100 then set the tag raw to Min = 0 and max = 100 then set engineering to min = 0 and max = 100.
 
So not for the trend tag, rather the original tag?

Anyway, I got a small Cicode, with little modification, which does the job.

Code:
INT FUNCTION ExitPageTrend(INT hAnTrend, INT TrendScNo)

INT i;
STRING sFile = "[Run]:\TREND_TK.INI";

WndPutFileProfile("Span_" + IntToStr(TrendScNo),"Span",IntToStr(TrnGetSpan(hAnTrend)), sFile);
FOR i = 1 TO 8 DO
WndPutFileProfile("Pen_" + IntToStr(TrendScNo), "Pen" + IntToStr(i), TrnGetPen(hAnTrend, i), sFile);
WndPutFileProfile("Pen_" + IntToStr(TrendScNo), "Scale_100_" + IntToStr(i), TrnGetScale(hAnTrend, i, 100), sFile);
WndPutFileProfile("Pen_" + IntToStr(TrendScNo), "Scale_000_" + IntToStr(i), TrnGetScale(hAnTrend, i, 0), sFile);
END

RETURN 0;
END

INT FUNCTION EntryPageTrend(INT hAnTrend, INT TrendScNo)

INT i,
iTemp;
STRING sFile = "[Run]:\TREND_TK.INI";

IF iFirstTime = 1 THEN
RETURN 0;
ELSE
iFirstTime = 1;
END

iTemp = StrToInt(WndGetFileProfile("Span_" + IntToStr(TrendScNo),"Span",0, sFile));

IF iTemp <> 0 THEN
TrnSetSpan(hAnTrend,iTemp);
END

FOR i = 1 TO 8 DO
TrnSetPen(hAnTrend, i, WndGetFileProfile("Pen_" + IntToStr(TrendScNo), "Pen" + IntToStr(i), "", sFile));
TrnSetScale(hAnTrend, i, 100, WndGetFileProfile("Pen_" + IntToStr(TrendScNo), "Scale_100_" + IntToStr(i), 32000, sFile) );
TrnSetScale(hAnTrend, i, 0 , WndGetFileProfile("Pen_" + IntToStr(TrendScNo), "Scale_000_" + IntToStr(i), 0, sFile));
END

RETURN 0;

It is called at page event.
 

Similar Topics

Hi all I'm new to citect and I'm trying to get me head around a trend issue, if you can assist it would be greatly appreciated. I'm told the...
Replies
4
Views
1,795
Hello, I want to change the default scale limits in the vijeo citect which is currently (-55 to 55). I want to change it to (0 to 10000) but when...
Replies
0
Views
1,270
I have upgraded Citect from 5.4 to 7.4 following the upgrade path, the program compiles and runs fine but a super genie that displays 3 trends...
Replies
7
Views
7,314
Hi Dears i want to fill gaps between Trend's Graph. i referd to Citect Help And I tried Some Trend Parameters such as...
Replies
8
Views
2,327
Hi all. Im learning Citect and trying to setup a trend page. I have a Single Trend page setup and working with a digital tend tag. I access this...
Replies
3
Views
10,598
Back
Top Bottom