Guest Rich101 Posted February 26, 2004 Report Posted February 26, 2004 The system is citect. At midnight 4 operating logs are printed out with 24 hourly readings of different temperatures and pressures mostly onto 4 excel worksheets. Looking into the cicode file I see the codes for bringing in the temp and press readings, etc. on a file called log. In events under system there is something called Log1Trigger that sets it up to print at midnight. One thing I would like to know is how to combine the 4 reports into one? Below is the cicode for the 4 events that go to excel at midnight. // Logging Functions FUNCTION LOG1_TRIGGER(); // PLANT INT hPLANTa=DevOpen("PLANTa",0); DevAppend(hPLANTa); DevSetField(hPLANTa,"Unit","Plant"); DevSetField(hPLANTa,"Date",DATE()); DevSetField(hPLANTa,"Time",TIME()); DevSetField(hPLANTa,"Sup_Temp",HTHW_Supply_Temp); DevSetField(hPLANTa,"Sys_Press",HTHW_System_Press); DevSetField(hPLANTa,"Outdoor",Outdoor_Temp); DevSetField(hPLANTa,"Zone1_Tot",Zone1_Tot); DevSetField(hPLANTa,"Zone2_Tot",Zone2_Tot); DevSetField(hPLANTa,"Zone3_Tot",Zone3_Tot); DevClose(hPLANTa); // Generator 1 INT hGen1a=DevOpen("Gen1a",0); DevAppend(hGen1a); DevSetField(hGen1a,"Unit","Gen 1"); DevSetField(hGen1a,"Date",Date()); DevSetField(hGen1a,"Time",Time()); DevSetField(hGen1a,"Ret_Temp",Gen1_Inlet_Temp); DevSetField(hGen1a,"HTHW_Tot",Gen1_HTHW_Tot); DevSetField(hGen1a,"Oxygen",Gen1_Oxygen); DevSetField(hGen1a,"Stack_Temp",Gen1_Stack_Temp); DevSetField(hGen1a,"Gas_Total",Gen1_Gas_Tot); DevSetField(hGen1a,"Oil_Total",Gen1_Oil_Tot); DevClose(hGen1a); // Generator 2 INT hGen2a=DevOpen("Gen2a",0); DevAppend(hGen2a); DevSetField(hGen2a,"Unit","Gen 2"); DevSetField(hGen2a,"Date",Date()); DevSetField(hGen2a,"Time",Time()); DevSetField(hGen2a,"Ret_Temp",Gen2_Inlet_Temp); DevSetField(hGen2a,"HTHW_Tot",Gen2_HTHW_Tot); DevSetField(hGen2a,"Oxygen",Gen2_Oxygen); DevSetField(hGen2a,"Stack_Temp",Gen2_Stack_Temp); DevSetField(hGen2a,"Gas_Total",Gen2_Gas_Tot); DevSetField(hGen2a,"Oil_Total",Gen2_Oil_Tot); DevClose(hGen2a); // Generator 3 INT hGen3a=DevOpen("Gen3a",0); DevAppend(hGen3a); DevSetField(hGen3a,"Unit","Gen 3"); DevSetField(hGen3a,"Date",Date()); DevSetField(hGen3a,"Time",Time()); DevSetField(hGen3a,"Ret_Temp",Gen3_Inlet_Temp); DevSetField(hGen3a,"HTHW_Tot",Gen3_HTHW_Tot); DevSetField(hGen3a,"Oxygen",Gen3_Oxygen); DevSetField(hGen3a,"Stack_Temp",Gen3_Stack_Temp); DevSetField(hGen3a,"Gas_Total",Gen3_Gas_Tot); DevSetField(hGen3a,"Oil_Total",Gen3_Oil_Tot); DevClose(hGen3a); Zone1_Tot=0; Zone2_Tot=0; Zone3_Tot=0; Gen1_HTHW_Tot=0; Gen1_Gas_Tot=0; Gen1_Oil_Tot=0; Gen2_HTHW_Tot=0; Gen2_Gas_Tot=0; Gen2_Oil_Tot=0; Gen3_HTHW_Tot=0; Gen3_Gas_Tot=0; Gen3_Oil_Tot=0; END Quote
BobB Posted February 26, 2004 Report Posted February 26, 2004 I believe you had several answers on another website. If they do not help, contact Citect support. They are very good. Also join the Citect user's list. Very experienced Citect users there. We all help each other. Quote
Guest rich 101 Posted February 28, 2004 Report Posted February 28, 2004 I would appreciate it if I was able to ask the folks on this site also that may not have seen the post on the other site. Thanks. PS, the more I look at how the programer set up the citect program for our plant the more questions I have. The Citect program has a section to create reports under reports such as the 24 hour log I am trying to put into one from four. However the programer did not set it up that way. Its all set up under events instead. Is this a mistake to do it this way? Quote
Jay Anthony Posted February 28, 2004 Report Posted February 28, 2004 Guest_rich 101: Please register at MrPLC.com and join the MRPLC.com community Register at MrPLC.com Quote
BobB Posted February 28, 2004 Report Posted February 28, 2004 It is OK to set reports up under events. That is the beauty of Citect, it is very flexible. The report I placed on the other site has an event triggered before the report is printed. The event causes calculations and data movement to take place in the PLCs. Once the data is moved to other registers, the daily accumulation registers are reset to zero. Another event triggers the printing of the report. A button on the reort page can be used to reprint the daily report because all data has been moved into a different array of registers and remains there until the event triggers data movement again next day. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.