Citect - Analyst View

Freak

Member
Join Date
Oct 2006
Location
Barossa Valley
Posts
195
Hi All - I have created a new page in Citect Version 7.20 for displaying a Process Analyst trend. I can go to the page no problems and I have configured the PAV and saved all is ok, except when I go back to the page I have to reopen the saved PAV file. On the other pages the PAV file is opened automatically. I can't remember how I configured this project as it was several years ago that I last worked with Citect. Any ideas?
Cheers
 
Hi - I have attached an image. In this instance I want to have the SPK_Temp.pav file open automatically when the page is displayed. If I was to go to the AS1 trends page then the AS1.pav file is opened when I go to that page.
The annoying thing is I used to know how to do his but it has been a couple of years and I am obviously rusty. o_O

Cheers

Capture.jpg
 
Can you do a save as? I want to do the same thing and will try this when in Canberra tomorrow. Then a tab with GoTo? Will let you know how I go.
 
Hi Bob - did you have any luck with your configuration? I still haven't been able to configure mine the way the other trends are working. I looked at the online help and the only configuration was around paths to the saved file. I have saved the file to the local directory as per the other trends. I have even done a search on the hard drive to see if there are any other .pav files that I need to place a copy in but I can't seem to find any.

Cheers
 
I have not yet - did not have time - but from having a quick look it appears that there is a way in cicode attached to a button to load the analyst with fixed pens. Do you have buttons doing the other ones? If so there would probably be some cicode attached to the buttons. If there is any help would be appreciated - hope this helps you too.
 
Hi, I'm new to the forum and Citect environment in Citect project editor, System Configuration Menu, use the function. PageProcessAnalyst ("pagename", "trendname.pav") or use it as genius Input: ProcessAnalystPopUp ("!pageName", "trendname.pav")
 
Hi osalkor - welcome to the forum and thanks for the help. I have managed to get what I need working but not in the manner that I would like, I have used a disused page to get the trends working but the naming convention is all wrong in the code (appears fine to the end user).
I have looked and cannot find the "System Configuration Menu" can you please put up a screen shot.

Bob - I have looked at all of the Cicode and cannot find any attached to buttons etc. All the buttons have is an input when pressed to close the current window and open the page that they refer to.

Cheers
 
You have to make a button that calls the Cicode for the function you want. For example in objects there is a button object. Insert button on screen - on down command use Cicode expression in command window - have not done it for years but it is there.
 
Hi - the commands that are attached to the buttons call the page like this:

Winfree();
PageDisplay("Trend_AT1")

That then opens the page that the Process Analyst should then run from. Page opens with the Process Analyst embedded but no trends open up. Manually go to the trends and open them up and they display.

Unfortunately I can't get the program small enough to load onto the forum.

Cheers
 
An example, the command are hidden in a help file somewhere
Have stripped a bit out of the examples but you should get the gist of the actions.
LoadRTD is called from a button
Opens the PAV file "Pxxx_RTD.PAV"
Page with PAV Graph already open on a page with an AN of 6.

FUNCTION
LoadRTD(INT iP) //Load Px_RTD.PAV
PaLoadView("AN6","P" + IntToStr(iP) + "_RTD")
PaSetSpanTimes("AN6",iP);
END


FUNCTION
PaLoadView(STRING sPaObjectName = "PA", STRING sPavFile = PagePeekLast(0))
OBJECT hPA = ObjectByName(sPaObjectName);
_ObjectCallMethod(hPA, "LoadFromFile", sPavFile, 0);
END


//Sets span time
FUNCTION
PaSetSpanTimes(STRING sPaObjectName = "PA",INT PNum = 1)

OBJECT hPA;
OBJECT hPanes;
OBJECT hPane;
OBJECT hPens;
OBJECT hPen;
INT nPaneCount;
INT ISpan;

iSpan = 8 * 60; //Set to 8 Hours

GetDaysHoursMinsFromMins(iSpan);

hPA = ObjectByName(sPaObjectName);
hPanes = _ObjectGetProperty(hPA, "Panes");
hPane = _ObjectCallMethod(hPanes, "get_Item", 1);
hPens = _ObjectGetProperty(hPane, "Pens");
hPen = _ObjectCallMethod(hPens, "get_Item", 1);
_ObjectCallMethod(hPen, "SetDefaultSpan", 0, iPavDay, iPavHr, iPavMin, 0, 0);
_ObjectCallMethod(hPen, "ResetToDefaultSpan");
_ObjectCallMethod(hPen, "GoToNow");
END


FUNCTION
GetDaysHoursMinsFromMins(INT iMins)

iPavHr = 0;
iPavMin = 0;
iPavDay = 0;

IF iMins > 0 THEN

iPavHr = Abs(iMins / 60);

iPavMin = iMins - (iPavHr * 60);
iPavDay = Abs(iPavHr / 24);
iPavHr = iPavHr - (iPavDay * 24);

END
 
Thanks for that, it works, although I know I did it a different way previously. When I work that out I will post it on here.

Thanks all for your help.

Cheers
 
I think the response from osalkor is where I would have been heading - just have not had time to try it yet.
 

Similar Topics

I want to get and set Time Picker value in process analyst in citect scada using cicode. Also I tried to find an event or function when time...
Replies
0
Views
1,288
Hi All~ I do work trend program in Intouch. But, I guess intouch is weak trend function than Citect Process Analyst. So, I know citect...
Replies
0
Views
3,656
Hello, I have a running project on Citect v5.42 and simatic net v6.4 I have created a new spare PC and loaded all software like Citect, station...
Replies
0
Views
68
Hello everyone, In a factory where we installed Citect 7.20 the computer began to show the first signs of end of life. They never considered...
Replies
0
Views
73
I have a running backup of Citect and plc and I want to make a spare PC station so I have installed the win XP and somatic net v6.0 and import the...
Replies
3
Views
121
Back
Top Bottom